So I have a gmail tigger, which only polls once a day because typically the mail I need to process only arrives once a day. There are however situations, where I’d like to trigger/poll at irregular times. Now I can open the workflow and click execute, but ideally, I’d like to be able to trigger it (regardless of the cron time setting on the node) with a webhook.
Just adding a webhook node to that flow doesn’t work and using a separate flow with a webhook and an execute workflow node doesn’t work either.
Is there any other way to accomplish this (without setting the poll time to kind of expensive every 5 minutes)?
Hi @Armin_M, that’s a very good question actually. These polling triggers behave different when executed manually, so calling the n8n CLI through an Execute Command node wouldn’t work either.
So I think the only approach that would truly work here is a secondary workflow waiting for your webhook which when called updates your primary workflow with a shorter polling time, then waits for at least one polling interval to pass before restoring the original polling time.
That’s a lot of complexity though. Perhaps instead you want to re-consider the use of the Gmail trigger here and switch to the regular Gmail node triggered by a Schedule node instead? Something like this:
This approach easily allows you to introduce additional triggers as needed, including the webhook node.