Research Reddit trends and publish LinkedIn posts with Gemini and PostPeer

Go to Workflow
0 views
Built by Hesham Mashhour Hesham Mashhour
Created on June 30, 2026

Description

Quick overview
This workflow runs daily, scrapes a selected subreddit with Apify, researches sources via Brave Search and Jina Reader, and uses Eden AI (DeepSeek) plus Google Gemini to draft a LinkedIn post with an image. It logs state in Google Sheets/Drive, sends approval emails, and publishes via PostPeer.

How it works
Runs daily on a schedule, loads Global Constants, and picks an ACTIVE subreddit row from Google Sheets using a random ID.
Scrapes recent posts from that subreddit using an Apify Reddit scraper, then normalizes, scores, and deduplicates candidates.
Uses an Eden AI (DeepSeek) agent to vet the candidates and either selects one post idea or stops and records a NO_VIABLE_IDEA entry in Google Sheets and emails the rationale.
For a selected idea, a second Eden AI (DeepSeek) agent generates a research brief and up to five Brave Search queries, then Brave Search and Jina Reader collect and extract a small set of non-social sources.
A third Eden AI (DeepSeek) agent writes the LinkedIn draft and an accompanying image prompt, then Google Gemini generates the image.
Uploads the image to Google Drive, writes the draft and metadata to a Google Sheets post log, and emails a two-step approval link.
When the reviewer confirms approval or rejection via the webhook page, the workflow updates Google Sheets and either publishes the text+image to LinkedIn through PostPeer (and emails the result) or marks the draft as rejected.

Setup
Create and select one Global Constants credential (n8n-nodes-globals) that includes your Google Sheet ID/tab names, webhook base URL/path, and PostPeer/Brave/Jina/Gemini settings.
Set up Google Sheets OAuth credentials and create the required spreadsheet tabs/headers for the subreddit config and post log used for state and approval tokens.
Add credentials for Apify, Eden AI, Google Gemini, Google Drive, and your SMTP/Email Send account, and set the recipient/sender emails in Global Constants.
Create HTTP header-auth credentials for Brave Search and PostPeer API calls, and set your PostPeer LinkedIn account ID and API endpoints in Global Constants.
Publish the workflow and use the production webhook URL (path matches linkedin-post-approval) so approval links in emails resolve externally, then test with a non-production LinkedIn account before enabling the daily schedule.

Nodes Used (8)

AI Agent
@n8n/n8n-nodes-langchain.agent
Calculator
@n8n/n8n-nodes-langchain.toolCalculator
Code
n8n-nodes-base.code
Google Drive
n8n-nodes-base.googleDrive
Google Gemini
@n8n/n8n-nodes-langchain.googleGemini
Google Sheets
n8n-nodes-base.googleSheets
HTTP Request
n8n-nodes-base.httpRequest
Send Email
n8n-nodes-base.emailSend