Templates / Retry flaky HTTP calls with Google Gemini and Google Sheets dead letters

Retry flaky HTTP calls with Google Gemini and Google Sheets dead letters

Ready for 3.0

by Oka Hironobu ✓ · 3 views · created 2026-08-13

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 17 nodes and runs when another workflow calls it (plus 1 other trigger). Along the way it connects Google Sheets and Google Gemini Chat Model.

How it runs

Trigger: When another workflow calls it (plus 1 other trigger).

  1. Start the Attempt Counter (Code): runs custom JavaScript code
  2. Load the Dead Letter Register (Google Sheets): uses Google Sheets
  3. Call the Service (HTTP Request): calls an HTTP API
  4. Pick What Is Worth Another Try (Code): runs custom JavaScript code
  5. Report Success (Code): runs custom JavaScript code
  6. Triage the Failure (Basic LLM Chain): sends a prompt to an LLM, with model: Gemini for Triage; output parser: Triage Schema
  7. Was This a Replay (If): checks a condition and branches into true / false
  8. Count It and Decide (Code): runs custom JavaScript code
  9. Close It in the Register (Google Sheets): append or update
  10. Retry or Give Up (Switch): routes items into 2 branches

…plus 3 more steps. See the full node list below.

Services it uses

Google SheetsGoogle Gemini Chat Model

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (11)

From the author

Quick Overview This workflow makes unreliable HTTP requests safer by using Google Gemini to classify failures, retry only transient errors with exponential backoff, and log non-retriable or exhausted failures to a Google Sheets dead-letter register that is…

Excerpt from Oka Hironobu's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.