Trying to get email exchange out of an Gmail inbox


following a webhook trigger I do gmail api calls like:

I wonder what I’m doing wrong?
The idea is to use the email of my lead to get all the email exchange and then forward it to my client.
In this test case I checked before hand if there indeed was some email exchange present.

Any help with this would be appreciated :slight_smile:


Hi @Liepiecie, I am not sure if has can be used to search for emails by address. But the basic idea of using expressions in the search field should work:

This was my workflow:

I’ve tested this with both n8n 0.204.0 and n8n 0.205.0, however, I was using the recommended OAuth method to authenticate instead of a Service Account. Perhaps you can give the OAuth authentication a go and make sure you’re on a recent version of n8n?

1 Like

Hi! Thanks very happy its working now, I managed to get it to work with OAuth2! Do you maybe have an example node of how to get the full payload, so that I can format this nicely and can push this to another node(slack for example)?

Think I found it, uncheck the simplfy switch. Any suggestion on how to make this text readable again lol? :slight_smile:

Hi @Liepiecie, I am not 100% sure what you’re looking for here. How does your current dataset look like and how should your readable version look like?

Hi @MutedJam,
when I collect the email sequence. I have only been able to forward the sequence in html format keeping it still readable. Pushing this towards slack I haven’t been able to do because it turns into normal text. making it way to much text.
So I was thinking maybe I can save it as a html package or something and then forward it into slack.

I’m just guessing here, basically my main goal is to be able to forward a mailing sequence keeping its format intact using slack.

Another idea I had of which I can’t find the appropriate node is to save the sequence as a Html file on google drive and then put the link in the slack notification.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.