Gmail trigger don’t working

Describe the issue/error/question

Good morning

I started using the Gmail trigger. I asked the trigger to fire every minute for testing.

Strangely, I do not see any execution is visible in the history. I have activated the recording of logs in the workflow settings.

I have the impression that the trigger is not triggered. what should I check?

I just tested with a CRON node.
I tell myself that I do not see any execution of the workflow because the Trigger did not retrieve any emails, therefore no start of the Workflow.
Is this reason?

What is the error message (if any)?

I have no errors. I have no history.


Please share the workflow

Share the output returned by the last node

No response because no automatic execution

Information on your n8n setup

  • n8n version: 0.211.1
  • Database you’re using (default: SQLite): Postgresql
  • Running n8n with the execution process [own(default), main]: main
  • Running n8n via [Docker, npm, n8n.cloud, desktop app]: k8s

Hi @Ronald_Diquelou, welcome to the community :tada:

Polling trigger nodes wouldn’t result in a new execution for each polling interval. Only when a message is actually received, a new execution would be triggered.

Hello @MutedJam, what do you mean by saying that “Only when a message is actually received, a new execution would be triggered”?

I have a problem with Gmail trigger, that it does not retreive email when workflow is active.
In logs (with debug level) I see:

2023-03-20T10:39:39.020Z | debug    | Polling trigger initiated for workflow "Invoices1" "{\n  workflowName: 'Invoices1',\n  workflowId: '11',\n  file: 'ActiveWorkflows.js',\n  function: 'executeTrigger'\n}",
2023-03-20T10:39:39.033Z | debug    | Proxying request to axios "{ file: 'NodeExecuteFunctions.js', function: 'proxyRequestToAxios' }",
2023-03-20T10:40:03.668Z | debug    | Wait tracker querying database for waiting executions "{ file: 'WaitTracker.js', function: 'getWaitingExecutions' }"

When I execute Gmail trigger node manually or using fetch test data - it return email.

How can I know if pooling works as excepted?

Thanks, pascon

what do you mean by saying that “Only when a message is actually received, a new execution would be triggered”?

The trigger only fetches new messages arriving after the workflow has been activated. Not the old messages you might see when manually executing it.

How can I know if pooling works as excepted?

If you want more transparency or control you can simply use the regular Gmail node instead of the trigger node. Using the regular node you can then fetch all unread messages, including the older ones which the trigger wouldn’t receive.

Ahh now I get it. Your response is the clue! Maybe adding this to the documentation will be a good idea, as now it don’t mention this.

After inspecting code I omitted this line:

Thanks!
pascon

1 Like

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