Gmail Trigger - Refresh Token is Required

I have been caught with this issue for several days now. I’ve tried going through the forums and I don’t see a solution for it.

After a few hours, my working workflow gets an error saying error with gmail trigger: refresh token is required. I’m using the gmail trigger. The gmail trigger doesn’t allow me to use a credential where I can provide the client secret key and keep the authorization active. I feel like this is a common error, does anyone know the solution? The issue is resolved when I sign into Google again, but it will recur after about an hour.

Hi,

What version of n8n are you using? It shouldn’t look like that. See image below for reference.

I’m using the cloud version of n8n. When I add a gmail trigger, and go to create a credential, I get the form shown in my screenshot. When I try creating other credentials (Google Docs, Drive, etc), I see the form you have in your reply. But I can’t select these other credentials with the gmail trigger. N8N only shows me the form I showed in my original message when trying to create a credential for the gmail trigger.

I’ve been able to connect to other Google Oauth2 integrations, just not with the Gmail Trigger.

I see, what version is your instance on? I feel like this will be solved either by updating ore restarting the instance. I’m pretty sure you can do it in the admin panel.

1.95.3 (latest stable). Should I update to the latest beta (1.97.1)?

That’s not needed. A restart should resolve it.

I’m also facing the same issue as the original poster. Running 1.97.1 on n8n.io.

When creating a connection to Google Drive I see the same Oauth2 screen as suggested by @Grot but for Gmail Trigger I have the same as @James_Walthall

I also encountered the same issue, with the same version. Have you found any solution?

I have not found a solution. I tried restarting the workspace suggested by @Grot and that didn’t help. I also updated the workspace to 1.99.0 beta and the issue is still there. Now, I only see a button to sign into Google without providing any details. The sign in is successful, but the token issue comes back after a short bit.

Try to set the query parameter to with access_type=offline, this should give n8n a refresh token