Answer document questions via webhook with Anthropic Claude
Ready for 3.0What this workflow does
This workflow has 6 nodes and runs when an HTTP POST request hits its webhook URL. It uses only n8n's built-in nodes. It also calls api.anthropic.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Load and Chunk Docs (Code): runs custom JavaScript code
- Retrieve Top Chunks (Code): runs custom JavaScript code
- Claude Grounded Answer (HTTP Request): calls api.anthropic.com (POST)
- Parse and Guard (Code): runs custom JavaScript code
- Send Answer (Respond to Webhook): sends the response back to the webhook caller
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 (4)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick Overview This workflow exposes a webhook for document Q&A by chunking pasted docs, retrieving the most relevant sections via keyword scoring, and sending the selected excerpts to Anthropic Claude to generate a grounded, cited answer returned as JSON.…