Gmail 403 error on OAuth 2.0

Hello,

I cannot solve problem with adding credentials in n8n to gmail node. I followed this tutorial (instead of Google Sheets API, I’ve done it with Gmail API):
https://www.youtube.com/watch?v=gZ6N2H3_vys

But when I get to the moment in this video on 2:08 I get this error:

How to pass this? Someone had the same problem?

Thank you!

Can you try the following?

Hello,

thank you for your answer! It looks like it worked. But I get error during execute node (I would like to send test e-mail with n8n):
1.

What should I do? It says there is no credentials with OAuth2 API but I’ve just set them.

Not sure why this is happening. @harshil1712 have you seen this before?

@velkan Is that happening when you run the workflow manually or when running in production (so if it is active)?

Hey @velkan!

Does your workflow have another Gmail node? If yes, is it using the same credentials that you created? From the screenshot that you shared, it appears that there are 2 Gmail nodes in your workflow and one of them is not using the correct credentials.

1 Like

Hello,

thank you for your answers.

@jan this is happening when I run “execute node” in gmail node:

@harshil1712 yes - you right - I’ve removed extra node. Now it looks like this:

Guys, now it looks like it works, but in this node (I’m not sure if I’ve set it up correctly), when I hit “EXECUTE NODE” I’ve got nothing on my e-mail. Why is that?

Thank you!

You created a draft. Did you check under drafts?

@RicardoE105 yes, that was my mistake :slight_smile: BTW where can I delete/change drafts?

To this work I had to switch from DRAFT to Message. Finally e-mail was sent.

But how should I read message? And for example if topic message is XYZ, then do A. If topic of message is ZYX then do B?

My basic configuration of Gmail node is that:

How should I get Message ID?

But how should I read the message? And for example if topic message is XYZ, then do A. If topic of message is ZYX then do B?

You can use either the Switch or IF node depending on the number of conditions.

How should I get Message ID?

You get the message ID from either the create or getAll operation, and then reference it in the get operations using expressions.

OK thank you, I will check that later :slight_smile: