DEV Community

HaoPeng Zhang
HaoPeng Zhang

Posted on

I built a free n8n workflow that writes scroll-stopping content hooks

Hook writing is the highest-leverage 15 minutes in content. If the first line doesn't stop the scroll, nothing else gets read. I kept rewriting the same hook prompts by hand, so I automated it with n8n + OpenAI (gpt-4o-mini).

Here's the workflow, why it's structured this way, and how to run it in 2 minutes.

What it does

You give it a topic, audience, and tone. It returns 10 hooks across 5 proven styles:

  • Curiosity gap
  • Contrarian take
  • Specific result / number
  • Mistake / warning
  • Story opening

Why a workflow and not just "ask ChatGPT"

  1. Repeatable — same input gives the same format every time, so you stop re-prompting.
  2. Batchable — run a whole week of posts in one execution.
  3. Composable — the output feeds a scheduler, a sheet, or your CMS.

The 4 nodes

  1. Form Trigger — collects topic, audience, tone.
  2. OpenAI (gpt-4o-mini) — a system prompt that enforces 5 styles x 2 variants.
  3. Code node — splits the output and tags each hook with its style.
  4. Output — a clean list you can copy or push downstream.

The one prompt trick that matters

Ask for styles, not "good hooks". "Write 10 hooks" gives you 10 flavours of the same sentence. Specifying 5 distinct styles forces range. The core system prompt:

You are a direct-response copywriter. For the topic and audience given,
write 10 hooks: 2 each in these styles — curiosity gap, contrarian,
specific result/number, mistake/warning, story opening.
Each hook <= 12 words. No hashtags. Use emojis only if tone=playful.
Return a numbered list with the style label in brackets.
Enter fullscreen mode Exit fullscreen mode

That single constraint is the difference between a generic list and something you can actually post.

Try it

The workflow is free and MIT-licensed — same engine I use before hooks go into a repurposing pipeline.

If you want the rest of the pipeline — turning one piece into a week of posts, AI inbox triage, or an SEO blog engine — they live here: https://payhip.com/haopengailab

Building this in public. If the setup notes or sticky notes are unclear, tell me and I'll fix them.

Top comments (0)