Templates / Batch process prompts with Anthropic Claude API

Batch process prompts with Anthropic Claude API

Ready for 3.0

by Greg Evseev ✓ · 2,255 views · created 2025-04-02 · Engineering, Multimodal AI

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 27 nodes and runs when another workflow calls it (plus 1 other trigger). It uses only n8n's built-in nodes. It also calls api.anthropic.com over HTTP.

How it runs

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

  1. Submit batch (HTTP Request): calls api.anthropic.com (POST)
  2. One query example (Edit Fields (Set)): sets 1 field: query
  3. Truncate Chat Memory (Chat Memory Manager): uses Chat Memory Manager, with memory: Simple Memory
  4. If: checks a condition and branches into true / false
  5. Append execution data for single query example (Edit Fields (Set)): sets 3 fields: custom_id, model, max_tokens
  6. Fill Chat Memory with example data (Chat Memory Manager): uses Chat Memory Manager, with memory: Simple Memory
  7. Get results (HTTP Request): calls an HTTP API
  8. Batch Status Poll Interval (Wait): waits 10 seconds
  9. Build batch 'request' object for single query (Code): runs custom JavaScript code
  10. Load Chat Memory Data (Chat Memory Manager): uses Chat Memory Manager, with memory: Simple Memory

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

HTTP calls to: api.anthropic.com

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 (15)

From the author

This workflow template provides a robust solution for efficiently sending multiple prompts to Anthropic's Claude models in a single batch request and retrieving the results. It leverages the Anthropic Batch API endpoint (/v1/messages/batches) for optimized…

Excerpt from Greg Evseev'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.