Logo de Debug Workflow

Debug Workflow

Comunidade
masteranime
debug-workflow

Systematically debug failing n8n workflows — expression errors, node type mismatches, pinned data issues, sub-workflow failures, authentication problems, rate limit errors, and silent data loss. Use this skill whenever the user reports an n8n workflow problem — phrases like "my n8n workflow is failing", "this expression isn't working", "why is this node returning empty", "debug this error", "n8n execution log shows", "workflow runs but no output". Also use when pasted error messages reference n8n concepts (ItemLists, expressions, credentials). Apply this skill before guessing a fix — n8n failures have specific diagnostic patterns, and guessing typically makes the problem worse.

Visão geral

Publicado pormasteranime
Repositórion8n-claude-skills
Nome da habilidadedebug-workflow
Estrelas
34
Forks
8
Arquivos incluídos
Somente instruções
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    Habilidades de IA são Markdown simples, não código específico de um provedor, por isso funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Completa em si mesma

    Tudo de que o modelo precisa está nas instruções — sem arquivos extras para sincronizar.

  • Código aberto

    Publicada por masteranime no GitHub. Leia o conteúdo-fonte antes de instalar.

Instalação

Instale a habilidade de IA Debug Workflow no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL da pasta da habilidade exibida abaixo e confirme.
    https://github.com/masteranime/n8n-claude-skills/tree/main/skills/debug-workflow
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Nova habilidade → Via URL GitHub, depois cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/masteranime/n8n-claude-skills.git /tmp/n8n-claude-skills
mkdir -p .claude/skills
cp -r /tmp/n8n-claude-skills/skills/debug-workflow .claude/skills/debug-workflow
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Debug Workflow em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Debug Workflow automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Debug Workflow não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

n8n Workflow Debugging

Fix n8n workflows the way a senior engineer does — systematically, not by guessing.

Triage: identify the failure class first

Ask the user (or infer from error text) which class:

ClassSymptomCommon root causes
Expression errorCannot read property X of undefined, red node badgeWrong expression syntax, missing = prefix, accessing undefined fields
Type mismatchExpected string, got array, downstream weirdnessItem Lists vs single item confusion, Split In Batches output shape
Silent emptyWorkflow runs green but no output/side effectFilter condition wrong, pinned stale data, credential scope
Auth failure401, 403, Invalid API keyWrong credential selected, expired token, OAuth refresh not configured
Rate limitIntermittent 429, works manually, fails in batchNo backoff, batch too large, shared credential across workflows
Sub-workflowExecute Workflow returns nothing or errorsParameters not passed, return value not set, wrong workflow ID

Expression errors

The single biggest footgun: ={{ $json.field }} vs {{ $json.field }}. The leading = makes the field an expression. Without it, the literal string {{ $json.field }} is sent.

Check:

  1. Click the field — does it show the "expression" toggle (fx icon) highlighted? If not, it's literal mode.
  2. In code-view JSON, the value should start with =: "value": "={{ $json.id }}"

Accessing undefined paths: $json.customer.email throws if customer is null. Use optional chaining: $json.customer?.email ?? 'unknown'.

Referencing earlier nodes: Use $('Node Name').item.json.field, NOT $node['Node Name'].json.field (deprecated). Quote exact node name including spaces.

Common expression patterns:

javascript
// Array access
{{ $json.items[0].name }}
{{ $json.items?.[0]?.name ?? 'empty' }}

// Previous node output
{{ $('Webhook').item.json.body.email }}

// All items from previous node (for loops)
{{ $('Split In Batches').all().map(i => i.json.id) }}

// Conditional
{{ $json.amount > 100 ? 'high' : 'low' }}

// Date formatting (n8n uses Luxon)
{{ $now.toISO() }}
{{ $now.minus({ days: 7 }).toFormat('yyyy-MM-dd') }}

// Environment vars (self-hosted)
{{ $env.MY_SECRET }}

Type mismatch diagnosis

n8n passes data as an array of items, each with { json: {...}, binary: {...} }. Many bugs come from treating a single item as an array or vice versa.

Inspection routine:

  1. Open the failing node's input view (left panel)
  2. Check: is it ONE item with an array inside ({ json: { list: [...] } }), or MULTIPLE items ([ { json: {} }, { json: {} } ])?
  3. These require different handling:
    • Array-inside-one-item → use Item Lists → "Split Out Items" to fan out
    • Already multiple items → operate per-item

Split In Batches outputs different shapes on main vs "done" outputs — the main output is a batch, the done output is empty. Wire accordingly.

Silent empty — the worst kind

Workflow shows green checkmarks but nothing happened downstream. Diagnostic order:

  1. Check execution data retention. Settings → "Save data successful executions" must be "All" during debugging, not "None".
  2. Inspect each node's output. Click each node → "Output" panel. Find the first one that's empty when you expected data.
  3. Pinned data? If a node has a pin icon, it's returning pinned test data, NOT real data. Right-click → Unpin Data.
  4. Filter / IF conditions. An IF evaluating false silently skips the branch. Check the condition value at runtime.
  5. Credential scope. Google/Microsoft OAuth credentials often have limited scopes. A "Google Sheets" credential won't let you read Gmail. Re-auth with correct scopes.

Authentication failures

  • 401 on a previously-working workflow → token expired. Re-authenticate the credential.
  • 401 immediately on a new workflow → wrong credential type. E.g., "Header Auth" vs "OAuth2" — check the API's docs.
  • 403 with valid token → missing scope OR wrong account. OAuth credentials are per-account; confirm you authed with the right Google/Meta account.

Self-hosted n8n specific: if a credential suddenly stops working after a container restart, check that the encryption key (N8N_ENCRYPTION_KEY env var) is persisted. Losing it = all credentials corrupt.

Rate limit failures

Symptom: works on 10 items, fails on 100. Classic.

Fix pattern:

  1. Wrap the API call in Split In Batches with batchSize matching the vendor's per-second limit
  2. Add Wait node between batches: waitBetweenBatches: ceil(60000 / requests_per_minute)
  3. Set retry.maxTries: 3 with retry.waitBetweenTries: 5000 on the HTTP Request node
  4. Check response headers (X-RateLimit-Remaining, Retry-After) and dynamically back off via a Code node

For cron-triggered workflows hitting the same vendor from multiple cron jobs, centralize the API call in ONE sub-workflow with a semaphore pattern (MySQL row as lock).

Sub-workflow failures

Execute Workflow returns null or undefined most often because:

  1. Parent didn't pass data. Check "Workflow Inputs" in the Execute Workflow node — must reference {{ $json }} or explicit fields.
  2. Child didn't set output. The LAST node in the sub-workflow's output becomes the return value. If the last node is a MySQL insert returning nothing, parent gets nothing. Add a final Set node that constructs the return payload.
  3. Wrong workflow ID. Sub-workflow got deleted and recreated → new ID → reference stale.

Reading n8n execution logs

Execution log shows per-node input and output. Debug pattern:

  1. Find the first failing node (red).
  2. Look at ITS input (left). Is the shape what you expected?
  3. If input is wrong, the bug is UPSTREAM — trace back.
  4. If input is right but output is wrong/error, the bug is IN THIS NODE — check parameters.

Most bugs are upstream shape issues masquerading as downstream errors. The error message lies about where the bug is.

Quick-fix checklist for common cases

  • Expression not interpolating → add leading =
  • Node says "No items to process" → upstream IF is filtering everything, or previous node returned empty
  • Google Sheets append inserting duplicates → no unique constraint, add idempotency check (see mysql-checkpointing skill)
  • LLM returns garbage JSON → switch from raw HTTP to Information Extractor with schema (see chain-llm-pattern)
  • Webhook times out → move heavy work behind Respond to Webhook (respond first, process async)

When stuck

Ask the user for:

  1. Screenshot of the execution log (the red-bordered panel)
  2. The exact error message (copy-paste from the node)
  3. The node's parameters (settings tab, JSON view if possible)
  4. Whether this ever worked before (regression vs new bug)

Don't guess without these. n8n errors are specific — vague guesses waste time.

Perguntas frequentes

O que a habilidade de IA Debug Workflow faz?

Systematically debug failing n8n workflows — expression errors, node type mismatches, pinned data issues, sub-workflow failures, authentication problems, rate limit errors, and silent data loss. Use this skill whenever the user reports an n8n workflow problem — phrases like "my n8n workflow is failing", "this expression isn't working", "why is this node returning empty", "debug this error", "n8n execution log shows", "workflow runs but no output". Also use when pasted error messages reference n8n concepts (ItemLists, expressions, credentials). Apply this skill before guessing a fix — n8n fa...

Por que usar Debug Workflow no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. Debug Workflow é escrito em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. O TypingMind usa suas próprias chaves de API, então o pagamento é feito diretamente aos provedores, em vez de uma assinatura por licença de usuário, e suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Debug Workflow no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/masteranime/n8n-claude-skills/tree/main/skills/debug-workflow. O TypingMind lê o arquivo SKILL.md e instala a habilidade para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Debug Workflow?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Debug Workflow?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Debug Workflow com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Debug Workflow é gratuita?

Sim. A habilidade é publicada no GitHub por masteranime sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, modelos de documento ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas para chamar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA fornece conhecimento e um processo ao modelo: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver todos

Crie seu próprio espaço de IA agora

Inscreva-se na nossa newsletter para receber novidades sobre recursos e futuros sorteios 👇