Gmail Trigger + 1 Min Poll Time | Misses Multiple Emails

The Gmail Trigger has been working great! But I do miss some incoming emails with the one-minute polling I believe?

Is there a way to ensure I don’t miss emails when they start coming in at a high volume?

Hi @Revive_Operations :wave: Welcome to the community!

You can’t go under 60 seconds, as Cron has a 60 sec granularity - so even if you used a custom option, you wouldn’t be able to generate a Cron expression to support this :see_no_evil:

Can you give an example of how many messages you’ve missed, and the volume of emails you’re receiving when the trigger does not fire? Can you share your example workflow, as well? If you select all the nodes in your editor and then hit ctrl/cmd + c, you’ll be able to copy and paste that over to the forums! Just make sure you put the code between two sets of three backticks (```).

Also, any of the information that we request in the template would be helpful to know. That information would be:

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

Thanks! I have phone call notifications coming into my Gmail inbox. We get around 300 calls a day. So, we can miss 1-2 if there are multiple calls coming at the same time.

n8n version: 0.236.3 (Latest Stable)

n8n cloud

…This is embarrassing but I couldn’t get the workflow to paste the right way haha so here is a screenshot below.

The phone call info is emailed to our Lead Sender Inbox, then fields are set - from there, it searches if it is a lead or contact to update in Zoho. If not, it makes a lead.

It sends an email notification to our Lead Reciever Inbox (That we look at) if it’s a new lead, missed call, or voicemail with the Zoho and Call info link.

Hi @Revive_Operations - no worries :slight_smile: That’s also quite a large workflow, and I think the culprit may be closer to the beginning. Would you happen to have any filters on your Gmail trigger node? Filters would look like this:

Hi @EmeraldHerald! I do. I have a Search Filter based on a phrase and Unread Emails only.

@Revive_Operations I wonder if there’s some false positives happening :thinking: Have you tried without the filter to see if this still happens? It might be worth a short test :bowing_man:

hey I’m having this same issue. My gmail node is missing several notifications would increasing the polling interval help?

Hi @Lindsay_Williams and @Revive_Operations :wave:

Increasing the polling time is actually likely to make the problem worse :see_no_evil: The Gmail trigger doesn’t seem to use pagination, but the Gmail node does.

A workaround here could be to use another workflow on a one-minute interval with the Gmail node, looking for a label for unread, and ensuring that “Return all” is selected. As a workflow it would look like this:

{
  "meta": {
    "instanceId": "cb9c144f2050b3f9b30bf379399398f9061341e3665eb2faf2b1092a42b38b14"
  },
  "nodes": [
    {
      "parameters": {
        "operation": "addLabels"
      },
      "id": "2307a003-f664-4fbe-96ff-7451978725a9",
      "name": "Mark as read",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2,
      "position": [
        1260,
        460
      ],
      "credentials": {
        "gmailOAuth2": {
          "id": "1",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes"
            }
          ]
        }
      },
      "id": "5f50a458-89dc-42f7-976c-323117a41940",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.1,
      "position": [
        820,
        460
      ]
    },

You’d want a Schedule node, followed by a Gmail node to fetch unread messages, and then another Gmail node to mark these messages as read to prevent them from being processed again. Here’s some screenshots of the configuration:

Schedule:

First Gmail node:

Second Gmail node:

Let me know if that helps!

wow! Thanks for the response I will try the above.
Another question though, would setting up Gmail’s Push Notifications via Google Cloud Pub/Sub help solve this problem?

Hi @Lindsay_Williams! I feel like that should work, but I’ve never personally set up Gmail push notifications, so I can’t say for certain. You might want to take a look at the limitations section here, too.

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