---
title: "Webhook that writes a blog, newsletter or social post"
kind: "Kit"
category: "Writing"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/ff41f5fa-a4fa-4eae-818c-483e55929ebe"
updated: "2026-11-12"
---

# Webhook that writes a blog, newsletter or social post

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow behind a web address. Send it a topic and a type, Claude writes a blog post, a newsletter issue or three social posts, and the workflow returns the draft as JSON and posts a preview to Slack.

Webhook that writes a blog, newsletter or social post is an n8n workflow in the Writing category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow turns a web request into a draft. A caller posts a topic and a content type to a webhook. A Code node picks one of three prompts, Claude writes the draft, and the workflow answers with it as JSON. A short preview also goes to a Slack channel. Five nodes do the work, and none of them is a sticky note.

### Who it suits

Marketers, solo creators and developers who want a draft on demand from a form, a script or another tool. Skip it if you want to read a draft before anyone else sees it. As imported, the preview reaches Slack at once.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Marketing | Content leads | Post a topic from a form and get a first draft back | A lead sends “five ways to cut meeting time” as a newsletter and edits what returns. |
| Agencies | Account managers | Ask for three social posts for each client topic | A manager posts one launch topic and gets Twitter/X, LinkedIn and Instagram versions. |
| Software | App builders | Call the webhook from their own app or a script | A developer adds a Write draft button that posts to the webhook. |
| Publishing | Editors | Get a blog draft to rewrite | An editor asks for a post of about 600 words on a local event. |

You need a little n8n: import a file, set two environment values and send a test request.

### Where to use it

Any n8n that can reach Anthropic’s API and Slack will run it. The draft comes back in the webhook’s answer, so plan what calls it.

- n8n Cloud: import the file into a new workflow there
- Your own n8n server: the same file and steps
- A form or a script: post JSON to the webhook’s production address
- Slack: a channel gets the topic, the type and the first 500 characters

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. The key and the Slack path are read from the server’s environment.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server of your own |
| Anthropic | An API key, read as \`ANTHROPIC\_API\_KEY\` |
| Slack | An incoming webhook, whose path after \`https://hooks.slack.com/services/\` is read as \`SLACK\_WEBHOOK\_PATH\` |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. Give n8n the key and the Slack path. Set `ANTHROPIC_API_KEY` and `SLACK_WEBHOOK_PATH` as environment variables on the server, or replace the two `$env` expressions in `Generate Content` and `Notify via Slack` with the values.
3. Save, open `Trigger Webhook` and copy its test address.
4. Send a POST there with a JSON body such as `{"topic": "Five ways to cut meeting time", "type": "newsletter"}`.
5. Read the draft in the answer, then press Publish and use the production address.

### How to use it

Post JSON with a `topic`, a `type` of `blog`, `newsletter` or `social`, and if you like a `language` and a `tone`. The workflow answers with `status`, `topic`, `contentType` and `content`. Without a topic it writes a blog post on AI automation trends.

What to change for a different result

| To change | Where |
| --- | --- |
| The three prompts | The \`prompts\` object in \`Build Prompt\` |
| The defaults | The first lines of \`Build Prompt\`: topic, type, language and tone |
| The model and the length | \`model\` and \`max\_tokens\` in \`Generate Content\` |
| The Slack preview | The text in \`Notify via Slack\`, or delete the node |

### Example

A content lead posts a topic of “Five ways to cut meeting time”, a type of `newsletter` and a tone of “friendly”.

The reply is JSON. Its `content` holds the newsletter the prompt asks for: a subject line, a hook, three insights, one tip and a sign-off. Slack gets the topic, the type and the first 500 characters of the draft.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one runs in a line: the webhook, the prompt, Claude, then a branch to Slack and a branch back to the caller. Send one request, then open `Build Prompt` to read the prompt it made.

**For experts.** Claude and Slack are called with plain HTTP requests whose JSON bodies are filled by expressions.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Build Prompt\` | Reads \`topic\`, \`type\`, \`language\` and \`tone\` from the request body | A \`type\` outside the three falls back to the blog prompt |
| \`Generate Content\` | Posts to \`https://api.anthropic.com/v1/messages\` with \`claude-sonnet-4-6\` | Up to 2,000 tokens and a fixed system line, with the key read from \`$env\` |
| \`Notify via Slack\` | Posts a text and two blocks to the Slack webhook | It sits above \`Return Content\`, so it runs first |
| \`Return Content\` | Answers the caller with the draft | Respond to Webhook 1 with a JSON body |

### Good to know

The key and the Slack path are not in the file, and a failed Slack call stops the answer.

- Models: Anthropic’s deprecations page, read on 12 November 2026, lists \`claude-sonnet-4-6\` as active, with a retirement date no sooner than 17 February 2027
- Repairs: the original copy read the request from the wrong place, so every run used the default topic, and its three JSON bodies broke on any line break or quote. Mindket’s copy reads the request body and escapes each value
- Slack first: \`Notify via Slack\` runs before \`Return Content\`. When its path is wrong or empty, the run stops there and the caller gets no draft. Fix the path or delete the node
- Open webhook: it has no authentication, so anyone who finds the address can start a run on your key. Turn on one of the Webhook node’s authentication options before you share it
- Billing: each run is one Claude call of up to 2,000 tokens
- Your data: the topic goes to Anthropic, and the topic with the first 500 characters of the draft goes to Slack
- Credentials: the JSON holds none

## README

````markdown
# Webhook that writes a blog, newsletter or social post

An n8n workflow behind a web address. You send it a POST with a topic and the kind of text you want. Claude writes a full
blog post, a newsletter issue or three social posts, the workflow answers with the draft as JSON, and a short preview goes to
a Slack channel.

## What is inside

- `workflow.json`: the workflow as n8n exports it, five nodes, none of them a sticky note. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- `Build Prompt` read the request as `$input.first().json`. A Webhook node hands over the call as `headers`, `params`, `query`
  and `body`, so `topic`, `type`, `language` and `tone` were never found and every run wrote about the default topic. It now
  reads `$input.first().json.body`.
- The three JSON bodies (the Claude request, the Slack message and the answer) placed raw text between quotes. A prompt with a
  line break stops the request at Claude, and a draft with a line break or a quote breaks the other two. Each value now goes
  through `JSON.stringify(...).slice(1, -1)`.
- The webhook ID is gone.
- Nothing else. The key, the Slack path and the model are the file's own.

## Before you start

- An n8n instance, on n8n Cloud or your own server.
- An Anthropic API key, and a Slack incoming webhook (its address ends in a path after `https://hooks.slack.com/services/`).
- A way to set two environment variables on the n8n server, or a willingness to type the values into the nodes.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. Give n8n the key and the Slack path. The file reads them as `{{ $env.ANTHROPIC_API_KEY }}` in the `x-api-key` header of
   `Generate Content`, and as `{{ $env.SLACK_WEBHOOK_PATH }}` in the address of `Notify via Slack`. Set both as environment
   variables on the server, or replace each expression with the value itself.
3. Save, open `Trigger Webhook` and copy its test address. Send a POST with a JSON body (the examples are below).
4. When the draft looks right, publish the workflow and use its production address.

A test call:

```
{
  "topic": "Five ways to cut meeting time",
  "type": "newsletter",
  "language": "English",
  "tone": "friendly"
}
```

`type` is `blog`, `newsletter` or `social`. Without a topic the workflow writes about "AI automation trends", in
`blog` form, in English, with a professional but approachable tone.

## How a run goes

1. `Trigger Webhook` (Webhook 2) takes the POST and waits for the answer to come from a Respond to Webhook node.
2. `Build Prompt` (Code) picks `topic`, `type`, `language` and `tone` from the body. It then chooses one of three prompts:
   a blog post of about 600 words, a newsletter issue of about 300 words, or three social posts for Twitter/X, LinkedIn and
   Instagram.
3. `Generate Content` posts the prompt to `https://api.anthropic.com/v1/messages` with `claude-sonnet-4-6`, up to 2,000 tokens
   and a system line that asks for useful, engaging writing.
4. `Notify via Slack` posts the topic, the type and the first 500 characters of the draft to your Slack webhook.
5. `Return Content` answers the caller with `status`, `topic`, `contentType` and `content`.

## Change the look

- The three prompts: the `prompts` object in `Build Prompt`.
- The defaults: `topic`, `contentType`, `language` and `tone` at the top of the same node.
- The model and the length: `model` and `max_tokens` in `Generate Content`.
- The preview: the text in `Notify via Slack`. Delete the node to skip Slack.

## Good to know

- Anthropic's deprecations page, read on 12 November 2026, lists `claude-sonnet-4-6` as active, with a retirement date no
  sooner than 17 February 2027.
- `Notify via Slack` runs before `Return Content`, since it sits higher on the canvas. When the Slack address is wrong or
  empty the run stops there and the caller gets no draft. Delete the node, or fix the path, first.
- A `type` other than the three falls back to the blog prompt.
- The webhook has no authentication. Anyone who finds the address can start a run on your key, so turn on one of the Webhook
  node's authentication options before you share it.
- Each run is one Claude call of up to 2,000 tokens.
- The topic goes to Anthropic. Slack gets the topic and the start of the draft.
````

## What is in it

3 files, 11 KB, downloaded as a zip.

```text
NOTICE.md  586 B
README.md  4 KB
workflow.json  6 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 5 steps, starting when its webhook is called
- AI: No step calls an AI model
- Sign-ins: No sign-in
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 4 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/ff41f5fa-a4fa-4eae-818c-483e55929ebe)
- [Its page on Mindket](https://mindket.com/p/ff41f5fa-a4fa-4eae-818c-483e55929ebe)
