{
  "name": "Blog Post → 5 Platform Social Posts (Free by AiMe)",
  "nodes": [
    {
      "parameters": {
        "content": "## 📌 HOW THIS WORKFLOW WORKS\n\n1. **Trigger:** Manual or webhook — paste a blog post URL\n2. **Scrape:** Pulls the blog post content via HTTP\n3. **Extract:** Set node cleans the raw HTML into readable text\n4. **AI Section:** Five separate OpenAI calls, each with platform-specific prompts\n5. **Aggregate:** Merges all 5 outputs into one clean JSON object\n6. **Output:** Returns/saves all 5 posts ready to copy-paste\n\n**What you need:**\n- OpenAI API key (set up an n8n credential called \"OpenAI API\")\n- The blog post URL you want to repurpose\n\n**Cost per run:** ~$0.02–0.05 with GPT-4o-mini",
        "height": 340,
        "width": 440,
        "color": 7
      },
      "id": "sticky-001",
      "name": "HOW IT WORKS",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [0, -200]
    },
    {
      "parameters": {
        "content": "## ✏️ EDIT THESE\n\n- **URL field:** The blog post URL\n- **Your brand voice:** Edit the `brand_voice` field below\n- **OpenAI model:** Change `gpt-4o-mini` to `gpt-4o` for better quality (costs ~5x more)\n\n**Optional upgrades:**\n- Connect a Google Sheets node after Step 6 to save all posts automatically\n- Add a Telegram/Slack node to deliver posts to yourself\n- Swap the Manual Trigger for a Webhook to automate from your CMS",
        "height": 260,
        "width": 380,
        "color": 4
      },
      "id": "sticky-002",
      "name": "EDIT THESE",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [460, -200]
    },
    {
      "parameters": {
        "content": "## 🐦 PLATFORM OUTPUTS\n\n1. **Twitter/X** — Single punchy tweet with hook + 3 key points + CTA (≤280 chars)\n2. **LinkedIn** — Professional 150-word post, ends with a question\n3. **Instagram** — Visual-first caption, 2-3 sentences + 10 hashtags\n4. **TikTok/Reels** — 3-part video script: hook (5s) + content (30s) + CTA (5s)\n5. **Threads** — Conversational 3-post mini-thread\n\nAll outputs land in one clean JSON object — easy to copy or pipe into your scheduler.",
        "height": 240,
        "width": 400,
        "color": 5
      },
      "id": "sticky-003",
      "name": "OUTPUTS",
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [860, -200]
    },
    {
      "parameters": {
        "fields": {
          "values": [
            {
              "name": "blog_url",
              "stringValue": "https://your-blog.com/your-post-url"
            },
            {
              "name": "brand_voice",
              "stringValue": "Direct, no fluff, slightly irreverent. Speak to content creators and solopreneurs. Use active voice. No corporate speak."
            },
            {
              "name": "author_handle",
              "stringValue": "@YourHandle"
            }
          ]
        },
        "options": {}
      },
      "id": "node-001",
      "name": "⚙️ Config — Set Your URL Here",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [240, 300]
    },
    {
      "parameters": {
        "url": "={{ $json.blog_url }}",
        "options": {
          "redirect": {
            "redirect": {
              "followRedirects": true,
              "maxRedirects": 5
            }
          },
          "response": {
            "response": {
              "responseFormat": "text"
            }
          },
          "timeout": 15000
        }
      },
      "id": "node-002",
      "name": "📥 Fetch Blog Post HTML",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [460, 300]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "raw_text",
              "name": "raw_text",
              "value": "={{ $json.data.replace(/<script[^>]*>.*?<\\/script>/gis, '').replace(/<style[^>]*>.*?<\\/style>/gis, '').replace(/<nav[^>]*>.*?<\\/nav>/gis, '').replace(/<footer[^>]*>.*?<\\/footer>/gis, '').replace(/<header[^>]*>.*?<\\/header>/gis, '').replace(/<[^>]+>/g, ' ').replace(/\\s+/g, ' ').trim().substring(0, 8000) }}",
              "type": "string"
            },
            {
              "id": "blog_url",
              "name": "blog_url",
              "value": "={{ $('⚙️ Config — Set Your URL Here').item.json.blog_url }}",
              "type": "string"
            },
            {
              "id": "brand_voice",
              "name": "brand_voice",
              "value": "={{ $('⚙️ Config — Set Your URL Here').item.json.brand_voice }}",
              "type": "string"
            },
            {
              "id": "author_handle",
              "name": "author_handle",
              "value": "={{ $('⚙️ Config — Set Your URL Here').item.json.author_handle }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "node-003",
      "name": "🧹 Extract Text (Strip HTML)",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [680, 300]
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You write viral Twitter/X posts. You understand hooks, punchy writing, and getting people to click. You never use hashtags in the middle of posts — only optionally at the very end. You never start with 'I' or 'Just' or 'Excited to share'."
            },
            {
              "role": "user",
              "content": "=Write ONE tweet (max 280 characters) based on this blog post.\n\nBrand voice: {{ $json.brand_voice }}\n\nBlog URL: {{ $json.blog_url }}\n\nBlog content:\n{{ $json.raw_text }}\n\nRules:\n- Start with a strong hook — a surprising fact, a bold claim, or a question\n- Include the 1 most valuable insight from the post\n- End with the blog URL and a 1-word CTA like \"→\"\n- Max 280 characters including the URL\n- Do NOT use hashtags in the body (max 2 at the end if relevant)\n- Return only the tweet text, nothing else"
            }
          ]
        },
        "options": {}
      },
      "id": "node-004",
      "name": "🐦 AI: Write Twitter Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 120],
      "credentials": {
        "openAiApi": {
          "id": "1",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You write LinkedIn posts that actually get engagement — not corporate drivel. Your posts are personal, direct, and end with a genuine question that invites discussion. No buzzwords. No 'I'm thrilled to announce.' No 3-dot dramatic reveals."
            },
            {
              "role": "user",
              "content": "=Write a LinkedIn post based on this blog post.\n\nBrand voice: {{ $('🧹 Extract Text (Strip HTML)').item.json.brand_voice }}\n\nBlog URL: {{ $('🧹 Extract Text (Strip HTML)').item.json.blog_url }}\n\nBlog content:\n{{ $('🧹 Extract Text (Strip HTML)').item.json.raw_text }}\n\nRules:\n- 150-200 words max\n- Professional but human — write like a smart person talking to peers, not a brand\n- Lead with the most interesting insight from the post\n- 2-3 short paragraphs\n- End with a genuine open question to drive comments\n- Include the blog URL naturally in the text (e.g., 'I wrote about this in more detail:')\n- Return only the post text, nothing else"
            }
          ]
        },
        "options": {}
      },
      "id": "node-005",
      "name": "💼 AI: Write LinkedIn Post",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 300],
      "credentials": {
        "openAiApi": {
          "id": "1",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You write Instagram captions that are punchy, visual-first, and hashtagged correctly. You understand that Instagram is about emotion and aesthetics first, information second. You use line breaks strategically for readability."
            },
            {
              "role": "user",
              "content": "=Write an Instagram caption based on this blog post.\n\nBrand voice: {{ $('🧹 Extract Text (Strip HTML)').item.json.brand_voice }}\n\nBlog content:\n{{ $('🧹 Extract Text (Strip HTML)').item.json.raw_text }}\n\nRules:\n- 2-3 sentences max for the main caption\n- Make it feel like a lifestyle insight, not a blog summary\n- Add a line break then 'Link in bio →'\n- Then a blank line, then exactly 10 relevant hashtags (mix of medium and niche tags)\n- Return only the caption text, nothing else"
            }
          ]
        },
        "options": {}
      },
      "id": "node-006",
      "name": "📸 AI: Write Instagram Caption",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 480],
      "credentials": {
        "openAiApi": {
          "id": "1",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You write TikTok and Reels video scripts. You understand the 3-part structure: hook (0-5s), value delivery (5-45s), CTA (45-60s). You write for creators who talk to camera. Scripts are punchy, fast-paced, and conversational."
            },
            {
              "role": "user",
              "content": "=Write a TikTok/Reels video script based on this blog post.\n\nBrand voice: {{ $('🧹 Extract Text (Strip HTML)').item.json.brand_voice }}\n\nBlog URL: {{ $('🧹 Extract Text (Strip HTML)').item.json.blog_url }}\n\nBlog content:\n{{ $('🧹 Extract Text (Strip HTML)').item.json.raw_text }}\n\nFormat your response EXACTLY like this:\n\n[HOOK — 0 to 5 seconds]\n(one punchy sentence that makes someone stop scrolling)\n\n[MAIN CONTENT — 5 to 45 seconds]\n(3-4 punchy points, each 1-2 sentences. Write what the creator would SAY out loud. Fast-paced. No filler.)\n\n[CTA — 45 to 60 seconds]\n(tell them to check the link in bio or comment a word to get the full post)\n\nReturn only the formatted script, nothing else."
            }
          ]
        },
        "options": {}
      },
      "id": "node-007",
      "name": "🎵 AI: Write TikTok/Reels Script",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 660],
      "credentials": {
        "openAiApi": {
          "id": "1",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "model": "gpt-4o-mini",
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "You write Threads posts — short, conversational, like a smart friend texting you something interesting. Threads is basically casual Twitter. No hashtags. No corporate tone. Just real talk."
            },
            {
              "role": "user",
              "content": "=Write a 3-post Threads mini-thread based on this blog post.\n\nBrand voice: {{ $('🧹 Extract Text (Strip HTML)').item.json.brand_voice }}\n\nAuthor handle: {{ $('🧹 Extract Text (Strip HTML)').item.json.author_handle }}\n\nBlog URL: {{ $('🧹 Extract Text (Strip HTML)').item.json.blog_url }}\n\nBlog content:\n{{ $('🧹 Extract Text (Strip HTML)').item.json.raw_text }}\n\nFormat EXACTLY like this:\n\n[POST 1 — Hook]\n(1-2 sentences, conversational opener that makes people want to read more)\n\n[POST 2 — The Insight]\n(2-3 sentences with the actual valuable takeaway from the blog post)\n\n[POST 3 — CTA]\n(1-2 sentences, tell them to read the full thing with the URL: {{ $('🧹 Extract Text (Strip HTML)').item.json.blog_url }})\n\nNo hashtags. Keep each post under 200 characters. Return only the formatted posts."
            }
          ]
        },
        "options": {}
      },
      "id": "node-008",
      "name": "🧵 AI: Write Threads Posts",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "typeVersion": 1,
      "position": [900, 840],
      "credentials": {
        "openAiApi": {
          "id": "1",
          "name": "OpenAI API"
        }
      }
    },
    {
      "parameters": {
        "mode": "combine",
        "combineBy": "combineAll",
        "options": {}
      },
      "id": "node-009",
      "name": "🔀 Merge All 5 Outputs",
      "type": "n8n-nodes-base.merge",
      "typeVersion": 3,
      "position": [1140, 480]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "twitter",
              "name": "twitter",
              "value": "={{ $input.all()[0].json.message?.content || $input.all()[0].json.choices?.[0]?.message?.content || 'Error generating Twitter post' }}",
              "type": "string"
            },
            {
              "id": "linkedin",
              "name": "linkedin",
              "value": "={{ $input.all()[1].json.message?.content || $input.all()[1].json.choices?.[0]?.message?.content || 'Error generating LinkedIn post' }}",
              "type": "string"
            },
            {
              "id": "instagram",
              "name": "instagram",
              "value": "={{ $input.all()[2].json.message?.content || $input.all()[2].json.choices?.[0]?.message?.content || 'Error generating Instagram caption' }}",
              "type": "string"
            },
            {
              "id": "tiktok_script",
              "name": "tiktok_script",
              "value": "={{ $input.all()[3].json.message?.content || $input.all()[3].json.choices?.[0]?.message?.content || 'Error generating TikTok script' }}",
              "type": "string"
            },
            {
              "id": "threads",
              "name": "threads",
              "value": "={{ $input.all()[4].json.message?.content || $input.all()[4].json.choices?.[0]?.message?.content || 'Error generating Threads posts' }}",
              "type": "string"
            },
            {
              "id": "blog_url",
              "name": "blog_url",
              "value": "={{ $('⚙️ Config — Set Your URL Here').item.json.blog_url }}",
              "type": "string"
            },
            {
              "id": "generated_at",
              "name": "generated_at",
              "value": "={{ new Date().toISOString() }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "node-010",
      "name": "📦 Package All Posts",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3,
      "position": [1360, 480]
    },
    {
      "parameters": {
        "respondWith": "json",
        "responseBody": "={{ JSON.stringify({\\n  success: true,\\n  blog_url: $json.blog_url,\\n  generated_at: $json.generated_at,\\n  posts: {\\n    twitter: $json.twitter,\\n    linkedin: $json.linkedin,\\n    instagram: $json.instagram,\\n    tiktok_script: $json.tiktok_script,\\n    threads: $json.threads\\n  }\\n}, null, 2) }}",
        "options": {
          "responseHeaders": {
            "entries": [
              {
                "name": "Content-Type",
                "value": "application/json"
              }
            ]
          }
        }
      },
      "id": "node-011",
      "name": "✅ Return All Posts",
      "type": "n8n-nodes-base.respondToWebhook",
      "typeVersion": 1,
      "position": [1580, 480]
    }
  ],
  "connections": {
    "⚙️ Config — Set Your URL Here": {
      "main": [
        [
          {
            "node": "📥 Fetch Blog Post HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📥 Fetch Blog Post HTML": {
      "main": [
        [
          {
            "node": "🧹 Extract Text (Strip HTML)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🧹 Extract Text (Strip HTML)": {
      "main": [
        [
          {
            "node": "🐦 AI: Write Twitter Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "💼 AI: Write LinkedIn Post",
            "type": "main",
            "index": 0
          },
          {
            "node": "📸 AI: Write Instagram Caption",
            "type": "main",
            "index": 0
          },
          {
            "node": "🎵 AI: Write TikTok/Reels Script",
            "type": "main",
            "index": 0
          },
          {
            "node": "🧵 AI: Write Threads Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "🐦 AI: Write Twitter Post": {
      "main": [
        [
          {
            "node": "🔀 Merge All 5 Outputs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "💼 AI: Write LinkedIn Post": {
      "main": [
        [
          {
            "node": "🔀 Merge All 5 Outputs",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "📸 AI: Write Instagram Caption": {
      "main": [
        [
          {
            "node": "🔀 Merge All 5 Outputs",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "🎵 AI: Write TikTok/Reels Script": {
      "main": [
        [
          {
            "node": "🔀 Merge All 5 Outputs",
            "type": "main",
            "index": 3
          }
        ]
      ]
    },
    "🧵 AI: Write Threads Posts": {
      "main": [
        [
          {
            "node": "🔀 Merge All 5 Outputs",
            "type": "main",
            "index": 4
          }
        ]
      ]
    },
    "🔀 Merge All 5 Outputs": {
      "main": [
        [
          {
            "node": "📦 Package All Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "📦 Package All Posts": {
      "main": [
        [
          {
            "node": "✅ Return All Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "pinData": {},
  "settings": {
    "executionOrder": "v1",
    "saveManualExecutions": true,
    "saveDataSuccessExecution": "all",
    "saveDataErrorExecution": "all",
    "callerPolicy": "workflowsFromSameOwner",
    "errorWorkflow": ""
  },
  "staticData": null,
  "tags": [
    {
      "id": "free",
      "name": "Free"
    },
    {
      "id": "content",
      "name": "Content"
    },
    {
      "id": "social-media",
      "name": "Social Media"
    }
  ],
  "triggerCount": 0,
  "updatedAt": "2026-03-08T00:00:00.000Z",
  "versionId": "1.0.0",
  "meta": {
    "templateCredsSetupCompleted": false,
    "instanceId": "free-by-madebyaime"
  },
  "id": "free-blog-social-repurposer",
  "active": false
}
