Back to Templates

Automate LinkedIn Content Creation with OpenAI, Google Sheets & LinkedIn API

Last update

Last update 15 hours ago

Share


Build a completely automated LinkedIn content engine using n8n, OpenAI, Google Sheets, and the LinkedIn API. This workflow reads unpublished topics from a Google Sheet, generates engaging AI-powered post content and a relevant image, and publishes directly to LinkedIn — no manual effort required.

How It Works

  1. This system uses a scheduled trigger (e.g., daily at 9 AM) to:
  2. Fetch the first Unpublished topic from your Google Sheet.
  3. Generate a compelling, SEO-optimized post description using OpenAI.
  4. Create a marketing image that includes the topic title visually.
  5. Merge the content and image.
  6. Publish the post to your LinkedIn profile.
  7. Update the sheet to mark the topic as Published.

Prerequisites

1.A Google Sheet with two columns: Topics and Status
2.A verified LinkedIn developer account and app
3.OpenAI API key
4.n8n cloud or self-hosted instance
5.LinkedIn OAuth2 credentials in n8n
6.Google Sheets OAuth2 credentials in n8n

Google Sheet Example

Topics Status
How to Automate LinkedIn Unpublished
Top AI Tools for Marketers Unpublished

Step-by-Step Setup

  1. Clone or import the provided n8n workflow.
  2. Create a Google Sheet with your post topics and mark them as Unpublished
  3. Set up OAuth2 credentials in n8n for Google Sheets and LinkedIn.
  4. Use the Schedule Trigger node to control posting frequency.
  5. Adjust the OpenAI prompt to better match your tone.
  6. Add a test topic and verify it generates, posts, and updates correctly.

Customization Tips

  1. Change posting frequency (daily/hourly) in the Schedule Trigger.
  2. Modify the OpenAI prompt for different tones (professional, fun, educational).
  3. Use a different image generation model or remove image generation if not needed.
  4. Add approval steps before publishing, using Telegram/Slack/email nodes.