Publish scheduled LinkedIn posts from Twenty CRM via Unipile and SharePoint
Quick overview Automate your LinkedIn content calendar. This workflow fetches scheduled posts from a PostgreSQL database (Twenty CRM), downloads attached media from SharePoint, and publishes them seamlessly to LinkedIn using Unipile.
How it works A Schedule Trigger (Cron) fires every 5 minutes to check for pending social media posts A PostgreSQL node queries the database to fetch posts marked as 'SCHEDULED' where the scheduled time has passed. A Split In Batches node loops through the fetched posts one by one to prevent API concurrency issues. An IF node checks if there is a SharePoint attachment URL included in the database record. If an attachment exists, Microsoft Graph API nodes resolve the SharePoint Drive Item and download the image as a binary file HTTP Request nodes send the text (and binary attachment, if any) to Unipile's API to natively publish the LinkedIn post. A final PostgreSQL node updates the CRM record to 'POSTED' and saves the live LinkedIn post URL back to the database.
Setup Add your PostgreSQL credentials and verify that the SQL query matches your Twenty CRM table and schema names. Connect your Microsoft Entra ID (Azure AD) account to authenticate SharePoint access. Configure the HTTP Request nodes with your Unipile Account ID and API keys via HTTP Header Auth. Activate the workflow to allow the 5-minute cron trigger to run continuously in the background.
Requirements PostgreSQL database (Twenty CRM) , Unipile Account (with an active LinkedIn session),Microsoft Entra ID / SharePoint Account
Customization Adjust the LIMIT 10 in the initial SQL query if you want to process more or fewer posts per batch.Replace the SharePoint nodes with Google Drive or AWS S3 nodes if you store your post attachments elsewhere.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Product Ad Copy & CTAs with GPT-4 for Slack and Airtable
⚡ AI Copywriter Pro: Instant Ad Copy & CTA Generator Transform product details into compelling marketing copy in second...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments