LinkedIn AI Content Scheduler | n8n Auto-Publishing Bot
    100%
    Lead Generation
    0(0 reviews)
    0 downloads

    LinkedIn AI Content Scheduler | n8n Auto-Publishing Bot

    NM

    Curated by n8n Markets team

    Last updated: April 19, 2026

    Bismillahir Rahmanir Rahim Grow your LinkedIn brand on autopilot. This n8n workflow takes your topic ideas and creates viral, formatted posts with hooks and hashtags. Includes scheduled auto-publishing directly to your profile. The AI LinkedIn Post Generator automates your entire LinkedIn content calendar. You add topic ideas to a Google Sheet once; the workflow then publishes a fully formatted viral post — hook, bullet points, call-to-action, and hashtags — to your LinkedIn profile every Monday, Wednesday, and Friday at 9 AM. 1.1 What the workflow does ⦁ Reads the next "Pending" topic from your Google Sheet ⦁ Checks that a topic exists before calling GPT (prevents wasted API calls) ⦁ Uses GPT-4o to write a formatted viral LinkedIn post ⦁ Publishes the post directly to your LinkedIn profile ⦁ Logs the post content, character count, and publish date back to your sheet ⦁ Marks the topic as "Published ✅" to prevent duplicate publishing 1.2 Node-by-node flow [Schedule Trigger] → [Get Next Topic] → [Guard: Topic Exists?] → [GPT-4 Write Post] → [Prepare Post Data] → [Post to LinkedIn] → [Log Post to Sheet] Node Type Purpose Mon/Wed/Fri at 9am Schedule Trigger Fires 3× per week at 9 AM server time Get Next Topic Google Sheets Reads first row where Status = "Pending" Guard: Topic Exists? Filter Stops workflow cleanly if sheet is empty GPT-4 Write Post OpenAI Writes hook + bullets + CTA + hashtags Prepare Post Data Code (JS) Validates content, extracts row number Post to LinkedIn LinkedIn Publishes post to your profile Log Post to Sheet Google Sheets Updates status, logs content + char count 2. Prerequisites 2.1 LinkedIn Developer App (required for publishing) IMPORTANT: This step is mandatory — LinkedIn cannot be connected without it LinkedIn does not allow direct OAuth login via n8n without a Developer App. Setup takes approximately 10 minutes and is a one-time process. 1. Go to developer.linkedin.com → sign in with your LinkedIn account. 2. Click Create App. Fill in: App Name (any), LinkedIn Page (your profile or company), App Logo (any image). 3. Under the Auth tab, find Redirect URLs → click the pencil icon. 4. Add your n8n OAuth callback URL. In n8n: Settings → OAuth Redirect URL → copy and paste it here. 5. Under Products tab, click Request Access next to "Share on LinkedIn" and "Sign In with LinkedIn using OpenID Connect". 6. Go back to the Auth tab → copy your Client ID and Client Secret. 2.2 Find your LinkedIn Person ID 1. In n8n, connect your LinkedIn credential first (see Section 4.3). 2. After connecting, open a REST client (Postman or Hoppscotch.io — free). 3. Make this authenticated GET request: API call to get your Person ID GET https://api.linkedin.com/v2/me Authorization: Bearer [your_linkedin_access_token] 1. In the JSON response, find the "id" field — this is your Person ID (e.g. AbCdEfGhIj). 2. Your full Person URN will be: urn:li:person:AbCdEfGhIj 2.3 Other requirements Requirement Details n8n Self-hosted or n8n Cloud (any plan) OpenAI account GPT-4o access — platform.openai.com LinkedIn LinkedIn Developer App with "Share on LinkedIn" product enabled Google Sheets Sheet with columns: Topic | Niche | Status | Published Date | Post Content | Char Count 3. Google Sheet Setup 1. Create a Google Sheet and name the first tab exactly: Topics 2. Add these exact headers in Row 1: A B C D E F Topic Niche Status Published Date Post Content Char Count 1. Add your topic ideas. Set Status = Pending for each one you want published. 2. Copy the Sheet ID from the URL — you will need it in two nodes. INFO: Recommended: pre-load 12 topics at once With 3 posts per week, 12 topics = 4 weeks of content. The workflow picks the first Pending row each time — add new topics at the bottom as you go. 4. Import & Configure in n8n 4.1 Import the workflow 1. In n8n, click + New Workflow → three-dot menu → Import from File. 2. Select: 02_linkedin_post_generator_FIXED.json 4.2 Connect Google Sheets 1. Click Get Next Topic node → Credential → Create New → Google Sheets OAuth2 → authorise. 2. Paste your Sheet ID, replacing PASTE_YOUR_SHEET_ID_HERE. 3. Repeat for the Log Post to Sheet node. 4.3 Connect OpenAI 1. Click GPT-4 Write LinkedIn Post → Credential → Create New → OpenAI → paste API key. 4.4 Connect LinkedIn 1. Click Post to LinkedIn → Credential → Create New → LinkedIn OAuth2 API. 2. Enter Client ID and Client Secret from your Developer App → click Connect. 3. After authorising, paste your Person URN into the Person field, replacing YOUR_LINKEDIN_PERSON_ID: Person URN format urn:li:person:AbCdEfGhIj ← replace "AbCdEfGhIj" with your real Person ID 4.5 Verify timezone IMPORTANT: Posts publish at 9 AM in your n8n server timezone To verify: in n8n go to Settings → General → Timezone. Set this to your local timezone (e.g. Asia/Karachi, Europe/London, America/New_York). If your server is in UTC and you are in UTC+5, posts will publish at 2 PM local time by default. 5. Pre-Launch Checklist 5.1 Google Sheet ⦁ Tab named exactly "Topics" ⦁ All 6 column headers present and correctly spelled ⦁ At least 3 rows have Status = Pending (enough for first week) ⦁ Sheet ID noted from URL 5.2 Credentials ⦁ Google Sheets OAuth2 connected and authorised ⦁ OpenAI API key connected with active balance ⦁ LinkedIn OAuth2 connected — Developer App has "Share on LinkedIn" enabled 5.3 Node configuration ⦁ Sheet ID replaced in Get Next Topic node ⦁ Sheet ID replaced in Log Post to Sheet node ⦁ YOUR_LINKEDIN_PERSON_ID replaced with real urn:li:person:XXXXX value ⦁ n8n server timezone confirmed correct 5.4 Test run ⦁ Manual test executed — post published to LinkedIn profile ⦁ Sheet row updated to "Published ✅" with date and content logged ⦁ Workflow Activated 6. Troubleshooting Error / Symptom Likely Cause Fix LinkedIn 401 Unauthorized OAuth token expired or wrong scope Delete LinkedIn credential → reconnect. Ensure "Share on LinkedIn" product is enabled in Developer App. Nothing happens, no error shown No rows with Status = "Pending" in sheet Check Topics tab. "Pending" must be capitalised. The guard node silently stops workflow when empty. Post publishes at wrong time Server timezone ≠ local timezone Settings → General → Timezone → set to your local timezone. GPT node fails with 429 OpenAI rate limit exceeded GPT-4o has rate limits on free/low-tier accounts. Add credit or wait 1 minute. "Person not found" error on LinkedIn Person URN is wrong or missing Re-call GET /v2/me and confirm your Person ID. Format must be: urn:li:person:YOURID Post published but sheet not updated Sheet ID wrong or missing in Log node Open Log Post to Sheet → paste correct Sheet ID. Character count shows 0 Prepare Post Data node failed silently Check execution logs for Prepare node — look for thrown errors. 7. Customisation Guide 7.1 Change post frequency Click the Mon/Wed/Fri at 9am node → modify the cron expression. Current: 0 9 * * 1,3,5. For daily: 0 9 * * *. For weekdays only: 0 9 * * 1-5. 7.2 Change post style Click GPT-4 Write LinkedIn Post → edit the user content message. You can change the format — for example, remove bullets and use a storytelling format, or change the number of hashtags. 7.3 Add multiple LinkedIn accounts Duplicate the workflow and connect a different LinkedIn credential. Use separate Google Sheets for each account. Each workflow runs independently. 7.4 Add an approval step Insert a Gmail or Slack node before "Post to LinkedIn" to send yourself the draft post for approval. Replace the direct connection with a webhook that continues the workflow on approval. This converts the workflow from auto-publish to assisted-publish.

    What's Included

    • WORFLOW PLUS MANUAL

    Requirements

    Version v1.1.0 (Fixed) Trigger Scheduled — Mon / Wed / Fri at 9:00 AM Integrations Google Sheets • OpenAI GPT-4o • LinkedIn Cost to run ~$0.01 per post (approx. $1 per 100 posts) Difficulty Intermediate — requires LinkedIn Developer App setup Avg setup time 25–35 minutes

    How to Use

    Version v1.1.0 (Fixed) Trigger Scheduled — Mon / Wed / Fri at 9:00 AM Integrations Google Sheets • OpenAI GPT-4o • LinkedIn Cost to run ~$0.01 per post (approx. $1 per 100 posts) Difficulty Intermediate — requires LinkedIn Developer App setup Avg setup time 25–35 minutes

    How to import this template into n8n

    1. Download the workflow JSON file from this page.
    2. In n8n, open Workflows, create a new workflow and choose Import from File.
    3. Open each node that shows a warning and connect your own credentials.
    4. Run the workflow once manually to check the output before you activate it.
    Included in Pro
    • Importable n8n workflow JSON file
    • Download with Builder Pro or Agency Unlimited
    • Built for n8n v1.0+

    Included in Builder Pro — $19/mo, 4,177 premium workflows

    Before you activate

    Templates are reviewed before they are listed. Test with your own credentials and data before running it in production.

    Updated Apr 2026
    v1.0.0
    SSL
    Secure
    GDPR

    100% Secure Checkout

    Refund requests within 7 days of a new subscription

    Reviews

    0

    No reviews yet

    See all 0 reviews ↓
    —

    0 reviews

    5★
    0
    4★
    0
    3★
    0
    2★
    0
    1★
    0

    No reviews yet.

    Questions & Answers

    0

    Log in to ask a question.

    No questions yet. Be the first to ask!

    People Also Bought