Jump to content

Quickly add data to a Notion [official api] database


Recommended Posts

On 6/3/2021 at 11:41 AM, pigpigfour said:

Setup ok

Notion Database and Token setup ok

But not sync to the Notion~~

 

I dont know why~~

 

Have you installed the workflow using npm or directly on Alfred with .workflow file? If it was the latest you might have to open the workflow folder on terminal and run `npm install`  

 

Let me know if that helps, so then I can update the instructions on github - otherwise we might need some more details.

 

 

Screenshot 2021-06-04 at 13.07.39.png

Link to comment
  • 2 weeks later...
On 6/17/2021 at 8:50 PM, Pete Bastille said:

Hello,
Thank you so much for this workflow, it's a game changer for me ! 

I currently can't make it work though. I followed the information I found in this thread but I still have the same error message : 

1239573743_Screenshot2021-06-17at20_48_50.thumb.png.d8aa495cb726f0a136eea327f423be9f.png

 

Does anyone know how to fix this ? 

Thank you ! 

Pete

I think you didn't put the right token on the variables 

Link to comment
On 6/17/2021 at 8:50 PM, Pete Bastille said:

Hello,
Thank you so much for this workflow, it's a game changer for me ! 

I currently can't make it work though. I followed the information I found in this thread but I still have the same error message : 

1239573743_Screenshot2021-06-17at20_48_50.thumb.png.d8aa495cb726f0a136eea327f423be9f.png

 

Does anyone know how to fix this ? 

Thank you ! 

Pete

 

Thank you for looking into this. 

 

Can you tell me how you find de two variables please ? Maybe I didn't do the correct manipulation. 

Thanks !
 

Link to comment

Hi Paulo,

 

This seemed like just what I was looking for, but the NPM package doesn't exist, and the workflow bundle doesn't work (env vars are correct, and it reports 'Entry added to Inbox' but no new content is added to the relevant DB.

 

Have you pulled this to work on it?

 

TIA!

Link to comment
  • 2 months later...
  • 2 weeks later...

@itsdustme or anyone else that needs help... I just got this running as follows (m1 mac air)

 

  1. installed flow via download from github
  2. installed npm:`brew install npm`
  3. ran this in the flow directory (as mentioned above): `npm install`
  4. retrieved api key and DB id from notion.so as required and added them to the flow vars
  5. this was the part  that hung me up for a while... you have to specifically share the DB with the api integration you just created. as so: https://developers.notion.com/docs/getting-started#step-2-share-a-database-with-your-integration

Once I did step 5 everything worked :)))))

good luck, and thanks to the creator of this workflow!!  @Paulo

Edited by alf
Link to comment
  • 2 months later...

Hi there! I'm having a hard time getting this two work. I followed alf's steps above to ensure the API integration was shared with the DB, but I keep getting this when I try to add an item from Alfred:

 

{"alfredworkflow":{"variables":{}}}

 

Does anyone have an idea of what I'm doing wrong? Btw, my dev skill level is... 0. So any dumbed-down explanation/steps would be greatly appreciated. Thanks!

 

 

SOLVED

(updated 19 Dec)

 

I had (blindly, bc I didn't know what it meant) followed pigpigfour's instructions above but it didn't occur to me until that that I needed to edit the DB in Notion itself to match what I had put in that notion.js file (in my case, "Task"). I'm as much of a noob to Alfred Workflows as I am to Notion itself, so I guess this will be obvious to others. But thought I'd share in case it helps someone else.

 

Screen Shot 2021-12-19 at 2.45.52 PM.png

Edited by gds
Found solution
Link to comment
  • 1 month later...

SOLUTION BELOW

 

Was running into this error

 

Quote

ERROR: Notion Quick Add[Run Script] Client warn: request fail { code: 'unauthorized', message: 'API token is invalid.' } APIResponseError: API token is invalid.

 

Turns out, I had assumed the NOTION_TOKEN variable that we have to set in the workflows env variables was supposed to be the token described here -  https://www.notion.so/Find-Your-Notion-Token-5da17a8df27a4fb290e9e3b5d9ba89c4. However, that is incorrect!

 

The NOTION_TOKEN is actually the Internal Integration Token that's described here - https://developers.notion.com/docs/getting-started#step-2-share-a-database-with-your-integration. You must manually create an integration for Notion Quick Add within your workspace to get the Internal Intergration Token which should be used for the env variable NOTION_TOKEN.


Hope this helps somebody!

 

Thanks to @alf for the nudge in the right direction.

 

Quote

@itsdustme or anyone else that needs help... I just got this running as follows (m1 mac air)

 

  1. installed flow via download from github
  2. installed npm:`brew install npm`
  3. ran this in the flow directory (as mentioned above): `npm install`
  4. retrieved api key and DB id from notion.so as required and added them to the flow vars
  5. this was the part  that hung me up for a while... you have to specifically share the DB with the api integration you just created. as so: https://developers.notion.com/docs/getting-started#step-2-share-a-database-with-your-integration

Once I did step 5 everything worked :)))))

good luck, and thanks to the creator of this workflow!!  @Paulo

Edited September 28, 2021 by alf

 

Link to comment
On 2/11/2022 at 11:28 PM, grahamgaylor said:

SOLUTION BELOW

 

Was running into this error

 

 

Turns out, I had assumed the NOTION_TOKEN variable that we have to set in the workflows env variables was supposed to be the token described here -  https://www.notion.so/Find-Your-Notion-Token-5da17a8df27a4fb290e9e3b5d9ba89c4. However, that is incorrect!

 

The NOTION_TOKEN is actually the Internal Integration Token that's described here - https://developers.notion.com/docs/getting-started#step-2-share-a-database-with-your-integration. You must manually create an integration for Notion Quick Add within your workspace to get the Internal Intergration Token which should be used for the env variable NOTION_TOKEN.


Hope this helps somebody!

 

Thanks to @alf for the nudge in the right direction.

 

 

SOLVED

 

This approach worked !!

need strictly follow this procedure

Link to comment
  • 2 months later...

I am trying to make this work and it is impossible to follow.

 

Can someone please share the correct and necessary steps to make it work?

 

1- Download and import workflow.

2- Database ID. (Go to Notion page and use the 32 characters code before the ?) Copy that to a text file

3- Token. (Go to Notion integrations, create a new integration, grab the "secret_ejkadsjkdasfhkjdskhjfdskhjfdhkjdf") Copy to a text file

4- Open Alfred workflow, click [x] paste 2 & 3 under values.

5- Go to your notion database, click share and invite your integration created in 3.

6- ???

 

So far I tried that and nothing works, invoque Alfred, ": add to inbox" write something and 

{"items":[{"title": "Couldn't find the `node` binary", "subtitle": "Symlink it to `/usr/local/bin`"}]}

 

Anyone willing to share a correct step by step without assuming we know everything?

 

Thanks.

Link to comment
  • 2 weeks later...

Thank you so much @Paulo

 

I followed the steps outlined above, but I am still getting the following code:

Quote

{"items":[{"title": "Couldn't find the `node` binary", "subtitle": "Symlink it to `/usr/local/bin`"}]}

 

Any Suggestions would be so helpful. Thank you again!

Edited by MitchD
Link to comment
  • 4 months later...

Hi all,

I'm having the same problem as MitchD and Polle - I've installed the workflow, set up the Notion integration, but I get the same error.

{"items":[{"title": "Couldn't find the `node` binary", "subtitle": "Symlink it to `/usr/local/bin`"}]}

Anyone found a fix?

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...