Schedule LinkedIn posts with AI content generation and Telegram approval
Overview
This workflow automates LinkedIn posts using OpenAI. The prompts are stored in the workflow and can be customized as needed to fit your needs. The workflow uses a combination of a Schedule Trigger, some code that determines what day of the week it is (no posting Friday - Sunday), a prompts node to set your OpenAI prompts, a random selection of a prompt so that you are not generating content that looks repetitive. We send that all to OpenAI API, select a random time, have the final LinkedIn post sent to your Telegram for approval, once approved wait for the correct time slot, and then Post to your LinkedIn account using the LinkedIn node.
How it works:
Run or schedule the workflow in n8n The automation can be triggered manually or on a custom schedule (excluding weekends if needed).
You should customize the prompts in the Prompt Node to suit your needs.
A random LinkedIn post prompt is selected Pre-written prompts are rotated to keep content fresh and non-repetitive.
OpenAI generates the LinkedIn post The prompt is sent to OpenAI via API, and the result is returned in clean, ready-to-use form.
You receive the draft via Telegram. The post is sent to Telegram for quick approval or review.
Post is scheduled or published via the LinkedIn Connector
Once approved, the workflow delays until the target time, then sends the content to LinkedIn.
What's needed:
An OpenAPI API key, LinkedIn Account, and a Telegram Account.
For Telegram you will need to configure the Bot service.
Step-by-Step: Telegram Approval for Your Workflow A. Set Up a Telegram Bot 1. Open Telegram and search for “@BotFather”. 2. Start a chat and type /newbot to create a bot. 3. Give your bot a name and a unique username (e.g., YourApprovalBot). 4. Copy the API token that BotFather gives you.
B. Add Your Bot to a Private Chat (with You)
- Find your bot in Telegram, click “Start” to activate it.
- Send a test message (like “hello”) so the chat is created.
C. Get Your User ID
- Search for “userinfobot” or use sites like userinfobot in Telegram. Type /start and it will reply with your Telegram user ID.
OpenAI powers the LinkedIn post creation
- Add Your OpenAI API Key:
- Log in to your OpenAI Platform account:
https://platform.openai.com/. - Go to API keys and create a new secret key.
- In n8n, create a new "OpenAI API" credential and paste your API key. Give it a name.
- Log in to your OpenAI Platform account:
- Apply Credential to Nodes: OpenAI Message Node
Connect your LinkedIn account to the Linked in Node
- Select your account from the LinkedIn Dropdown box.
Schedule LinkedIn Posts with AI Content Generation and Telegram Approval
This n8n workflow automates the process of generating AI-powered content for LinkedIn posts, allows for human approval via Telegram, and then schedules the approved posts on LinkedIn. It provides a robust solution for content creators and marketers to streamline their social media presence with a human-in-the-loop validation step.
What it does
This workflow simplifies and automates the following steps:
- Triggers Manually or on Schedule: The workflow can be initiated manually by clicking "Execute workflow" or automatically at predefined intervals using the Schedule Trigger.
- Generates AI Content: It uses the OpenAI node to generate content for a LinkedIn post. The specific prompt and parameters for content generation are configured within the OpenAI node.
- Formats Content: The generated AI content is processed by a Code node to format it appropriately for a LinkedIn post, likely adding a call to action or specific structure.
- Prepares for Approval: An "Edit Fields (Set)" node prepares the data for the Telegram approval message, ensuring all necessary information (like the generated post content) is available.
- Sends for Telegram Approval: A Telegram node sends the generated content to a specified Telegram chat for review and approval. This includes buttons for "Approve" or "Reject".
- Waits for Approval: A "Wait" node pauses the workflow execution until a response is received from the Telegram approval message.
- Routes Based on Approval: An "If" node checks the response from Telegram.
- If Approved: The workflow proceeds to post the content on LinkedIn.
- If Rejected: The workflow terminates, and the post is not published.
- Posts to LinkedIn: If approved, a LinkedIn node publishes the generated content as a new post to the configured LinkedIn account.
Prerequisites/Requirements
To use this workflow, you will need:
- n8n Instance: A running n8n instance (self-hosted or cloud).
- OpenAI API Key: An API key for OpenAI to generate content.
- Telegram Bot Token and Chat ID: A Telegram bot and the chat ID of the group or user where approval messages will be sent.
- LinkedIn Account: A LinkedIn account with appropriate permissions to post content.
- n8n Credentials: Configure credentials for OpenAI, Telegram, and LinkedIn within your n8n instance.
Setup/Usage
- Import the Workflow:
- Download the provided JSON file.
- In your n8n instance, click "Workflows" in the left sidebar.
- Click "New" and then "Import from JSON".
- Paste the JSON content or upload the file.
- Configure Credentials:
- Locate the OpenAI, Telegram, and LinkedIn nodes in the workflow.
- Click on each node and select or create the necessary credentials.
- For OpenAI: Provide your API key.
- For Telegram: Provide your Bot Token and the Chat ID where approval messages should be sent.
- For LinkedIn: Authenticate your LinkedIn account.
- Customize Content Generation (OpenAI Node):
- Open the OpenAI node.
- Adjust the "Prompt" field to define how you want the AI to generate your LinkedIn post content (e.g., "Write a professional LinkedIn post about [topic]...").
- Customize Content Formatting (Code Node):
- Open the "Code" node.
- Modify the JavaScript code to format the AI-generated content as desired (e.g., add hashtags, a specific closing, etc.).
- Set Schedule (Optional):
- If you want the workflow to run automatically, configure the "Schedule Trigger" node to your desired interval (e.g., daily, weekly).
- Activate the Workflow:
- Ensure all nodes are configured correctly.
- Click the "Active" toggle in the top right corner of the workflow editor to enable it.
- Run the Workflow:
- Manually: Click "Execute workflow" in the top right corner to test it.
- Automatically: If the Schedule Trigger is enabled, the workflow will run at the configured times.
Once running, you will receive a Telegram message with the generated post content. You can then approve or reject it, and the workflow will proceed accordingly.
Related Templates
Send WooCommerce cross-sell offers to customers via WhatsApp using Rapiwa API
Who Is This For? This n8n workflow enables automated cross-selling by identifying each WooCommerce customer's most frequently purchased product, finding a related product to recommend, and sending a personalized WhatsApp message using the Rapiwa API. It also verifies whether the user's number is WhatsApp-enabled before sending, and logs both successful and unsuccessful attempts to Google Sheets for tracking. What This Workflow Does Retrieves all paying customers from your WooCommerce store Identifies each customer's most purchased product Finds the latest product in the same category as their most purchased item Cleans and verifies customer phone numbers for WhatsApp compatibility Sends personalized WhatsApp messages with product recommendations Logs all activities to Google Sheets for tracking and analysis Handles both verified and unverified numbers appropriately Key Features Customer Segmentation: Automatically identifies paying customers from your WooCommerce store Product Analysis: Determines each customer's most purchased product Smart Recommendations: Finds the latest products in the same category as customer favorites WhatsApp Integration: Uses Rapiwa API for message delivery Phone Number Validation: Verifies WhatsApp numbers before sending messages Dual Logging System: Tracks both successful and failed message attempts in Google Sheets Rate Limiting: Uses batching and wait nodes to prevent API overload Personalized Messaging: Includes customer name and product details in messages Requirements WooCommerce store with API access Rapiwa account with API access for WhatsApp verification and messaging Google account with Sheets access Customer phone numbers in WooCommerce (stored in billing.phone field) How to Use — Step-by-Step Setup Credentials Setup WooCommerce API: Configure WooCommerce API credentials in n8n (e.g., "WooCommerce (get customer)" and "WooCommerce (get customer data)") Rapiwa Bearer Auth: Create an HTTP Bearer credential with your Rapiwa API token Google Sheets OAuth2: Set up OAuth2 credentials for Google Sheets access Configure Google Sheets Ensure your sheet has the required columns as specified in the Google Sheet Column Structure section Verify Code Nodes Code (get paying_customer): Filters customers to include only those who have made purchases Get most buy product id & Clear Number: Identifies the most purchased product and cleans phone numbers Configure HTTP Request Nodes Get customer data: Verify the WooCommerce API endpoint for retrieving customer orders Get specific product data: Verify the WooCommerce API endpoint for product details Get specific product recommend latest product: Verify the WooCommerce API endpoint for finding latest products by category Check valid WhatsApp number Using Rapiwa: Verify the Rapiwa endpoint for WhatsApp number validation Rapiwa Sender: Verify the Rapiwa endpoint for sending messages Google Sheet Required Columns You’ll need two Google Sheets (or two tabs in one spreadsheet): A Google Sheet formatted like this ➤ sample The workflow uses a Google Sheet with the following columns to track coupon distribution: Both must have the following headers (match exactly): | name | number | email | address1 | price | suk | title | product link | validity | staus | | ---------- | ------------- | ----------------------------------------------- | ----------- | ----- | --- | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------- | -------- | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | unverified | not sent | | Abdul Mannan | 8801322827799 | contact@spagreen.net | mirpur dohs | 850 | | Sharp Most Demanding Hoodie x Nike | https://yourshopdomain/p-img-nike | verified | sent | Important Notes Phone Number Format: The workflow cleans phone numbers by removing all non-digit characters. Ensure your WooCommerce phone numbers are in a compatible format. API Rate Limits: Rapiwa and WooCommerce APIs have rate limits. Adjust batch sizes and wait times accordingly. Data Privacy: Ensure compliance with data protection regulations when sending marketing messages. Error Handling: The workflow logs unverified numbers but doesn't have extensive error handling. Consider adding error notifications for failed API calls. Product Availability: The workflow recommends the latest product in a category, but doesn't check if it's in stock. Consider adding stock status verification. Testing: Always test with a small batch before running the workflow on your entire customer list. Useful Links Dashboard: https://app.rapiwa.com Official Website: https://rapiwa.com Documentation: https://docs.rapiwa.com Support & Help WhatsApp: Chat on WhatsApp Discord: SpaGreen Community Facebook Group: SpaGreen Support Website: https://spagreen.net Developer Portfolio: Codecanyon SpaGreen
Track SDK documentation drift with GitHub, Notion, Google Sheets, and Slack
📊 Description Automatically track SDK releases from GitHub, compare documentation freshness in Notion, and send Slack alerts when docs lag behind. This workflow ensures documentation stays in sync with releases, improves visibility, and reduces version drift across teams. 🚀📚💬 What This Template Does Step 1: Listens to GitHub repository events to detect new SDK releases. 🧩 Step 2: Fetches release metadata including version, tag, and publish date. 📦 Step 3: Logs release data into Google Sheets for record-keeping and analysis. 📊 Step 4: Retrieves FAQ or documentation data from Notion. 📚 Step 5: Merges GitHub and Notion data to calculate documentation drift. 🔍 Step 6: Flags SDKs whose documentation is over 30 days out of date. ⚠️ Step 7: Sends detailed Slack alerts to notify responsible teams. 🔔 Key Benefits ✅ Keeps SDK documentation aligned with product releases ✅ Prevents outdated information from reaching users ✅ Provides centralized release tracking in Google Sheets ✅ Sends real-time Slack alerts for overdue updates ✅ Strengthens DevRel and developer experience operations Features GitHub release trigger for real-time monitoring Google Sheets logging for tracking and auditing Notion database integration for documentation comparison Automated drift calculation (days since last update) Slack notifications for overdue documentation Requirements GitHub OAuth2 credentials Notion API credentials Google Sheets OAuth2 credentials Slack Bot token with chat:write permissions Target Audience Developer Relations (DevRel) and SDK engineering teams Product documentation and technical writing teams Project managers tracking SDK and doc release parity Step-by-Step Setup Instructions Connect your GitHub account and select your SDK repository. Replace YOURGOOGLESHEETID and YOURSHEET_GID with your tracking spreadsheet. Add your Notion FAQ database ID. Configure your Slack channel ID for alerts. Run once manually to validate setup, then enable automation.
Automate Gmail responses with GPT and human-in-the-loop verification
Try It Out! This n8n template uses AI to automatically respond to your Gmail inbox by drafting response for your approval via email. How it works Gmail Trigger monitors your inbox for new emails AI Analysis determines if a response is needed based on your criteria Draft Generation creates contextually appropriate replies using your business information Human Approval sends you the draft for review before sending Auto-Send replies automatically once approved Setup Connect your Gmail account to the Gmail Trigger node Update the "Your Information" node with: Entity name and description Approval email address Resource guide (FAQs, policies, key info) Response guidelines (tone, style, formatting preferences) Configure your LLM provider (OpenAI, Claude, Gemini, etc.) with API credentials Test with a sample email Requirements n8n instance (self-hosted or cloud) Gmail account with API access LLM provider API key Need Help? Email Nick @ nick@tropicflare.com