Block 1 - Submit batch
- Type / Role
- n8n-nodes-base.httpRequest - httpRequest
- Config choices
- Version 4.2
This workflow is provided as-is. Please review and test before using in production.
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 Anthro...
n8n-nodes-base.httprequest, n8n-nodes-base.executeworkflowtrigger, n8n-nodes-base.code, n8n-nodes-base.if, n8n-nodes-base.stickynote, n8n-nodes-base.wait, n8n-nodes-base.manualtrigger, n8n-nodes-base.set
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Greg Evseev.
Original n8n.io sourceThis 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 processing and outputs each result as a separate item.
Core Functionality & Example Usage Included
This template includes:
This template is designed for:
Sending prompts to language models one by one can be slow and inefficient, especially when dealing with hundreds or thousands of requests. This workflow addresses that by:
/v1/messages/batches).Use Cases:
(Triggered by the 'When Executed by Another Workflow' node)
anthropic-version (string, e.g., "2023-06-01")requests (JSON array, where each object represents a single prompt request conforming to the Anthropic Batch API schema).requests data via POST to the Anthropic API /v1/messages/batches endpoint to create a new batch job. Requires Anthropic credentials.processing_status of the batch job is ended.ended, it waits for a set interval (10 seconds by default in the 'Batch Status Poll Interval' node).GET to /v1/messages/batches/{batch_id}. Requires Anthropic credentials.ended.GET request to the results_url provided in the batch status response. Requires Anthropic credentials..jsonl) format. The 'Parse response' Code node splits the response text by newlines and parses each line into a separate JSON object, storing them in an array field (e.g., parsed).@n8n/n8n-nodes-langchain) if you plan to adapt that part.Submit batchCheck batch statusGet results
In each of these nodes, select the Anthropic credential you just configured from the 'Credential for Anthropic API' dropdown.When Executed by Another Workflow trigger node. The primary inputs are anthropic-version (string) and requests (array). Refer to the Sticky Notes in the template and the Anthropic Batch API documentation for the exact schema required within the requests array.➡️ Quick Start & Input/Output Examples: Look for the Sticky Notes within the workflow canvas! They provide crucial information, including examples of the required input JSON structure and the expected output format.
anthropic-version and requests array and then uses the 'Execute Workflow' node to trigger this template. The included example branch shows how to prepare this data.claude-3-opus-20240229, etc.), max_tokens, temperature, and other parameters are defined within each object inside the requests array you pass to the workflow trigger. You configure these in the workflow calling this template.batch.status === 'failed').This template also contains a separate branch starting with the Run example Manual Trigger node.
anthropic-version and requests array payload.@n8n/n8n-nodes-langchain).Execute Workflow node to call the main batch processing logic described above. It finishes by filtering the results for demonstration.anthropic-version header in your requests, as shown in the workflow and examples. Refer to Anthropic API versioning documentation.This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
Showing the first 24 of 39 workflow blocks. Download the JSON for the full node graph.
| Workflow | Batch process prompts with Anthropic Claude API |
|---|---|
| Complexity | advanced |
| Nodes | 39 |
| Categories | Engineering, Multimodal AI |
| Author | Greg Evseev |
| Published | 02 Apr 2025 |
Use the JSON export at /data/workflows/3409/3409.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
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 Anthro...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, Multimodal AI use case.