👉 n8n No Limits Access :

https://www.hostg.xyz/SHHAd

Hébergement VPS n8n | Automatisation sécurisée et évolutive

coupon -15% : DRFIRAS15

👉 Formation n8n en Français

Formation n8n en Français : Automatisation & Agents IA

coupon -20% : LANCEMENT : HERE


What you will build

<aside> 💼

A content machine that generates LinkedIn post ideas with an OpenAI agent, emails them to you for approval, drafts 3 full posts for the idea you pick, and publishes the draft you choose straight to LinkedIn — with every stage tracked in a Google Sheet. Two independent triggers (a Manual Trigger and a Gmail Trigger) run this: settings are stored in the tracking sheet so both stay in sync.

</aside>

flowchart LR
  A["Start Content Cycle"] --> B["Configuration"]
  B --> C["Generate LinkedIn Post Ideas"]
  C --> D["Prepare Ideas Email & Log Data"]
  D --> E["Log Idea Batch to Tracking Sheet"]
  E --> F["Email Ideas for Approval"]

  G["Gmail Trigger - Await Reply"] --> H["Extract Reply Number & Correlation ID"]
  H --> I["Get Row by Correlation ID"]
  I --> J{"Route by Approval Stage"}
  J -- Ideas Stage --> K["Prepare Draft Request"]
  K --> L["Generate LinkedIn Post Drafts"]
  L --> M["Prepare Drafts Email & Log Data"]
  M --> N["Update Sheet with Drafts"]
  N --> O["Email Drafts for Approval"]
  J -- Drafts Stage --> P["Select Final Draft to Publish"]
  P --> Q["Publish Post to LinkedIn"]
  Q --> R["Update Sheet as Posted"]
  R --> S["Email Publish Confirmation"]
  J -- Unrecognized --> T["Ignore Unrecognized Reply"]

<aside> 🎬

Goal of this document: rebuild the workflow live, node by node, without opening the JSON. Every value, prompt, expression and URL below is copy-paste ready.

</aside>

Prerequisites & credentials

Credential n8n type Used by How to get it
OpenAi account openAiApi Both OpenAI Chat Model nodes platform.openai.com → API keys → create key → paste into a new OpenAI credential in n8n.
Gmail account gmailOAuth2 Gmail Trigger + all 3 Gmail send nodes In n8n create a Gmail OAuth2 credential, sign in with Google, grant Gmail access.
Google Sheets account googleSheetsOAuth2Api All 4 Google Sheets nodes In n8n create a Google Sheets OAuth2 credential, sign in with Google, grant Sheets access.
LinkedIn account linkedInCommunityManagementOAuth2Api Publish Post to LinkedIn Create an app at linkedin.com/developers/apps, request the Community Management API product, then create a LinkedIn (Community Management) OAuth2 credential in n8n and sign in.

<aside> 🔑

Never paste API keys inside HTTP nodes. Keys live only in n8n Credentials.

</aside>

<aside> 📊

Create one Google Sheet before you start, with these column headers on row 1: correlationId, stage, niche, audience, ideas, selectedTopic, drafts, linkedinUrn, num_drafts, openai_model, draft_min_words, draft_max_words, linkedin_post_as, linkedin_organization_urn, notification_email. Select this sheet on all 4 Google Sheets nodes below.

</aside>


Node 1 — Start Content Cycle