<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: HaoPeng Zhang</title>
    <description>The latest articles on DEV Community by HaoPeng Zhang (@haopengai).</description>
    <link>https://dev.to/haopengai</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4164360%2F2aa98251-dda3-41a5-810c-e9ed9ec8b41f.png</url>
      <title>DEV Community: HaoPeng Zhang</title>
      <link>https://dev.to/haopengai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/haopengai"/>
    <language>en</language>
    <item>
      <title>Writing content hooks is hard — so I automated it with n8n (free template, now in the official n8n gallery)</title>
      <dc:creator>HaoPeng Zhang</dc:creator>
      <pubDate>Tue, 06 Oct 2026 16:28:42 +0000</pubDate>
      <link>https://dev.to/haopengai/writing-content-hooks-is-hard-so-i-automated-it-with-n8n-free-template-now-in-the-official-n8n-4hd6</link>
      <guid>https://dev.to/haopengai/writing-content-hooks-is-hard-so-i-automated-it-with-n8n-free-template-now-in-the-official-n8n-4hd6</guid>
      <description>&lt;p&gt;Writing the hook is the hardest 5% of a piece of content. You can have a great idea and still lose the reader in the first sentence.&lt;/p&gt;

&lt;p&gt;I got tired of staring at a blank first line, so I built a small n8n workflow that turns a topic + audience + tone into &lt;strong&gt;10 ready-to-use hooks&lt;/strong&gt;. It just got accepted into the &lt;strong&gt;official n8n template gallery&lt;/strong&gt;, so you can install it directly inside n8n.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Input:&lt;/strong&gt; a topic, a target audience, and a tone.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Output:&lt;/strong&gt; 10 short hooks in mixed styles, returned as JSON.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That's four nodes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Manual Trigger&lt;/li&gt;
&lt;li&gt;Edit Fields (Set) → your topic / audience / tone&lt;/li&gt;
&lt;li&gt;OpenAI (GPT-4o-mini)&lt;/li&gt;
&lt;li&gt;Output → the &lt;code&gt;hooks&lt;/code&gt; field&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The one trick that matters
&lt;/h2&gt;

&lt;p&gt;Most people prompt &lt;em&gt;"write me 10 good hooks."&lt;/em&gt; That is exactly why the output feels generic — &lt;strong&gt;"good" is not a spec.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead, the prompt writes hooks &lt;strong&gt;by style&lt;/strong&gt;. Each style forces a different angle:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Contrarian — "Everything you know about X is wrong"&lt;/li&gt;
&lt;li&gt;Curiosity gap — "Nobody talks about the part of X that actually matters"&lt;/li&gt;
&lt;li&gt;Result-first — "I cut X from 6 hours to 20 minutes"&lt;/li&gt;
&lt;li&gt;Story — "Three weeks ago I almost quit X"&lt;/li&gt;
&lt;li&gt;Question — "What if X is the reason your Y isn't working?"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Ten hooks, five styles, two each. Instant variety, zero blank-page anxiety.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sample run
&lt;/h2&gt;

&lt;p&gt;Topic: &lt;code&gt;AI automations for small teams&lt;/code&gt; · Audience: &lt;code&gt;busy founders&lt;/code&gt; · Tone: &lt;code&gt;direct&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1. I replaced 3 SaaS subscriptions with one n8n workflow.
2. Nobody tells founders that the AI you actually need is boring.
3. Your team doesn't have an AI problem. It has a copy-paste problem.
4. Two weeks ago our Monday report took 4 hours. Now it's a Slack ping.
5. What if the automation you keep avoiding is a 20-minute build?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Install it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Official n8n template:&lt;/strong&gt; &lt;a href="https://n8n.io/workflows/20418-generate-social-content-hooks-with-openai-gpt-4o-mini/" rel="noopener noreferrer"&gt;https://n8n.io/workflows/20418-generate-social-content-hooks-with-openai-gpt-4o-mini/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub (MIT, importable JSON):&lt;/strong&gt; &lt;a href="https://github.com/zhp910318/n8n-ai-automation-lab" rel="noopener noreferrer"&gt;https://github.com/zhp910318/n8n-ai-automation-lab&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Free download plus more templates at my store: &lt;a href="https://payhip.com/haopengailab" rel="noopener noreferrer"&gt;https://payhip.com/haopengailab&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Steps: open the template → connect your OpenAI credential → set topic / audience / tone → run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bonus: what I learned getting a template approved
&lt;/h2&gt;

&lt;p&gt;If you publish to the n8n gallery, two things trip people up:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sticky notes are reviewed by hand.&lt;/strong&gt; Use section headers like &lt;code&gt;## 1. Trigger and input&lt;/code&gt;, give them a color, and size them to cover the nodes they describe.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Setup section needs real length&lt;/strong&gt; (50+ words). Write it for a stranger, not for yourself.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The review runs AI pass → human pass. Mine came back once with notes, I fixed them, and it went live.&lt;/p&gt;

&lt;h2&gt;
  
  
  If you would rather not build it
&lt;/h2&gt;

&lt;p&gt;The free workflow handles hooks. The paid ones handle the rest of the pipeline — content repurposing, inbox triage, and SEO blog generation — and are all on the store. If you want any of it wired into your own stack, I do fixed-price done-for-you builds.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I automated my inbox triage with n8n + GPT-4o-mini (copy the exact workflow)</title>
      <dc:creator>HaoPeng Zhang</dc:creator>
      <pubDate>Tue, 06 Oct 2026 00:06:45 +0000</pubDate>
      <link>https://dev.to/haopengai/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow-5ef6</link>
      <guid>https://dev.to/haopengai/i-automated-my-inbox-triage-with-n8n-gpt-4o-mini-copy-the-exact-workflow-5ef6</guid>
      <description>&lt;h2&gt;
  
  
  Inbox zero is a lie. Triage is the real skill.
&lt;/h2&gt;

&lt;p&gt;You don't need an empty inbox. You need to know which 12 of your 200 unread emails actually need you today — and which ones can die quietly.&lt;/p&gt;

&lt;p&gt;I got tired of scanning my inbox every morning, so I built a small &lt;strong&gt;n8n + GPT-4o-mini&lt;/strong&gt; workflow that reads new mail, sorts every message into one of four buckets, and drafts a reply for the ones that need one. It runs on a schedule, costs pennies, and takes about 15 minutes to set up.&lt;/p&gt;

&lt;p&gt;Here's the whole thing — plus the one design decision that made it actually usable.&lt;/p&gt;

&lt;h2&gt;
  
  
  The idea: force a fixed taxonomy
&lt;/h2&gt;

&lt;p&gt;The first version I built asked the model "is this email important?" It was useless. Every email came back "somewhat important."&lt;/p&gt;

&lt;p&gt;The fix was to stop asking for a judgement and start asking for a &lt;strong&gt;single label from a fixed taxonomy&lt;/strong&gt;. Four buckets, no hedge, no score:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Reply today&lt;/strong&gt; — a real human is waiting on a decision or an answer.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task, not today&lt;/strong&gt; — actionable, but it belongs in a to-do list, not your face right now.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Read later&lt;/strong&gt; — newsletters, FYIs, things worth a skim.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Noise&lt;/strong&gt; — promos, cold outreach, notifications you'll never open.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;One label per email. That's it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The prompt (this is the whole trick)
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;You are an inbox triage assistant. Read the email below and return &lt;strong&gt;exactly one&lt;/strong&gt; of these labels on the first line: &lt;code&gt;REPLY_TODAY&lt;/code&gt;, &lt;code&gt;TASK_LATER&lt;/code&gt;, &lt;code&gt;READ_LATER&lt;/code&gt;, &lt;code&gt;NOISE&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Only use &lt;code&gt;REPLY_TODAY&lt;/code&gt; if a specific person is blocked on your answer.&lt;/li&gt;
&lt;li&gt;Marketing, cold sales, and automated notifications are always &lt;code&gt;NOISE&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If you choose &lt;code&gt;REPLY_TODAY&lt;/code&gt; or &lt;code&gt;TASK_LATER&lt;/code&gt;, write a one-sentence draft reply (max 40 words) on the second line, in the sender's language, in a friendly professional tone.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Subject: {{ $json.subject }}&lt;br&gt;
From: {{ $json.from }}&lt;/p&gt;

&lt;p&gt;Body:&lt;br&gt;
{{ $json.snippet }}&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Two things matter here: &lt;strong&gt;the label set is closed&lt;/strong&gt;, and the draft is only generated for the two buckets that need one. That keeps token usage (and cost) low.&lt;/p&gt;

&lt;h2&gt;
  
  
  The 4 nodes
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Schedule Trigger&lt;/strong&gt; — every weekday at 08:00.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Gmail → Get Many Messages&lt;/strong&gt; — filter &lt;code&gt;in:inbox is:unread newer_than:1d&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;OpenAI (GPT-4o-mini)&lt;/strong&gt; — the prompt above, text mode, temperature 0.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Router → Gmail / Sheets&lt;/strong&gt; — &lt;code&gt;REPLY_TODAY&lt;/code&gt; gets starred + draft attached; &lt;code&gt;TASK_LATER&lt;/code&gt; gets appended to a Google Sheet; the rest get labeled and archived.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's a real workflow, not a toy. The router is just a &lt;code&gt;Switch&lt;/code&gt; node on the first line of the model's output.&lt;/p&gt;

&lt;h2&gt;
  
  
  3 rules that made it usable
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Temperature 0.&lt;/strong&gt; Classification should be boring and repeatable, not creative.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Send the snippet, not the full body.&lt;/strong&gt; The model doesn't need a 40-line signature block to know an email is a newsletter — and it halves your token bill.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Never auto-send.&lt;/strong&gt; The workflow &lt;em&gt;drafts&lt;/em&gt;. You still tap send. That single decision is the difference between a helpful assistant and a horror story.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Want it without rebuilding it?
&lt;/h2&gt;

&lt;p&gt;Rebuilding this from scratch (Gmail OAuth, the filter, the parser, the router) is the boring part. I packaged the polished version as a ready-to-import n8n template:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AI Inbox Triage &amp;amp; Reply Drafter&lt;/strong&gt; — the workflow above, fully wired, with the router and the Sheets log: &lt;strong&gt;&lt;a href="https://payhip.com/b/W0mLE" rel="noopener noreferrer"&gt;https://payhip.com/b/W0mLE&lt;/a&gt;&lt;/strong&gt; ($24)&lt;/li&gt;
&lt;li&gt;Want a taste first? My &lt;strong&gt;free AI Hook Generator&lt;/strong&gt; workflow (turn any topic into scroll-stopping hooks) is free to download: &lt;strong&gt;&lt;a href="https://payhip.com/b/ulER8" rel="noopener noreferrer"&gt;https://payhip.com/b/ulER8&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;All the free templates + copy-paste JSON live in this MIT repo: &lt;strong&gt;&lt;a href="https://github.com/zhp910318/n8n-ai-automation-lab" rel="noopener noreferrer"&gt;https://github.com/zhp910318/n8n-ai-automation-lab&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;More workflows: &lt;strong&gt;&lt;a href="https://payhip.com/haopengailab" rel="noopener noreferrer"&gt;https://payhip.com/haopengailab&lt;/a&gt;&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Triage your inbox once, and you'll never go back to scanning.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>automation</category>
      <category>productivity</category>
      <category>opensource</category>
    </item>
    <item>
      <title>I built a free n8n workflow that writes scroll-stopping content hooks</title>
      <dc:creator>HaoPeng Zhang</dc:creator>
      <pubDate>Mon, 05 Oct 2026 16:06:39 +0000</pubDate>
      <link>https://dev.to/haopengai/i-built-a-free-n8n-workflow-that-writes-scroll-stopping-content-hooks-5571</link>
      <guid>https://dev.to/haopengai/i-built-a-free-n8n-workflow-that-writes-scroll-stopping-content-hooks-5571</guid>
      <description>&lt;p&gt;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 (&lt;code&gt;gpt-4o-mini&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;Here's the workflow, why it's structured this way, and how to run it in 2 minutes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What it does
&lt;/h2&gt;

&lt;p&gt;You give it a topic, audience, and tone. It returns 10 hooks across 5 proven styles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Curiosity gap&lt;/li&gt;
&lt;li&gt;Contrarian take&lt;/li&gt;
&lt;li&gt;Specific result / number&lt;/li&gt;
&lt;li&gt;Mistake / warning&lt;/li&gt;
&lt;li&gt;Story opening&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why a workflow and not just "ask ChatGPT"
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Repeatable&lt;/strong&gt; — same input gives the same &lt;em&gt;format&lt;/em&gt; every time, so you stop re-prompting.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Batchable&lt;/strong&gt; — run a whole week of posts in one execution.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Composable&lt;/strong&gt; — the output feeds a scheduler, a sheet, or your CMS.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  The 4 nodes
&lt;/h2&gt;

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

&lt;h2&gt;
  
  
  The one prompt trick that matters
&lt;/h2&gt;

&lt;p&gt;Ask for &lt;strong&gt;styles&lt;/strong&gt;, not "good hooks". "Write 10 hooks" gives you 10 flavours of the same sentence. Specifying 5 distinct styles forces range. The core system prompt:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;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 &amp;lt;= 12 words. No hashtags. Use emojis only if tone=playful.
Return a numbered list with the style label in brackets.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That single constraint is the difference between a generic list and something you can actually post.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;p&gt;The workflow is free and MIT-licensed — same engine I use before hooks go into a repurposing pipeline.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Free n8n workflow (JSON + README): &lt;a href="https://payhip.com/b/ulER8" rel="noopener noreferrer"&gt;https://payhip.com/b/ulER8&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Repo with copy-paste examples: &lt;a href="https://github.com/zhp910318/n8n-ai-automation-lab" rel="noopener noreferrer"&gt;https://github.com/zhp910318/n8n-ai-automation-lab&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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: &lt;a href="https://payhip.com/haopengailab" rel="noopener noreferrer"&gt;https://payhip.com/haopengailab&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Building this in public. If the setup notes or sticky notes are unclear, tell me and I'll fix them.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
      <category>automation</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
