DEV Community

Alex Kane
Alex Kane

Posted on

Repurpose one blog post into Twitter thread, LinkedIn post & email teaser with n8n (free JSON)

If you create content — blog posts, newsletters, tutorials — you know the pain: you write a great 2,000-word piece, then spend another hour manually rewriting it as a Twitter thread, a LinkedIn post, and an email teaser.

I automated all of that with a 5-node n8n workflow. One form submission → AI generates 5 content variants in seconds.

Here's the full workflow JSON, free.


What it does

  1. Form Trigger — paste a blog post URL or raw text, select your brand voice (Professional / Casual / Witty / Educational)
  2. Code node — detects if input is URL or raw text, passes it forward
  3. AI Generate Variants — sends content to GPT-4o-mini with a structured prompt returning JSON: twitter (3 tweet options), tweetThread (5-tweet thread), linkedin (professional post), instagram (caption + hashtags), emailSnippet (newsletter teaser)
  4. Parse Results — extracts the structured JSON
  5. Save to Sheets — logs all variants to Google Sheets for review before publishing

Total cost per run: ~$0.001 with GPT-4o-mini.


Full workflow JSON

Import this directly into n8n (copy → New Workflow → Import from clipboard):

{
  "name": "Content Repurposer (AI)",
  "nodes": [
    {
      "parameters": {
        "formTitle": "Repurpose Content",
        "formFields": { "values": [
          { "fieldLabel": "Blog Post URL or Text", "fieldType": "textarea", "requiredField": true },
          { "fieldLabel": "Brand Voice", "fieldType": "dropdown", "fieldOptions": { "values": [{ "option": "Professional" }, { "option": "Casual" }, { "option": "Witty" }, { "option": "Educational" }] } }
        ]}
      },
      "id": "cr1", "name": "Content Input", "type": "n8n-nodes-base.formTrigger", "typeVersion": 2.2, "position": [240, 300]
    },
    {
      "parameters": {
        "jsCode": "const input = $input.first().json['Blog Post URL or Text'];\nconst isUrl = input.startsWith('http');\nreturn [{ json: { content: input, isUrl, voice: $input.first().json['Brand Voice'] || 'Professional' } }];"
      },
      "id": "cr2", "name": "Detect Input Type", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [460, 300]
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.openai.com/v1/chat/completions",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={ \"model\": \"gpt-4o-mini\", \"messages\": [{ \"role\": \"system\", \"content\": \"You are a social media content expert. Return JSON with: { twitter: [3 tweet options max 280 chars each], tweetThread: [5-tweet thread], linkedin: [1 professional post], instagram: [1 caption with hashtags], emailSnippet: [1 newsletter teaser]. Voice: {{ $json.voice }}\" }, { \"role\": \"user\", \"content\": \"{{ $json.content.substring(0, 4000) }}\" }], \"response_format\": {\"type\": \"json_object\"} }"
      },
      "id": "cr3", "name": "AI Generate Variants", "type": "n8n-nodes-base.httpRequest", "typeVersion": 4.2, "position": [700, 300]
    },
    {
      "parameters": {
        "jsCode": "const result = JSON.parse($input.first().json.choices[0].message.content);\nreturn [{ json: { ...result, generatedAt: new Date().toISOString() } }];"
      },
      "id": "cr4", "name": "Parse Results", "type": "n8n-nodes-base.code", "typeVersion": 2, "position": [940, 300]
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": { "__rl": true, "value": "YOUR_SHEET_ID", "mode": "id" },
        "sheetName": { "__rl": true, "value": "RepurposedContent", "mode": "name" },
        "columns": { "mappingMode": "autoMapInputData" }
      },
      "id": "cr5", "name": "Save to Sheets", "type": "n8n-nodes-base.googleSheets", "typeVersion": 4.5, "position": [1180, 300]
    }
  ],
  "connections": {
    "Content Input": { "main": [[{ "node": "Detect Input Type", "type": "main", "index": 0 }]] },
    "Detect Input Type": { "main": [[{ "node": "AI Generate Variants", "type": "main", "index": 0 }]] },
    "AI Generate Variants": { "main": [[{ "node": "Parse Results", "type": "main", "index": 0 }]] },
    "Parse Results": { "main": [[{ "node": "Save to Sheets", "type": "main", "index": 0 }]] }
  },
  "settings": { "executionOrder": "v1" }
}
Enter fullscreen mode Exit fullscreen mode

Setup (5 minutes)

  1. Import the JSON into n8n
  2. Add your OpenAI credential (API key in n8n Credentials)
  3. Create a Google Sheet called RepurposedContent and connect Google Sheets credential
  4. Replace YOUR_SHEET_ID with your sheet ID (from the URL)
  5. Activate workflow, open the Form URL, paste your blog post

Pro tips

Auto-post instead of logging to Sheets
Replace the Google Sheets node with HTTP Request nodes to the Twitter/X API, LinkedIn API, or Buffer. The AI already formats content correctly per platform.

Add a URL fetcher
If you want to paste a URL instead of raw text, add an HTTP Request node after "Detect Input Type" to fetch the page content, then strip HTML with a Code node before the AI step.

Batch repurpose your content calendar
Trigger from a Google Sheets row instead of a form. Loop through a column of blog post URLs every Monday and fill your content calendar for the week automatically.

Customize the AI prompt
Easy to edit directly in the HTTP Request node body. Add brand-specific instructions: "Always mention our product", "Never use exclamation marks", "Write in first person".

Rate limiting
GPT-4o-mini returns 5 variants in about 3 seconds. For batch runs, add a Wait node set to 2 seconds between iterations.


What comes out

For a blog post about "why automation saves time for freelancers":

  • twitter[0]: "I spent 3 hours per week manually posting content. Then I automated it. Here is what changed"
  • tweetThread: 5 connected tweets walking through the argument with a CTA at the end
  • linkedin: 4-paragraph professional post — hook, story, lesson, CTA
  • instagram: Caption with emojis and 15 relevant hashtags ready to paste
  • emailSnippet: "This week I want to share how I reclaimed 3 hours every week..."

All in about 3 seconds, for $0.001.


If you want the pre-built version with setup guide already configured, I packaged this (and 14 other n8n automation templates) at stripeai.gumroad.com as the FlowKit bundle. But the JSON above is fully functional — you just need to wire up credentials.

What are you repurposing? Drop a comment — happy to help adapt the prompt for your use case.

Top comments (0)