Notion connection frequently fails with 401

Volker

Member
Your Workflow URL
https://connect.pabbly.com/workflow/mapping/IjU3NjYwNTY1MDYzZjA0MzY1MjY4NTUzNzUxMzYi_pc
Your Task History ID
IjU3NjUwNTY1MDYzNjA0MzY1MjZmNTUzMjUxMzI1MTY2NTQzNzBmMzAi_pc
Consent to Access & Modify
I authorize Pabbly Support to log in to my account and make changes to the specified workflow for troubleshooting.
Hi Pabbly team,

I am experiencing a recurring issue with my Notion connection in Pabbly Connect and would like some help troubleshooting it.

I’m using Pabbly Connect to send data from a webhook to Notion.

Every few days I receive an email from Pabbly that a task failed with the following error (excerpt):
  • status: 401
  • code: unauthorized
  • message: API token is invalid
  • OAuthException > error: invalid_grant
  • OAuthException > error_description: Invalid refresh token
After that, I log into Pabbly, open the Notion step, update/reconnect the Notion connection once, and everything works again for a while. Then, after a few days, the same error appears again.

My questions:
  1. Is this a known issue with the Notion integration or OAuth handling?
  2. Is there a permanent fix so that I don’t have to manually re-authorize Notion every few days?
  3. Is there a recommended best practice for keeping a Notion connection stable across multiple workflows (without recreating the connection and updating every single workflow)?
Any guidance or a workaround would be greatly appreciated.
If you need more details (Task History ID, timestamps, screenshots), I’m happy to provide them.
 

anushkasahu

Member
Staff member
Hello @Volker,

In Notion, a refresh token is generated at regular intervals. It’s possible that if an action step is executed during the time interval of token expiration & refresh token generation, the step may fail.

To resolve this, you can enable auto-re-execution for your workflow. This way, if a step fails due to token issues, it will automatically retry and succeed on re-execution.

If you still face the issue after enabling this, please let us know.
 

Volker

Member
Hallo,
I have tried what you recommended but still the error persists. You can see it in the workflow "Trafft zu Notion"

Original run: IjU3NjUwNTY1MDYzNzA0MzM1MjZhNTUzNTUxMzI1MTY1NTQzODBmMzYi_pc
First re-execute: jU3NjUwNTY1MDYzNzA0M2M1MjY4NTUzZDUxM211MTZhNTOzMDBmMz0i_pc
Second re-execute: 1jU3NjUwNTY1MDYzNzA0M2M1MjY5NTUzNDUxMz|1MTY2NTOzMzBmMzgi_pc
 

Preeti Paryani

Well-known member
Staff member
Hello @Volker,

I was only able to access this task history ID; the rest two were not accessible. However, when I executed it, it worked well.
Original run: IjU3NjUwNTY1MDYzNzA0MzM1MjZhNTUzNTUxMzI1MTY1NTQzODBmMzYi_pc

Task History ID - IjU3NjUwNTY1MDYzNzA0M2M1MjZhNTUzZDUxMzA1MTYyNTQzMTBmMzEi_pc

1765972971338.png
 

Volker

Member
Yes, it worked now because in the meantime I updated to connection again.

If you filter the history by workflow and status you find these two. No amount of re-execution could fix it until I update the connection.

1765974129708.png
 

Volker

Member
Hi Preeti,

Please stop asking me to re-execute tasks. That is not the problem.

We seem to be talking past each other. Here is the situation, please read carefully:
  1. Current Status: Yes, the task works right now.
  2. The Reason: It works only because I manually went into the connection settings and clicked "Update Connection" immediately before posting here.
  3. The Real Problem: If I do nothing, in 2–3 days the connection will break again with an Error 401: Unauthorized.
I know how to re-execute a task. I know how to fix the connection manually. I know how to use the filter.

My request to support is: Why does the Notion connection expire every few days on its own? Pabbly is supposed to refresh the token automatically, but it fails to do so.

Please do not ask me to check the task history again. Please check why the Notion Access Token invalidates and is not being refreshed by Pabbly.

I need a permanent fix for the connection stability, not a guide on how to re-run failed tasks.

Thanks, Volker
 

Volker

Member
And it just happened again in another workflow, using the same connection:

Workflow "Feedback zu Notion und Kit", Step "Kunden suchen"

IjU3NjUwNTY1MDYzNzA0M2M1MjY0NTUzNTUxMzM1MTYwNTQzMjBmMzgi_pc
 

Preeti Paryani

Well-known member
Staff member
Hello @Volker,

It appears there was an issue with the OAuth-based connections, and our team has implemented updates to address this. We recommend creating a new Notion connection (preferably creating a fresh connection instead of updating the existing one) and then monitoring it for the next 2–3 days. If the issue persists after this, please let us know and we will further investigate.
 

Volker

Member
Ok, I have created a new connection, updated every step in every workflow and deleted the old one.

I hope this really fixed it.
 
Top