Gmail Autoreply Workflow sent 50 emails to the same person

@Kemal_Automation Thanks for your answers!

The workflow begins with a trigger that is set to hourly intervals, so there is plenty of time for it to register the action of marking as read. Those emails were sent to the same email with different weird intervals over a week or so

Thank you so much @achamm !

It looks like something that will help!

Your welcome! Hope it works!

@Arsen, how’s that issue going?
Did you manage to solve it? Let me know if your instance is on v 2.23 and if you can share your json without the sensitive data :blush:

One pattern worth adding on top of the mark-as-read approach: store each processed messageId in a Google Sheet (or use n8n’s workflow static data) and check it at the start of every run before doing anything. Even if the Gmail read/write has a timing glitch, the deduplication check catches it.

The flow would be: fetch emails → for each message, check if its ID already exists in your log → skip if yes, otherwise send the reply and add the ID to the log. This makes the workflow idempotent regardless of what Gmail’s read state says. Static data is the simplest option if you don’t want an external store - $getWorkflowStaticData('global').processedIds as an array you push to after each successful reply.

Hello @Arsen!

The unread filter is the problem. When n8n replies to the thread, Gmail marks that reply as a new unread message, so your trigger picks up the same thread again the next hour and the loop continues.

Fix: add a Gmail “Add Label” node after the reply step, apply a label likeauto-replied, then exclude that label in your trigger filter. That way each thread gets processed once, no matter what happens to the read/unread state.

On the deactivating nodes thing, that doesn’t stop the workflow trigger; it just skips those nodes. You need to unpublish the whole workflow to stop it, which you already did.