How I handle flaky third party API responses in n8n without breaking my workflow
Been building lead gen workflows in n8n for a while and the biggest silent killer is third party APIs returning unexpected responses. Your workflow shows green but your Google Sheet is full of empty rows or broken data.
Here's the pattern that fixed it for me:
1. Never trust HTTP status codes alone
A 200 response doesn't mean success. Always check the response body too. Add an IF node after every HTTP Request that checks for an error field in the JSON before passing data downstream.
2. Build for the unhappy path first
Before you build the happy path, ask: what happens if this API returns null, times out, or changes its schema? Map those failure routes explicitly in your workflow.
3. Use APIs that return consistent schemas
The best third party APIs always return the same shape regardless of success or failure. For example SiteEnrich always returns 200 with an error field on failures — dns_failed, timeout, site_blocked — so your workflow never hits an unexpected response shape.
4. Cache normalized domain names
Before hitting any enrichment API normalize your input. Strip www, force lowercase, handle trailing slashes. Bad input is responsible for more failures than bad APIs.
5. Log everything
Add a Google Sheets append node on failure branches. Every failed enrichment gets logged with the input URL and error. You'll spot patterns fast.
What patterns have you found useful for handling unreliable APIs in n8n?