π± Generate and publish LinkedIn posts with OpenAI, Gmail, and Google Sheets
β‘ 110 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.
Description
Quick overview
This workflow generates LinkedIn post ideas and drafts with OpenAI, routes approvals through Gmail replies, tracks each content cycle in Google Sheets, and publishes the selected draft to LinkedIn as a person or organization.
How it works
- Starts manually and uses OpenAI to generate a numbered list of LinkedIn post idea titles for the configured niche and audience.
- Logs the idea batch and run settings to Google Sheets and emails the ideas to your Gmail inbox with a correlation ID in the subject.
- Polls Gmail for unread replies containing the correlation ID, extracts the reply number, and looks up the matching row in Google Sheets.
- If the sheet row is in the ideas stage, it uses OpenAI to generate multiple LinkedIn post drafts for the selected idea, updates Google Sheets with the drafts, and emails them for final approval.
- If the sheet row is in the drafts stage, it selects the chosen draft text and publishes it to LinkedIn with public visibility as the configured person or organization.
- Updates the Google Sheets row to mark the post as posted and sends a Gmail confirmation email with a preview.
Setup
- Add credentials for OpenAI, Gmail, Google Sheets, and LinkedIn (Community Management authentication) in n8n.
- Create/select a Google Sheets spreadsheet and sheet used as the content tracker, and map it in all Google Sheets steps (append, lookup, and updates).
- Update the Configuration values, especially the notification email address, niche/audience, idea/draft counts, word limits, and the OpenAI model.
- Configure LinkedIn posting by setting post-as mode (person or organization) and filling in the required LinkedIn URNs (person URN and/or organization URN) in the publish step.
- Ensure your approval replies keep the original email subject containing the [CID: β¦] token and reply with only the idea/draft number so the workflow can parse it.
Additional info
π₯ Open full documentation on Notion
Need help customizing?
Contact me for consulting and support : Linkedin
MY NEW YOUTUBE CHANNEL
π Subscribe to my new YouTube channel. Here Iβll share videos and Shorts with practical tutorials and FREE templates for n8n.
π Nodes Used
Google Sheets, Gmail, LinkedIn, Gmail Trigger, AI Agent, OpenAI Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File
