Trigger on delay on a Gmail label

I have a scheduled trigger that checks email label on Gmail.
Basically what I’m doing is marking email leads that are not responsive with a label.

And then basically I clean up and close and delete the contact.

It’s fine but instead of using a schedule so it does every hour, I want to do something along the lines of if I have marked it as dead for at least three days then do the rest of the program.

Basically I am going to be sending in last email and then marking the email as hopeless. 90% of the chance is they will not respond to that email but if they do then I have to open up again. This is the reason I want this delay for about 3 days.

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:

I can think of two approaches:

  1. Store the thread ID with a timestamp externally - in a database or a Google Sheet. Use this information in a second workflow to trigger actions after three days.
  2. Use a Wait node with a three day delay. This will resume your workflow after three days.

Thanks I’ll try to wait node, will it cause excessive CPU usage while waiting? I might have two or three waiting at any one time I guess. It’s running on a Synology ds920

It won’t - long waits are stored in the database. From the docs:

Time-based operations#

For the time-based resume operations, note that:

  • For wait times less than 65 seconds, the workflow doesn’t offload execution data offloaded to the database. Instead, the process continues to run and execution resumes after the specified interval passes.
1 Like

How’s this

Top gets the emails with the label and waits for three days

after that can triggers another check of the labels which is added into a list
merge together so the can check whether the original id is still in the list after 3d

and then do the actual thing if TRUE

Looks like it should work - you can test by setting the wait > 65 seconds so they’ll get stored in the database.

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