AI LinkedIn Content Scheduler with Notion & OpenAI
Integrates with:
Overview
Unlock Automated & Engaging LinkedIn Presence with this AI Agent
This n8n workflow acts as an AI Agent to automate your LinkedIn content pipeline. It connects to your Notion database, retrieves posts scheduled for the day (including text and an image URL), then uses an OpenAI Assistant to intelligently reformat the text for maximum LinkedIn engagement (e.g., structuring paragraphs, creating lists, adding relevant emojis). Finally, it publishes the polished post along with its image to your LinkedIn profile and updates the post's status in Notion to 'Done'.
This AI Agent's abilities include:
- Content Curation: Sources post materials directly from your Notion workspace.
- AI-driven Content Refinement: Employs OpenAI to enhance raw text into compelling LinkedIn updates.
- Automated Social Media Posting: Publishes content to LinkedIn according to your schedule.
Key Features & Benefits
- Consistent Posting Schedule: Set it and forget it. The Schedule Trigger ensures timely posts.
- Centralized Content Management: Use Notion as your single source of truth for LinkedIn content.
- AI-Enhanced Readability: OpenAI Assistant reworks your draft text for better structure and engagement on LinkedIn.
- Visual Content Support: Automatically includes images hosted at a URL specified in your Notion entry.
- Workflow Transparency: Tracks successfully published posts by updating their status in Notion.
- Time-Saving Automation: Frees you from manual posting, letting you focus on strategy and creation.
Use Cases
- B2C E-commerce: Automate sharing new product arrivals, special offers, or user-generated content from a Notion calendar to LinkedIn, refined by AI for optimal customer appeal.
- B2B SaaS: Consistently publish insightful articles, company news, or webinar announcements planned in Notion, with AI ensuring professional and engaging formatting for a LinkedIn audience.
- Solopreneurs & Founders: Maintain an active and polished LinkedIn presence by drafting content in Notion and letting this AI Agent handle the AI-assisted reformatting and scheduled publishing.
- Marketing Agencies: Streamline content delivery for multiple clients by managing content in separate Notion databases and using this agent to automate AI enhancement and LinkedIn posting.
Prerequisites
- An n8n instance (Cloud or self-hosted).
- OpenAI API Key and an Assistant ID. You'll need to create/configure an OpenAI Assistant designed to reformat text for LinkedIn (e.g., improve structure, paragraph breaks, lists).
- Notion API Key.
- A Notion Database set up to store your LinkedIn posts. It must include properties for the post date, status (e.g., 'To Do', 'Done'), post text content, and a URL for the image to be posted.
- LinkedIn credentials (OAuth2) configured in n8n with permissions to post.
Setup Instructions
- Download the n8n workflow JSON file.
- Import the workflow into your n8n instance.
- Schedule Trigger Node: Configure the 'Schedule Trigger' node to your desired posting days and times (e.g., daily at 3 PM).
- Notion - Query Entries Node ('query entries from Notion table for today'):
a. Select your Notion API credentials.
b. Enter your Notion Database ID for the 'Database ID' field. This database should contain your post content, a date property for scheduling, a status property, and a property holding the image URL.
c. Ensure the filter for the 'Date' property correctly matches today's date (default is
{{ $today.format("yyyy/mM/dd") }}
). Adjust if your Notion date format differs. - Notion - Get All Content Node ('get all content from post page'): a. Verify credentials are set (should inherit if using same account). b. This node fetches all blocks from the Notion page identified in the previous step. Usually, no changes are needed here if your post text is within the page body.
- OpenAI - Reformat Post Text Node:
a. Select your OpenAI API credentials.
b. In the 'Assistant ID' field, enter the ID of your OpenAI Assistant configured for reformatting LinkedIn posts. The placeholder
asst_J1KuOx5wTLrjEHuy5q94jEgh
must be replaced with your own. c. Review the prompt in the 'Text' field to ensure it aligns with how your Assistant expects to receive content and what kind of output you desire. - HTTP Request - Fetch Image Node ('Fetch image from post'):
a. This node fetches the image from the URL provided in your Notion data. The URL
={{ $json.url[0] }}
assumes the image URL is correctly aggregated and passed. Usually, no configuration is needed here if the previous nodes are set up correctly. - LinkedIn - Post on LinkedIn Node:
a. Select your LinkedIn OAuth2 credentials.
b. Choose the 'Person' or 'Organization' you want to post as.
c. The 'Text' field
={{ $json.output }}
will use the AI-reformatted text. The node is configured for an IMAGE share; ensure the 'Combine text+image' node provides data correctly. - Notion - Set Post Status Node ('Set post status to "Done"'):
a. Verify your Notion API credentials.
b. Ensure the 'Page ID' correctly references the Notion page from earlier steps (
={{ $('query entries from Notion table for today').item.json.url }}
). c. Configure the 'Properties' to update your 'Status' property in Notion to 'Done' (or your preferred completion status). - Test the entire workflow with a sample entry in your Notion database scheduled for today.
- Activate the workflow.
Want your own unique AI agent?
Talk to us - we know how to build custom AI agents for your specific needs.
Schedule a Consultation