Pull Emails For Multiple Accounts

Our platform allows users to connect their inboxes, giving us access to run some processing over their new emails.
We currently batch query every few minutes for any new emails, but want to switch to live pulling of those emails.

We really like the n8n gmail trigger: you can connect one inbox, and when an email comes into that inbox, the node gets triggered within a minute.

However, we’d like to be able to connect all our users’ inboxes: when an email comes into any of their inboxes, we’d like to kick off a workflow. One gmail trigger, that is triggered from multiple auth methods / credentials, that can be added programatically.

What do you recommend for this?
I found similar questions (number 1, number 2), but don’t feel like there’s a definitive solution yet.

Thanks!

1 Like

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hi @user1, thanks for reaching out!

You have a couple of options here to achieve similar functionality to what you are describing.

The first idea that comes to mind is to continue doing as you have done - polling your emails users’ inboxes at regular intervals and checking for an email before executing the rest of your workflow.

The second idea is to set up forwarding rules on all user inboxes that feed into a main inbox which you can connect to the gmail trigger.

Neither of those are exactly as you were hoping for but should achieve similar functionality. Let me know how it goes!

1 Like

Ah thanks!
For option 1, there’s no way to do that programmatically through n8n, right? We have to manage the polling on our own?

Our users have all given us oath / ability to poll, but we just don’t know programmatically how to add multiple users’ auth to one n8n workflow to use the n8n gmail trigger.

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