top of page

No max tokens limit in n8n

  • Feb 12
  • 1 min read

Updated: Feb 13

What this means (non-technical)


If you do not set a maximum token limit for an AI node, the model can generate very long responses. The AI will continue generating until it reaches its internal limit or decides to stop.


You are charged for all generated tokens.

What usually goes wrong


Without a limit:


  • A short task may produce a very long response.

  • Costs become unpredictable.

  • Workflows take longer to finish.

  • Large outputs may break downstream nodes expecting shorter text.


This is especially risky inside loops or high-volume workflows.


You lose cost control and response predictability.

When this becomes urgent


This becomes urgent when:


  • The workflow runs frequently.

  • The AI output is not tightly constrained.

  • You operate under a fixed AI budget.

  • Long outputs cause downstream processing issues.


The more calls you make, the more unpredictable spending becomes.

Detect issues in your n8n workflows

Upload your JSON to detect if any issue is present in your workflow

Definitions


  1. max_tokens: A setting that limits how many tokens an AI model can generate in its response.


  2. Context window: The maximum amount of text an AI model can process or produce in a single request.

Disclaimer


This article highlights common patterns and risks seen in real-world n8n workflows. It’s meant to help you build more confidently and avoid surprises as your automation grows. Behavior can vary depending on your setup, version, and configuration.

Related Posts

See All
Execution progress saving enabled in n8n

What this means (non-technical) Execution progress saving stores intermediate steps while a workflow is running. This stores intermediate state during execution, which can affect how workflow interrup

 
 
Timeout not configured in n8n

What this means (non-technical) If a workflow has no execution timeout configured, it can run indefinitely. If something gets stuck, there is nothing to automatically stop it. These long-running execu

 
 
Unthrottled loop HTTP in n8n

What this means (non-technical) This happens when an HTTP Request node sits inside a loop and sends requests as fast as possible. For every item, the workflow immediately makes another external API ca

 
 
bottom of page