Templates / Generate text via a validated webhook with Anthropic Claude and Slack

Generate text via a validated webhook with Anthropic Claude and Slack

Ready for 3.0

by 鈴木光輝(Koki Suzuki):JP ✓ · 2 views · created 2026-08-10 · Content Creation, 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 workflow has 14 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.

  1. Validate input & apply defaults (Code): runs custom JavaScript code
  2. Input valid? (If): checks a condition and branches into true / false
  3. Build Claude request body (Code): runs custom JavaScript code
  4. Respond: validation error (Respond to Webhook): sends the response back to the webhook caller
  5. Call Claude (Anthropic) API (HTTP Request): calls api.anthropic.com (POST)
  6. Call succeeded? (If): checks a condition and branches into true / false
  7. Format success response (Code): runs custom JavaScript code
  8. Format upstream error response (Code): runs custom JavaScript code
  9. Respond: generated text (Respond to Webhook): sends the response back to the webhook caller
  10. Set: Slack webhook URL (Edit Fields (Set)): sets 1 field: slackWebhookUrl

…plus 3 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 (6)

From the author

Quick overview This workflow exposes a POST webhook that validates prompt inputs, calls the Anthropic Claude Messages API with retries, returns a consistent JSON response, and posts a preview of the generated text to Slack using an Incoming Webhook. How it…

Excerpt from 鈴木光輝(Koki Suzuki):JP'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.