Skip to product information

Claude Text Generator Webhook with Slack Preview (n8n)

Claude Text Generator Webhook with Slack Preview (n8n)

 (200+Reviews)
Regular price £65.99
Regular price £65.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
âš¡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
Claude Text Generator Webhook with Slack Preview (n8n)

Claude Text Generator Webhook with Slack Preview (n8n)

Regular price £65.99
Regular price £65.99 Sale price
SAVE Sold out

Generate Claude text from an n8n webhook—then preview it in Slack

This n8n workflow exposes a POST webhook that sends your userPrompt to the Anthropic Claude Messages API, returns a consistent JSON response with usage metadata, and automatically posts a short Slack preview of the generated text via a Slack Incoming Webhook.

What this workflow does

  • Receives requests: Listens for a POST call on its webhook endpoint with a JSON body containing userPrompt (and optional generation settings).
  • Validates inputs: Checks that userPrompt is present and applies defaults for model, maxTokens, and temperature. If validation fails, it returns a 400 JSON error.
  • Calls Claude with retries: Sends the prompt to https://api.anthropic.com/v1/messages using the Anthropic Claude Messages API, with automatic retries for transient failures.
  • Returns consistent results: On success, extracts the generated text and responds with a 200 JSON payload that includes the generated output plus usage metadata.
  • Posts to Slack: After a successful Claude call, publishes a short preview of the generated text to Slack using an Incoming Webhook.
  • Error handling: If Claude fails after retries, it returns a structured 502 JSON error to the webhook caller.

Use cases

  • SaaS backends that need on-demand Claude text generation triggered by API calls.
  • Automation engineers building reliable AI endpoints with validation, retry logic, and clear error responses.
  • Teams who want human-readable visibility through a quick Slack preview of what Claude generated.

Technical details

  • n8n nodes/workflow logic: webhook, if, set, code, http request, plus workflow notes (sticky note).
  • Integrations: Anthropic Claude Messages API (HTTP request to /v1/messages) and Slack Incoming Webhook.
  • Setup: Configure an Anthropic API credential in n8n, paste your Slack webhook URL into the workflow, and send POST requests with JSON including userPrompt.
View full details