ChatGPTCreativeWritingAI score · PendingAI-assisted edit · no obvious prompt-injection riskn8n.io

Auto-Repurpose Long-Form Content into Multi-Platform Social Drafts with n8n

Long text → webhook/RSS trigger → AI Agent generates multi-format content → code-level rule enforcement → Google Sheets queue → JSON response or Slack notification

ExperiencedStepsWorkflowPromptTip
Who
Content ops teams, indie creators, marketers who need to batch-produce social content from long articles
You get
One long article becomes platform-ready drafts for Twitter threads, LinkedIn posts, Instagram captions, newsletter blurbs and more, with brand voice applied and human review required before publishing
You need
n8n · google-sheets · gemini · slack

Constraints

Prerequisites: n8n instance (self-hosted or cloud); OpenAI API credential (openAiApi); Google Gemini API credential (googlePalmApi) as fallback; Google Sheets credential; Slack credential. Pre-create a Google Sheet with a Brand Voice tab (columns: Brand Name, Audience, Tone, Call To Action, Hashtags, Banned Words, Max Hashtags) and a Content Queue tab (columns: Draft ID, Created At, Source Title, Source URL, Channel, Draft, Characters, Status). Cost depends on chosen OpenAI model usage and n8n execution volume.

What they did

incrementors published this workflow template in the n8n official template library. The template offers dual entry points: a webhook POST endpoint for external tools and a daily RSS scraper for blog monitoring. The core flow uses an AI Agent node calling an OpenAI model (default gpt-4.1-mini) with a Structured Output Parser to generate eight content formats; if the primary model fails, it falls back to Google Gemini. After generation, Code nodes enforce character limits, banned-word filtering, and hashtag management, then write to a Google Sheets queue for human review.

How it went

Source report (author_report): The template is designed to let a single long article quickly generate platform-ready drafts, with code-level rule repair reducing format overruns caused by model hallucination. API callers receive a complete JSON response; scheduled runs post a summary to Slack. Actual effectiveness has not been verified by this site.

Worth knowing

1. Content safety valve: Both webhook and RSS paths enforce a 60-word minimum and 3-article daily maximum to prevent short-content token waste and bill shock from traffic spikes. 2. Long-content handling: The Prepare Brief node truncates to 12,000 characters at sentence boundaries, protecting the model context window. 3. Brand consistency requires manual pre-configuration: The Brand Voice sheet must be filled in advance; otherwise generic defaults apply and output may deviate from brand tone. 4. Queue review mechanism: All drafts are marked Needs review; there is no auto-publish. Humans must approve in Sheets before scheduling publication. 5. Credential requirements: Besides OpenAI, a googlePalmApi credential is needed for Gemini fallback, plus Google Sheets and Slack credentials. 6. Character limits are hardcoded in Code nodes; modifying them requires direct JS editing, not native n8n configuration.

n8n workflow template

Structure checked · Not run-tested

Use “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.

Setup and test checklist

Credentials to connect

  • Writing Model node: connect OpenAI API credentials.
  • Fallback Writing Model node: connect Google Gemini/PaLM API credentials.

Configuration to replace

  • Source template is n8n public workflow #17171 (~28 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
  • Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.

Test input and expected output

  • Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
  • Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.

Template changes

  • Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
  • No business-logic edits; verify keys, quotas and privacy compliance before use.

Template retrieved: 2026-10-25

Steps

  1. Configure webhook entry and validate content length

    Create a Webhook node in n8n, path set to repurpose, method POST, response mode set to responseNode. Add an Edit Fields (Set) node to extract body.content, body.title, body.url, and set origin to webhook. Then add an If node to check whether the content field has ≥60 words when split on whitespace; if not, route to Respond to Webhook to return a 400 JSON error without calling the model.

  2. Configure RSS scheduled entry (optional)

    Add a Schedule Trigger node set to run daily at 08:00. Connect to an RSS Feed Read node with your blog RSS URL. A subsequent Code node filters for posts published within 24 hours, ≥60 words, max 3 articles, strips HTML tags, and outputs a unified data structure with origin set to feed.

  3. Prepare brief and inject brand voice

    Add a Code node (Prepare Brief) that truncates overly long articles to 12,000 characters at a sentence boundary, recording whether truncation occurred and word count. Then add a Google Sheets node to read the first row of the Brand Voice tab, followed by a Code node (Apply Brand Voice) that attaches brand name, audience, tone, call-to-action, hashtags, banned words, etc. to each brief. If the sheet is empty, sensible defaults keep the workflow running.

  4. AI Agent generates multi-platform drafts

    Add an AI Agent node (Repurposing Agent), connecting an OpenAI Chat Model (default gpt-4.1-mini, temperature 0.6) and a Structured Output Parser. Configure a fallback to the Google Gemini Chat Model. In the Agent's text field, enter the user prompt; in options.systemMessage, enter the system instruction requiring JSON output of summary, keyPoints, hookVariants, tweetThread, linkedinPost, instagramCaption, newsletterBlurb, and hashtags.

    Execution prompt · Source text。AI Agent node (Repurposing Agent) text field

    =Repurpose the content below.
    
    Brand: {{ $json.voice.brandName }}
    Audience: {{ $json.voice.audience }}
    Tone: {{ $json.voice.tone }}
    Call to action: {{ $json.voice.callToAction }}
    Banned words: {{ $json.voice.bannedWords.length ? $json.voice.bannedWords.join(', ') : 'none' }}
    Source title: {{ $json.sourceTitle }}
    Source link: {{ $json.sourceUrl || 'not provided' }}
    Source length: {{ $json.wordCount }} words{{ $json.truncated ? ' (trimmed for length, work with what is here)' : '' }}
    
    Content:
    {{ $json.content }}

    Execution prompt · Source text。AI Agent node (Repurposing Agent) options.systemMessage field

    You turn one long piece of content into ready to post drafts for several channels.
    
    Voice
    - Write as the brand you are given, for the audience you are given, in the tone you are given.
    - Never use the banned words listed in the brief.
    - Never invent statistics, quotes, prices, dates or customer names. Use only what the source text says.
    - Do not use emoji, exclamation marks or phrases like game changer, unlock, supercharge or dive in.
    
    Per channel
    - summary: two or three sentences a busy reader can skim.
    - keyPoints: four to six short takeaways, each a full sentence.
    - hookVariants: three different opening lines for the same idea, so a human can pick one.
    - tweetThread: four to seven posts. Each one must be under 270 characters and must make sense on its own.
    - linkedinPost: one post of roughly 120 to 200 words, first person, ending in the call to action from the brief.
    - instagramCaption: under 150 words, plain sentences, no hashtags in the text itself.
    - newsletterBlurb: a short paragraph that teases the piece and links out.
    - hashtags: three to five topical tags without the hash symbol.
    
    Return only the requested JSON fields.
  5. Enforce rules in code and queue drafts

    Add a Code node (Enforce Channel Limits) with hardcoded limits: tweet 280, linkedin 3000, instagram 2200, newsletter 900, summary 600. Performs banned-word cleaning, over-length trimming/splitting, hashtag deduplication and capping, and records every repair. Then a Code node (Split Into Channel Rows) splits each draft into one row per channel. A Code node (Build Run Summary) aggregates results. Finally, a Google Sheets node (Save Drafts to Queue) writes to Content Queue in appendOrUpdate mode, status set to Needs review.

  6. Return JSON or send Slack notification

    Add an If node (Came From The API?) checking if origin equals webhook: if yes, route to Respond to Webhook returning the full JSON payload; otherwise route to Slack node to send a run summary to the configured channel.

Prompt you can copy

Setup guidance · Editorial suggestion。Setup assistant kickoff prompt to verify prerequisites and import steps

This block is the prompt. Ads are never placed here.

You are setting up an n8n workflow that turns long text into multi-platform social drafts. Confirm in this order: 1) n8n instance is accessible with OpenAI + Google Sheets + Slack credentials; 2) Google Sheet created with Brand Voice and Content Queue tabs and correct column names; 3) Decide whether to use webhook entry, RSS scheduled entry, or both; 4) Import workflow.json or build nodes manually; 5) Replace Repurposing Agent text and systemMessage with the source prompts; 6) Test with sample content ≥60 words to verify JSON output format.

After importing, replace placeholders YOUR_GOOGLE_SHEET_ID, YOUR_BLOG_RSS_FEED_URL, YOUR_SLACK_CHANNEL_NAME before testing.

Source

Repurpose long-form content into social posts via webhook with GPT-4.1 mini · incrementors · n8n.io · 2026-07-16

Comments & feedback

Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.

Loading…

    Related