whatisgithub

What is n8n-at-scale-snippets?

ryuk-builds/n8n-at-scale-snippets — explained in plain English

Analysis updated 2026-05-18

4JavaScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

Production-ready n8n snippets: a Gemini chat-history fixer and a queue-and-retry webhook pattern for reliable workflows.

Mindmap

mindmap
  root((n8n-at-scale-snippets))
    What it does
      Fixes chat history bug
      Dead-letter queue pattern
    Tech stack
      JavaScript
      n8n workflows
      Redis streams
    Use cases
      Fix Gemini agent errors
      Reliable webhook processing
      AI-assisted workflow design
    Audience
      n8n users
      Automation developers
    Design
      Production tested
      MIT licensed

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Fix Gemini function-call errors caused by broken chat history in an n8n AI agent workflow.

USE CASE 2

Set up a webhook that responds instantly while queueing and safely retrying failed work.

USE CASE 3

Use the included prompts to get an AI assistant to generate more production-ready n8n workflows.

What is it built with?

JavaScriptn8nRedis

How does it compare?

ryuk-builds/n8n-at-scale-snippetsamirmahdavi2023/d1-adminanil-matcha/open-poe-ai
Stars444
LanguageJavaScriptJavaScriptJavaScript
Last pushed2026-06-25
MaintenanceActive
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

The dead-letter workflow needs Redis (or a Postgres queue table swap) and a notification webhook URL configured.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

So what is it?

This repository is a small collection of code snippets and workflow patterns for people running n8n, a visual workflow automation tool, in a real production setting rather than just for demos. It was shared as a companion to a set of Reddit posts, and everything in it is meant to be dropped directly into an existing n8n setup. The first piece is a script meant to run inside a Code node in n8n. It fixes a specific error that shows up when using Google's Gemini as the language model behind an AI agent: Gemini expects every function call to be immediately followed by its matching function response in the conversation history, and if that pairing gets broken, for example by a crashed previous run or by messages arriving out of order during batch processing, Gemini rejects the whole request. The script cleans up the stored conversation history before it reaches the AI agent so that pairing is always intact, and if the history is empty or too broken to fix, it simply returns an empty history rather than crashing the workflow. The second piece is a ready to import n8n workflow implementing a common reliability pattern: a webhook that responds immediately to whoever called it, while the actual payload is pushed onto a queue and processed separately on a short timer. If processing a queued item fails, it gets moved to a separate failure queue and a notification is sent, and there is a manual workflow for retrying those failed items once the underlying problem is fixed. A third folder contains a system prompt, a rules document, and example prompts intended to help someone use an AI assistant like Claude to generate n8n workflows that are built to production standards, rather than the simpler, more fragile workflows an AI might produce by default. The author states both main snippets were pulled from real workflows they have run in production, with names and paths cleaned up before sharing. Everything in the repository is released under the MIT license.

Copy-paste prompts

Prompt 1
Explain how the sanitize-chat-history.js script fixes the Gemini function-call pairing error.
Prompt 2
Walk me through importing the dead-letter-webhook.n8n.json workflow into my n8n instance.
Prompt 3
Show me how to adapt the dead-letter pattern to use Postgres instead of Redis Streams.
Prompt 4
Use the ai-generated-workflows prompts to help me design a production-shaped n8n workflow.

Frequently asked questions

What is n8n-at-scale-snippets?

Production-ready n8n snippets: a Gemini chat-history fixer and a queue-and-retry webhook pattern for reliable workflows.

What language is n8n-at-scale-snippets written in?

Mainly JavaScript. The stack also includes JavaScript, n8n, Redis.

What license does n8n-at-scale-snippets use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is n8n-at-scale-snippets to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is n8n-at-scale-snippets for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.