Menu

Your automation ran twice. Here's how to make n8n and Make workflows safe to retry
📰

Your automation ran twice. Here's how to make n8n and Make workflows safe to retry

DEV Community: api·Manoj Kumar·1 day ago
#cJiIF0g2
#devtoapi#devto#dev#retry#every
Reading 0:00
15s threshold

Every automation builder meets this bug eventually. A form submission comes in, the workflow creates a CRM contact, sends a welcome email, and makes a Drive folder. Then someone messages you: "Why does this lead exist three times, and why did they get two welcome emails?"

Nothing was "broken". A webhook was delivered twice, or an API call timed out after it had already succeeded, and the retry did the work again. Retries are a feature. Duplicates are what you get when the workflow isn't built to be retried.

Here is the pattern I use when I build n8n and Make workflows so a run can happen twice, or fail halfway and be replayed, without doing anything twice.

Why duplicates happen

Three causes cover almost every case I've seen:

At-least-once delivery. Most webhook senders retry if they don't get a fast 2xx. If your workflow does slow work before answering, the sender gives up waiting and sends the same event again.

Timeouts after success.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.