Gmail Integration [PARTLY CREATED]

It would be awesome if we had a gmail integration in n8n! There are various use-cases that can be supported. Some examples include…

  1. Fetching unread/starred emails for actions.
  2. Sending out emails as actions to other nodes.
  3. Triggering actions when emails from certain senders arrive.

Yeah that would be a great integration. Sadly the Gmail API just supports OAuth authentication which is not yet supported by n8n. When the hosted version is ready ( hopefully soon ) we will work on it. @ajayjohn

2 Likes

I see. Forgive my ignorance, but is this due to a limitation in having Oauth working via self-signed certificates? Is there any way Oauth based platforms could work for self-hosted instances at all?

As far as I know yes, but you would have to register you “app” in each platform you want to use Oauth to be able to get a client_id and client_secret and set the redirect url which will make it really tedious. @ajayjohn

I see. This doesn’t seem like what most users would want to do. So it makes sense to handle this via the hosted version of n8n.
Eventually though, it would be nice to have a node that advanced users can use if they know their way around creating these credentials from Google API portal :slight_smile:

Btw. you should for now be able to handle the most via IMAP and SMTP and so these nodes:

https://n8n.io/nodes/n8n-nodes-base.emailReadImap

Make however sure to use the ubuntu-docker images. The default ones based on alpine make problems with the encryption.

Thanks for that! This should help :slight_smile:

Great, if you have any problems simply get back to me.

Anyway still hope we will get proper and native GMail support “soonish”.

1 Like

Now that OAuth authentication is supported, could you please add this to your roadmap, so that Gmail via OAuth is possible, as opposed to using IMAP/SMTP?

@ajayjohn Just added this to the backlog.

GMail-Node got released with [email protected]

Thanks a lot @erin2722 for creating it!

4 Likes

@jan @erin2722 Gmail Node has some error with Unicode text in email subject, when creating an email subject like this

Text is ok in subject

But when I’ve send this mail, the mail’s subject is not ok, mail’s body is ok like this

image

Please check!

Thanks a lot for reporting this. This is a bug and we will have a look. But please report the next bug by creating an issue on GitHub or create a new topic here in the forum. This topic is only about the creation of the node. Thanks!

1 Like

The problem got fixed with:
https://github.com/n8n-io/n8n/pull/1121

It will be released with the next version.

1 Like

Fix got released with [email protected]

1 Like

Is it possible to retrieve the subject text of emails with a specific label?

@Josh_Fialkoff something like this should do it.

Could you add support for authentication with service account?

@Markus got added. We will let you know when is released.

1 Like

Got released with [email protected]

1 Like