Using Notion with Drafts

Didn’t see this question posted yet but is there a way to add an additional variable besides the name? For instance, I would like to set the “Date” property to today’s date. Thank you!

I mean… the action incorrectly named at a minimum. It’s not a real “Append” if it requires both parent and child inputs. SMH…

Hi y’all! I’m trying to setup this action with two different Notion accounts. I had it working in the past and now cannot get it working again.

I have two instances of the action in Drafts.
Each instance has the proper database ID.
Drafts has credentials stored for both Notion accounts.
Still, I cannot figure out how to get this setup.

I have Drafts added as an integrtion:L

Any advice would be appreciated!

Credential identifiers are used to route action steps to different accounts for the same service. Have you set an identifier on the Notion action step in the action to distinguish the alternate account?

Have you gone through the OAuth process to authenticate that alternate account and are sure you logged into the right account in Safari when doing so?

What errors are you getting in the Action Log when trying to use the action?

(more details on Credentials)

thanks for the quick reply!

I have gone through credentials and OAuth and have them both set up.
The thing is…I don’t know where to actually assign the proper credentials!
See images. I’ve tried on both MacOS and iOS and can’t figure out how to assign credentials to each of the actions.

I hadn’t checked the Action Log before so thanks for pointing that out. Sometimes Drafts thinks it goes through successfully, but then nothing shows in Notion. Other times I get this error:

Script step completed.
Notion: Parent required

Also, I now realize I might be mixing up my actions, as I’m trying to add to a database via this action. Not sure if you’ll support that troubleshooting, so I’d understand: Notion: add page to Database + MD | Drafts Directory

In a scripted action, you have to initialize the Notion object with a credential identifier to use an alternate account. So, you would need to locate and edit the following:

// this inits with default credentials
let notion = Notion.create();

// change to below, where "MY-IDENTIFIER"
let notion = Notion.create("MY-IDENTIFIER");

If you have multiple actions targeting different accounts, you can share the same identifier value and they will share auth info. The above is the scripting equivalent of putting a credential identifier value in a Notion action step.

Hopefully, that makes sense.

1 Like

you are the absolute BEST!! Thanks for this — all is working now.

:raised_hands: Much appreciated!

a few months ago I invested some time to create an Action Group to support deeper Notion integration with Drafts. I was on the edge to use Notion much more personally but it didn’t work out for me.

There are a few useful actions though that some of you might want to use - and maybe somebody wants to continue developing it.

Two actions e.g. allow to add tasks (with a due date) to databases which worked pretty good in my testings.

The Action Group is unlisted but but a quick documentation for each action is existing. you can check it out here: Draftotion | Drafts Directory

The underlying functions are in the script file you can find here: https://github.com/FlohGro-dev/drafts-actions/blob/main/NotionDrafts.js