📱 Repurpose Reddit posts into AI tweets with Gemini and Google Sheets

236 views · 📱 Social Media & Email Marketing

💡 Pro Tip — Twitter’s API is paid now, which makes simple data pulls expensive. ScraperNode is a community node that scrapes Twitter profiles and posts without needing API access.

View All Scrapers

Description

Automatically turns trending Reddit posts into punchy, first-person tweets powered by Google Gemini AI, Reddit, and Twitter API, with Google Sheets logging.


🧩 Overview

This workflow repurposes Reddit content into original tweets every few hours.
It’s perfect for creators, marketers, or founders who want to automate content inspiration while keeping tweets sounding human, edgy, and fresh.

Core automation loop:

  1. Fetch trending Reddit posts from selected subreddits.
  2. Use Gemini AI to write a short, first-person tweet.
  3. Check your Google Sheet to avoid reusing the same Reddit post.
  4. Publish to Twitter automatically.
  5. Log tweet + Reddit reference in Google Sheets.

🧠 Workflow Diagram

Workflow Diagram


🪄 How It Works

1️⃣ Every 2 hours → the workflow triggers automatically.
2️⃣ It picks a subreddit (like r/automation, r/n8n, r/SaaS).
3️⃣ Gemini AI analyzes a rising Reddit post and writes a fresh, short tweet.
4️⃣ The system checks your Google Sheet to ensure it hasn’t used that Reddit post before.
5️⃣ Once validated, the tweet is published via Twitter API and logged.


🧠 Example Tweet Output

Example Tweet


📊 Logged Data (Google Sheets)

Each tweet is automatically logged for version control and duplication checks.

DateSubredditPost IDTweet Text
08/10/2025n8n_ai_agents1o16omeJust saw a wild n8n workflow on Reddit…

⚙️ Key Components

NodeFunction
Schedule TriggerRuns every 2 hours to generate a new tweet.
Code (Randomly Decide Subreddit)Picks one subreddit randomly from your preset list.
Gemini Chat ModelGenerates tweet text in first person tone using custom prompt rules.
Reddit ToolFetches top or rising posts from the chosen subreddit.
Google Sheets (read database)Keeps a record of already-used Reddit posts.
Structured Output ParserEnsures consistent tweet formatting (tweet text, subreddit, post ID).
Twitter NodePublishes the AI-generated tweet.
Append Row in SheetLogs the tweet with date, subreddit, and post ID.

🧩 Setup Tutorial

1️⃣ Prerequisites

ToolPurpose
n8n Cloud or Self-HostWorkflow execution
Google Gemini API KeyFor tweet generation
Reddit OAuth2 APITo fetch posts
Twitter (X) API OAuth2To publish tweets
Google Sheets APIFor logging and duplication tracking

2️⃣ Import the Workflow

  1. Download Reddit Twitter Automation.json.
  2. In n8n, click Import Workflow → From File.
  3. Connect your credentials:
    • Gemini → Gemini
    • Reddit → Reddit account
    • Twitter → X
    • Google Sheets → Gsheet

3️⃣ Configure Google Sheet

Your sheet must include these columns:

ColumnDescription
PAST TWEETSThe tweet text
DateAuto-generated date
subredditReddit source
post_idReddit post reference

Google Sheet Log


4️⃣ Customize Subreddits

In the Code Node, update this array to choose which subreddits to monitor:

const subreddits = [
  "n8n",
  "microsaas",
  "SaaS",
  "automation",
  "n8n_ai_agents"
];

## 🔗 Nodes Used

Google Sheets, X (Formerly Twitter), Schedule Trigger, AI Agent, Structured Output Parser, Google Gemini Chat Model

## 📥 Import

Download [`workflow.json`](workflow.json) and import into n8n:
**Workflow menu → Import from File**

[📖 Importing guide](../../../docs/importing-templates.md) · [🔑 Credential setup](../../../docs/credential-setup.md)