πŸ“± Create X and LinkedIn posts from Reddit threads with Gemini and human review

⚑ 378 views Β· πŸ“± Social Media & Email Marketing

πŸ’‘ Pro Tip β€” If you’re pulling LinkedIn data through HTTP requests or dealing with API restrictions, there’s a community node called ScraperNode that handles this natively. It has dedicated scrapers for profiles, companies, jobs, and people search β€” you just pass a URL and get structured data back.

View All Scrapers

Description

Reddit Thread β†’ AI-Powered X & LinkedIn Posts with Human Approval Gate

Turn any Reddit thread into polished, platform-optimized social media posts for X (Twitter) and LinkedIn - in minutes, not hours. This workflow reads a Reddit thread, extracts the full discussion (including nested comment threads sorted by score), feeds everything to Google Gemini for summarization and post generation, then pauses for your review before publishing anything live.

No accidental posts. No context lost. Just high-quality content, on your terms.

✨ Key Features

πŸ“ What This Workflow Does

This workflow solves a real content creation bottleneck: Reddit threads are goldmines of community insight, niche expertise, and trending discussions - but turning that raw discussion into polished, platform-appropriate social posts takes significant manual effort.

This automation handles the entire pipeline: from a raw URL to live posts on two platforms, with you staying in full control via an approval gate. It’s ideal for content marketers, community managers, indie hackers, developers, and newsletter writers who want to repurpose Reddit content without losing quality or spending hours manually summarizing threads.

βš™οΈ How It Works (Step-by-Step)

  1. Submit a Reddit URL - A web form (Form Trigger) accepts any Reddit thread URL as input.
  2. Parse the URL - A Code node validates and deconstructs the URL using regex, extracting the subreddit and post ID to build the Reddit JSON API endpoint.
  3. Fetch the thread - An HTTP Request node calls Reddit’s public JSON API (reddit.com/r/.../comments/id.json) with limit=100 and depth=3 to retrieve the full thread.
  4. Extract & structure content - A Code node recursively traverses the entire comment tree, sorts comments by score at every depth level, and builds a clean flat text representation of the full thread - including post metadata (title, score, upvote ratio, flair, awards) - ready for AI injection.
  5. Summarize with Gemini - The assembled thread content is passed to Google Gemini (3.1 Flash Lite), which returns a comprehensive markdown summary covering: Thread Overview, Key Topics, Notable Insights, Community Sentiment, and Actionable Takeaways.
  6. Generate social posts - A second Gemini call uses the summary to craft a platform-optimized X post (≀280 chars) and a LinkedIn post (150–300 words), returning strict JSON output.
  7. Parse & validate - A Code node safely extracts the JSON, strips any markdown fences, falls back to regex parsing if needed, and enforces the 280-character hard limit on the X post.
  8. Human Approval form - The workflow pauses and presents both posts in a review form. You can approve as-is, paste a manual override for either platform, or reject the entire run.
  9. Resolve final content - A Code node merges your overrides (if any) with the AI versions; overrides always win, AI version is the fallback.
  10. Route by decision - An IF node checks your approval decision:
    • βœ… Approve & Publish β†’ Posts simultaneously to X and LinkedIn
    • ❌ Reject β†’ Workflow ends cleanly; nothing is published

πŸš€ How to Use This Workflow

Step 1 - Set up credentials

Click Use template, then configure the following credentials in n8n:

ServiceCredential TypeHow to Get It
πŸ€– Google GeminiGoogle PaLM APIGet API Key β†’ Google AI Studio
🐦 X (Twitter)Twitter OAuth2X Developer Portal β†’ Create App β†’ OAuth2
πŸ’Ό LinkedInLinkedIn OAuth2LinkedIn Developer Portal β†’ Create App

> Note on Reddit: No API key required. This workflow uses Reddit’s public JSON API (append .json to any thread URL) which is freely accessible without authentication.

Step 2 - Configure the LinkedIn node

Open the Post to LinkedIn node and replace the person field value (=ID) with your LinkedIn Person URN. You can retrieve it by calling the LinkedIn API: GET https://api.linkedin.com/v2/userinfo after authenticating.

Step 3 - Activate the workflow

Toggle the workflow to Active in your n8n instance. This enables the Form Trigger and the Wait node’s webhook to function correctly.

Step 4 - Run it

  1. Open the Form Trigger URL (found in the Reddit URL Input node)
  2. Paste any Reddit thread URL
  3. Wait for the approval form to arrive (check the execution log for the form URL)
  4. Review, optionally edit, and approve or reject
  5. Done! your posts are live πŸš€

πŸ› οΈ How to Customize

⚠️ Important Notes

πŸ”— Nodes Used

HTTP Request, X (Formerly Twitter), LinkedIn, n8n Form Trigger, Google Gemini

πŸ“₯ Import

Download workflow.json and import into n8n: Workflow menu β†’ Import from File

πŸ“– Importing guide Β· πŸ”‘ Credential setup