Answer Document Questions via Webhooks with Anthropic Claude
Answer Document Questions via Webhooks with Anthropic Claude
Regular price
£10.99
Regular price
£10.99
Sale price
Unit price
/
per
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
Couldn't load pickup availability
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Answer Document Questions via Webhooks with Anthropic Claude
Regular price
£10.99
Regular price
£10.99
Sale price
Unit price
/
per
Ask questions about your own documents—instantly—using an n8n webhook and Anthropic Claude
This workflow exposes a production-ready POST webhook that lets you send a question and receive a grounded, cited answer as JSON. It works by chunking your pasted documents, selecting the most relevant excerpts, and having Anthropic Claude answer strictly from the provided text.
What this workflow does
- Receives a webhook request (POST) containing JSON with a question.
-
Loads & chunks your documents from the workflow’s
DOCSarray, splitting content into sections by##headings. - Retrieves relevant excerpts by scoring all sections using keyword overlap with the question, keeping the top-matching excerpts.
- Calls Anthropic Claude via the Anthropic Messages API, sending the question plus the retrieved text and instructing Claude to answer only from the provided excerpts and cite each claim.
-
Responds to the webhook caller with
{ "answer": ..., "sources": ... }, including the selected section names as sources.
Use cases
- Document Q&A for internal teams: ask policy, procedure, or documentation questions and get cited answers.
- SaaS operator support: route customer-facing documentation questions to a webhook-driven answer flow.
-
Automation engineering: embed “ask-your-docs” behavior into other apps by posting
{ "question": "..." }. - Reduce hallucinations: require Claude to rely only on excerpts selected from your provided documents.
Technical details
- Nodes/steps used: code (chunking/scoring), webhook, sticky note, http request, respond to webhook.
-
Anthropic integration: configure HTTP Header Auth with
x-api-key, and sendanthropic-version: 2023-06-01. -
Webhook endpoint: use the production webhook URL for
/ask-your-docsand POST a JSON body like{ "question": "..." }.
Setup note: paste your documents into the workflow’s DOCS array and use ## headings to create citeable sections.
