by Tomas Lubertino
This template monitors a Google Drive folder, converts PDF documents into clean text chunks with Unstructured, generates OpenAI embeddings, and upserts vectors into Pinecone. It’s a practical, production-ready starting point for Retrieval-Augmented Generation (RAG) that you can plug into a chatbot, semantic search, or internal knowledge tools. How it works 1) Google Drive Trigger detects new files in a selected folder and downloads them. 2) The files are sent to Unstructured where they are split into smaller pieces (chunks). 3) The chunks are prepared to be sent to OpenAI where they are converted into vectors (embeddings). 4) The embeddings are recombined with their original data and the payload is prepared for upsert into the Pinecone index. Set up steps 1) In Pinecone, create an index with 1536 dimensions and configure it for text-embedding-3-small. 2) Copy the host url and paste it on the 'Pinecone Upsert' node. It should look something like this: https://{your-index-name}.pinecone.io/vectors/upsert. 3) Add Google Drive, OpenAI and Pinecone credentials in n8n. 4) Point the trigger to your ingest folder (you can use this article for demo). 5) Click the 'Open chat' button and enter the following: Which Git provider do the authors use?
by Einar César Santos
🧠 Long-Term Memory System for AI Agents with Vector Database Transform your AI assistants into intelligent agents with persistent memory capabilities. This production-ready workflow implements a sophisticated long-term memory system using vector databases, enabling AI agents to remember conversations, user preferences, and contextual information across unlimited sessions. 🎯 What This Template Does This workflow creates an AI assistant that never forgets. Unlike traditional chatbots that lose context after each session, this implementation uses vector database technology to store and retrieve conversation history semantically, providing truly persistent memory for your AI agents. 🔑 Key Features Persistent Context Storage**: Automatically stores all conversations in a vector database for permanent retrieval Semantic Memory Search**: Uses advanced embedding models to find relevant past interactions based on meaning, not just keywords Intelligent Reranking**: Employs Cohere's reranking model to ensure the most relevant memories are used for context Structured Data Management**: Formats and stores conversations with metadata for optimal retrieval Scalable Architecture**: Handles unlimited conversations and users with consistent performance No Context Window Limitations**: Effectively bypasses LLM token limits through intelligent retrieval 💡 Use Cases Customer Support Bots**: Remember customer history, preferences, and previous issues Personal AI Assistants**: Maintain user preferences and conversation continuity over months or years Knowledge Management Systems**: Build accumulated knowledge bases from user interactions Educational Tutors**: Track student progress and adapt teaching based on history Enterprise Chatbots**: Maintain context across departments and long-term projects 🛠️ How It Works User Input: Receives messages through n8n's chat interface Memory Retrieval: Searches vector database for relevant past conversations Context Integration: AI agent uses retrieved memories to generate contextual responses Response Generation: Creates informed responses based on historical context Memory Storage: Stores new conversation data for future retrieval 📋 Requirements OpenAI API Key**: For embeddings and chat completions Qdrant Instance**: Cloud or self-hosted vector database Cohere API Key**: Optional, for enhanced retrieval accuracy n8n Instance**: Version 1.0+ with LangChain nodes 🚀 Quick Setup Import this workflow into your n8n instance Configure credentials for OpenAI, Qdrant, and Cohere Create a Qdrant collection named 'ltm' with 1024 dimensions Activate the workflow and start chatting! 📊 Performance Metrics Response Time**: 2-3 seconds average Memory Recall Accuracy**: 95%+ Token Usage**: 50-70% reduction compared to full context inclusion Scalability**: Tested with 100k+ stored conversations 💰 Cost Optimization Uses GPT-4o-mini for optimal cost/performance balance Implements efficient chunking strategies to minimize embedding costs Reranking can be disabled to save on Cohere API costs Average cost: ~$0.01 per conversation 📖 Learn More For a detailed explanation of the architecture and implementation details, check out the comprehensive guide: Long-Term Memory for LLMs using Vector Store - A Practical Approach with n8n and Qdrant 🤝 Support Documentation**: Full setup guide in the article above Community**: Share your experiences and get help in n8n community forums Issues**: Report bugs or request features on the workflow page Tags: #AI #LangChain #VectorDatabase #LongTermMemory #RAG #OpenAI #Qdrant #ChatBot #MemorySystem #ArtificialIntelligence
by Ranjan Dailata
Notice Community nodes can only be installed on self-hosted instances of n8n. Who this is for Recipe Recommendation Engine with Bright Data MCP & OpenAI is a powerful automated workflow combines Bright Data's MCP for scraping trending or regional recipe data with OpenAI 4o mini to generate personalized recipe recommendations. This automated workflow is designed for: Food Bloggers & Culinary Creators : Who want to automate the extraction and curation of recipes from across the web to generate content, compile cookbooks, or publish newsletters. Nutritionists & Health Coaches : Who need structured recipe data to analyze ingredients, calories, and nutrition for personalized meal planning or dietary tracking. AI/ML Engineers & Data Scientists : Building models that classify cuisines, predict recipes from ingredients, or generate dynamic meal suggestions using clean, structured datasets. Grocery & Meal Kit Platforms : Who aim to extract recipes to power recommendation engines, ingredient lists, or personalized meal plans. Recipe Aggregator Startups : Looking to scale recipe data collection, filtering, and standardization across diverse cooking websites with minimal human intervention. Developers Integrating Cooking Features : Into apps or digital assistants that offer recipe recommendations, step-by-step cooking instructions, or nutritional insights. What problem is this workflow solving? This workflow solves: Automated recipe data extraction from any public URL AI-driven structured data extraction Scalable looped crawling and processing Real-time notifications and data persistence What this workflow does 1. Set Recipe Extract URL Configure the recipe website URL in the input node Set your Bright Data zone name and authentication 2. Paginated Data Extract Triggers a paginated extraction across multiple pages (recipe listing, index, or search pages) Returns a list of recipe links for processing 3. Loop Over Items Loops through the array of recipe links Each link is passed individually to the scraping engine 4. Bright Data MCP Client (Per Recipe) Scrapes each individual recipe page using scrape_as_html Smartly bypasses common anti-bot protections via Bright Data Web Unlocker 5. Structured Recipe Data Extract (via OpenAI GPT-4o mini) Converts raw HTML to clean text using an LLM preprocessing node Uses OpenAI GPT-4o mini to extract structured data 6. Webhook Notification Pushes the structured recipe data to your configured webhook endpoint Format: JSON payload, ideal for Slack, internal APIs, or dashboards 7. Save Response to Disk Saves the structured recipe JSON information to local file system Pre-conditions You need to have a Bright Data account and do the necessary setup as mentioned in the "Setup" section below. You need to have an OpenAI Account. Setup Sign up at Bright Data. Navigate to Proxies & Scraping and create a new Web Unlocker zone by selecting Web Unlocker API under Scraping Solutions. In n8n, configure the Header Auth account under Credentials (Generic Auth Type: Header Authentication). The Value field should be set with the Bearer XXXXXXXXXXXXXX. The XXXXXXXXXXXXXX should be replaced by the Web Unlocker Token. In n8n, configure the OpenAi account credentials. Make sure to set the fields as part of Set the Recipe Extract URL. Remember to set the webhook_url to send a webhook notification of recipe response. Set the desired local path in the Write the structured content to disk node to save the recipe response. How to customize this workflow to your needs You can tailor the Recipe Recommendation Engine workflow to better fit your specific use case by modifying the following key components: 1. Input Fields Node Update the Recipe URL to target specific cuisine sites or recipe types (e.g., vegan, keto, regional dishes). 2. LLM Configuration Swap out the OpenAI GPT-4o mini model with another provider (like Google Gemini) if you prefer. Modify the structured data prompt to extract custom fields that you wish. 3. Webhook Notification Configure the Webhook Notification node to point to your preferred integration (e.g., Slack, Discord, internal APIs). 4. Storage Destination Change the Save to Disk node to store the structured recipe data in: A cloud bucket (S3, GCS, Azure Blob etc.) A database (MongoDB, PostgreSQL, Firestore) Google Sheets or Airtable for spreadsheet-style access.
by Trung Tran
📝 Smart Vendor Contract Renewal & Reminder Workflow With GPT 4.1 mini Never miss a vendor renewal again! This smart workflow automatically tracks expiring contracts, reminds your finance team via Slack, and helps initiate renewal with vendors through email — all with built-in approval and logging. Perfect for managing both auto-renew and manual contracts. 📌 Who’s it for This workflow is designed for Finance and Procurement teams responsible for managing vendor/service contracts. It ensures timely notifications for expiring contracts and automates the initiation of renewal conversations with vendors. ⚙️ How it works / What it does ⏰ Daily Trigger Runs every day at 6:00 AM using a scheduler. 📄 Retrieve Contract List Reads vendor contract data from a Google Sheet (or any data source). Filters for contracts nearing their end date, using a Notice Period (days) field. 🔀 Branch Based on Renewal Type Auto-Renew Contracts: Compose a Slack message summarizing the auto-renewal. Notify the finance contact via Slack. Manual Renewal Contracts: Use an OpenAI-powered agent to generate a meaningful Slack message. Send message and wait for approval from the finance contact (e.g., within 8 hours). Upon approval, generate a formal HTML email to the vendor. Send the email to initiate the contract extension process. 📊 (Optional) Logging Can be extended to log all actions (Slack messages, emails, approvals) to Google Sheets or other databases. 🛠️ How to set up Prepare your Google Sheet Include the following fields: Vendor Name, Vendor Email, Service Type, Contract Start Date, Contract End Date, Notice Period (days), Renewal Type, Finance Contact, Contact Email, Slack ID, Contract Value, Notes. Sample: https://docs.google.com/spreadsheets/d/1zdDgKyL0sY54By57Yz4dNokQC_oIbVxcCKeWJ6PADBM/edit?usp=sharing Configure Integrations 🟢 Google Sheets API: To read contract data. 🔵 Slack API: To notify and wait for approval. 🧠 OpenAI API (GPT-4): To generate personalized reminders. ✉️ Email (SMTP/Gmail): To send emails to vendors. Set the Daily Scheduler Use a Cron node to trigger the workflow at 6:00 AM daily. ✅ Requirements | Component | Required | |----------------------------------|----------| | Google Sheets API | ✅ | | Slack API | ✅ | | OpenAI API (GPT-4) | ✅ | | Email (SMTP/Gmail) | ✅ | | n8n (Self-hosted or Cloud) | ✅ | | Contract Sheet with proper schema| ✅ | 🧩 How to customize the workflow Adjust Reminder Period**: Modify the logic in the Find Expiring Vendors node (based on Contract End Date and Notice Period). Change Message Tone or Format**: Customize the OpenAI agent's prompt or switch from plain text to branded HTML email. Add Logging or Tracking: Add a node to append logs to a **Google Sheet, Notion, or database. Replace Data Source: Swap out Google Sheets for **Airtable, PostgreSQL, or other CRM/database systems. Adjust Wait/Approval Duration**: Modify the sendAndWait Slack node timeout (e.g., from 8 hours to 2 hours). 📦 Optional Extensions 🧾 Add PDF contract preview via Drive link 🧠 Use GPT to summarize renewal terms 🛠 Auto-create Jira task for contract review
by Onur
Proactively retain customers predicted to churn with this automated n8n workflow. Running daily, it identifies high-risk customers from your Google Sheet, uses Google Gemini to generate personalized win-back offers based on their churn score and preferences, sends these offers via Gmail, and logs all actions for tracking. What does this workflow do? This workflow automates the critical process of customer retention by: Running automatically every day** on a schedule you define. Fetching customer data** from a designated Google Sheet containing metrics like predicted churn scores and preferred categories. Filtering* to identify customers with a high churn risk (score > 0.7) who haven't recently received a specific campaign (based on the created_campaign_date field - *you might need to adjust this logic). Using Google Gemini AI to dynamically generate one of three types of win-back offers, personalized based on the customer's specific churn score and preferred product categories: Informational: (Score 0.7-0.8) Highlights new items in preferred categories. Bonus Points: (Score 0.8-0.9) Offers points for purchases in a target category (e.g., Books). Discount Percentage: (Score 0.9-1.0) Offers a percentage discount in a target category (e.g., Books). Sending the personalized offer* directly to the customer via *Gmail**. Logging** each sent offer or the absence of eligible customers for the day in a separate 'SYSTEM_LOG' Google Sheet for monitoring and analysis. Who is this for? CRM Managers & Retention Specialists:** Automate personalized outreach to at-risk customers. Marketing Teams:** Implement data-driven retention campaigns with minimal manual effort. E-commerce Businesses & Subscription Services:** Proactively reduce churn and increase customer lifetime value. Anyone** using customer data (especially churn prediction scores) who wants to automate personalized retention efforts via email. Benefits Automated Retention:** Set it up once, and it runs daily to engage at-risk customers automatically. AI-Powered Personalization:** Go beyond generic offers; tailor messages based on churn risk and customer preferences using Gemini. Proactive Churn Reduction:* Intervene *before customers leave by addressing high churn scores with relevant offers. Scalability:** Handle personalized outreach for many customers without manual intervention. Improved Customer Loyalty:** Show customers you value them with relevant, timely offers. Action Logging:** Keep track of which customers received offers and when the workflow ran. How it Works Daily Trigger: The workflow starts automatically based on the schedule set (e.g., daily at 9 AM). Fetch Data: Reads all customer data from your 'Customer Data' Google Sheet. Filter Customers: Selects customers where predicted_churn_score > 0.7 AND created_campaign_date is empty (verify this condition fits your needs). Check for Eligibility: Determines if any customers passed the filter. IF Eligible Customers Found: Loop: Processes each eligible customer one by one. Generate Offer (Gemini): Sends the customer's predicted_churn_score and preferred_categories to Gemini. Gemini analyzes these and the defined rules to create the appropriate offer type, value, title, and detailed message, returning it as structured JSON. Log Sent Offer: Records action_taken = SENT_WINBACK_OFFER, the timestamp, and customer_id in the 'SYSTEM_LOG' sheet. Send Email: Uses the Gmail node to send an email to the customer's user_mail with the generated offer_title as the subject and offer_details as the body. IF No Eligible Customers Found: Set Status: Creates a record indicating system_log = NOT_FOUND. Log Status: Records this 'NOT_FOUND' status and the current timestamp in the 'SYSTEM_LOG' sheet. n8n Nodes Used Schedule Trigger Google Sheets (x3 - Read Customers, Log Sent Offer, Log Not Found) Filter If SplitInBatches (Used for Looping) Langchain Chain - LLM (Gemini Offer Generation) Langchain Chat Model - Google Gemini Langchain Output Parser - Structured Set (Prepare 'Not Found' Log) Gmail (Send Offer Email) Prerequisites Active n8n instance (Cloud or Self-Hosted). Google Account** with access to Google Sheets and Gmail. Google Sheets API Credentials (OAuth2):** Configured in n8n. Two Google Sheets:** 'Customer Data' Sheet: Must contain columns like customer_id, predicted_churn_score (numeric), preferred_categories (string, e.g., ["Books", "Electronics"]), user_mail (string), and potentially created_campaign_date (date/string). 'SYSTEM_LOG' Sheet: Should have columns like system_log (string), date (string/timestamp), and customer_id (string, optional for 'NOT_FOUND' logs). Google Cloud Project** with the Vertex AI API enabled. Google Gemini API Credentials:** Configured in n8n (usually via Google Vertex AI credentials). Gmail API Credentials (OAuth2):** Configured in n8n with permission to send emails. Setup Import the workflow JSON into your n8n instance. Configure Schedule Trigger: Set the desired daily run time (e.g., Hours set to 9). Configure Google Sheets Nodes: Select your Google Sheets OAuth2 credentials for all three Google Sheets nodes. 1. Fetch Customer Data...: Enter your 'Customer Data' Spreadsheet ID and Sheet Name. 5b. Log Sent Offer...: Enter your 'SYSTEM_LOG' Spreadsheet ID and Sheet Name. Verify column mapping. 3b. Log 'Not Found'...: Enter your 'SYSTEM_LOG' Spreadsheet ID and Sheet Name. Verify column mapping. Configure Filter Node (2. Filter High Churn Risk...): Crucially, review the second condition: {{ $json.created_campaign_date.isEmpty() }}. Ensure this field and logic correctly identify customers who should receive the offer based on your campaign strategy. Modify or remove if necessary. Configure Google Gemini Nodes: Select your configured Google Vertex AI / Gemini credentials in the Google Gemini Chat Model node. Review the prompt in the 5a. Generate Win-Back Offer... node to ensure the offer logic matches your business rules (especially category names like "Books"). Configure Gmail Node (5c. Send Win-Back Offer...): Select your Gmail OAuth2 credentials. Activate the workflow. Ensure your 'Customer Data' and 'SYSTEM_LOG' Google Sheets are correctly set up and populated. The workflow will run automatically at the next scheduled time. This workflow provides a powerful, automated way to engage customers showing signs of churn, using personalized AI-driven offers to encourage them to stay. Adapt the filtering and offer logic to perfectly match your business needs!
by Trung Tran
📒 Telegram Expense Tracker to Google Sheets with GPT-4.1 👤 Who’s it for This workflow is for anyone who wants to log their daily expenses by simply chatting with a Telegram bot. Ideal for: Individuals who want a quick way to track spending Freelancers who log receipts and purchases on the go Teams or small business owners who want lightweight expense capture ⚙️ How it works / What it does User sends a text message on Telegram describing an expense (e.g., “Bought coffee for 50k at Highlands”) Message format is validated If the message is text, it proceeds to GPT-4.1 Mini for processing. If it's not text (e.g. image or file), the bot sends a fallback message. OpenAI GPT-4.1 Mini parses the message and returns: relevant: true/false expense_record: structured fields (date, amount, currency, category, description, source) message: a friendly confirmation or fallback If valid: The bot replies with a fun acknowledgment The data is saved to a connected Google Sheet If invalid: A fallback message is sent to encourage proper input 🛠️ How to set up 1. Telegram Bot Setup Create a bot using BotFather on Telegram Copy the bot token and paste it into the Telegram Trigger node 2. Google Sheet Setup Create a Google Sheet with these columns: Date | Amount | Currency | Category | Description | SourceMessage Share the sheet with your n8n service account email 3. OpenAI Configuration Connect the OpenAI Chat Model node using your OpenAI API key Use GPT-4.1 Mini as the model Apply a system prompt that extracts structured JSON with: relevant, expense_record, and message 4. Add Parser Use the Structured Output Parser node to safely parse the JSON response 5. Conditional Logic Nodes Is text message? Checks if the message is in text format Supported scenario? Checks if relevant = true in the LLM response 6. Final Actions If relevant**: Send confirmation via Telegram Append row to Google Sheet If not relevant**: Send fallback message via Telegram ✅ Requirements Telegram bot token OpenAI GPT-4.1 Mini API access n8n instance (self-hosted or cloud) Google Sheet with access granted to n8n Basic understanding of n8n node configuration 🧩 How to customize the workflow | Feature | How to Customize | |----------------------------------|-------------------------------------------------------------------| | Add multi-currency support | Update system prompt to detect and extract different currencies | | Add more categories | Modify the list of categories in the system prompt | | Track multiple users | Add username or chat ID column to the Google Sheet | | Trigger alerts | Add Slack, Email, or Telegram alerts for specific expense types | | Weekly summaries | Use a cron node + Google Sheet query + Telegram message | | Visual dashboards | Connect the sheet to Looker Studio or Google Data Studio | Built with 💬 Telegram + 🧠 GPT-4.1 Mini + 📊 Google Sheets + ⚡ n8n
by Aryan Shinde
How it works This workflow automates the process of creating, approving, and optionally posting LinkedIn content from a Google Sheet. Here's a high-level overview: Scheduled Trigger: Runs automatically based on your defined time interval (daily, weekly, etc.). Fetch Data from Google Sheets: Pulls the first row from your sheet where Status is marked as Pending. Generate LinkedIn Post Content: Uses OpenAI to create a professional LinkedIn post using the Post Description and Instructions from the sheet. Format & Prepare Data: Formats the generated content along with the original instruction and post description for email. Send for Approval: Sends an email to a predefined user (e.g., marketing team) with a custom form for approval, including a dropdown to accept/reject and an optional field for edits. (Optional) Image Fetch: Downloads an image from a URL (if provided in the sheet) for future use in post visuals. Set up steps You’ll need the following before you start: A Google Sheet with the following columns: Post Description, Instructions, Image (URL), Status Access to an OpenAI API key A connected Gmail account for sending approval emails Your own Google Sheets and Gmail credentials added in n8n Steps: Google Sheet Preparation: Create a new Google Sheet with the mentioned columns (Post Description, Instructions, Image, Status, Output, Post Link). Add a row with test data and set Status to Pending. Credentials: In n8n, create OAuth2 credentials for: a. Google Sheets b. Gmail c. OpenAI (API Key) Assign these credentials to the respective nodes in the JSON. OpenAI Model: Choose a model like gpt-4o-mini (used here) or any other available in your plan. Adjust the prompt in the "Generate Post Content" node if needed. Email Configuration: In the Gmail node, set the recipient email to your own or your team’s address. Customize the email message template if necessary. Schedule the Workflow: Set the trigger interval (e.g., every morning at 9 AM). Testing: Run the workflow manually first to confirm everything works. Check Gmail for the approval form, respond, and verify the results.
by Robert Breen
This n8n workflow scrapes recent Instagram posts by hashtag and generates new, relevant caption ideas using OpenAI. It avoids making up suggestions by analyzing real-world content and surfacing common patterns. ✅ Use Case Marketing teams, content creators, or social media managers can: Discover what’s trending for a specific topic Automatically generate Instagram captions based on real posts Understand common caption styles for a niche Save time brainstorming ideas while staying on-brand 🧠 How It Works 1️⃣ Manual Trigger 🧩 Node: When clicking ‘Execute workflow’ Manually starts the workflow for testing or single-run execution. 2️⃣ Define the Hashtag 🧩 Node: Create Search Term Sets the value of the hashtag you'd like to scan. Default is n8n, but you can modify it to anything. { "Search_Term": "yourCustomHashtag" } 3️⃣ Scrape Instagram Posts 🧩 Node: Find Recent Posts API**: Apify Instagram Hashtag Scraper Setup**: Visit Apify Console Create an API token In n8n, go to Credentials and add HTTP Query Auth Use ?token=yourTokenHere as the query string JSON Body: { "hashtags": ["{{ $json.Search_Term }}"], "resultsLimit": 20, "resultsType": "posts" } 4️⃣ Extract Captions 🧩 Node: Set bio and follower count Extracts just the caption from each post and stores it in a clean variable for the AI agent to use. 5️⃣ Aggregate Captions 🧩 Node: Aggregate Gathers all captions into one list before processing. Useful for passing a large text block into the AI. 6️⃣ Convert to Single Text Block 🧩 Node: Convert table names and columns into single text for agent Uses a Code node to combine all captions into a single string for OpenAI to read: return [ { json: { text: items .map(item => - ${JSON.stringify(item.json)}) .join('\n\n'), }, }, ]; 7️⃣ Generate Caption Ideas with AI 🧩 Node: AI Agent Takes the combined post text and sends it to GPT-4o-mini. Includes this system message: I'm looking for ideas for posts about {{ $('Create Search Term').item.json.Search_Term }}. Here’s the last 5 posts on Instagram about the topic. Use those to help me generate a list of relevant captions. Do not make up ideas that are not like the others in the list. Output like this: { "Post Idea": ["Idea1", "Idea2"], "Most Common Post": ["common post 1", "common post 2"] } 8️⃣ Choose Language Model 🧩 Node: OpenAI Chat Model Model**: gpt-4o-mini Credential**: Use your OpenAI API key. Get it from: OpenAI API Keys Add it in n8n under OpenAI credentials. 9️⃣ Parse the AI Output 🧩 Node: Structured Output Parser Parses the GPT response into structured JSON: { "Post Idea": ["Idea1", "Idea2"], "Most Common Post": ["common post 1", "common post 2"] } 🔟 Split the Outputs 🧩 Nodes: Split Out, Split Out1 Separates the Post Idea list and Most Common Post list into individual items. 🔁 Merge for Final Output 🧩 Node: Merge Combines the two split lists into one output stream. 👤 Need More Help? Robert Breen Automation Consultant | AI Workflow Designer | n8n Expert 📧 robert@ynteractive.com 🔗 LinkedIn
by Lakshit Ukani
One-way sync between Telegram, Notion, Google Drive, and Google Sheets Who is this for? This workflow is perfect for productivity-focused teams, remote workers, virtual assistants, and digital knowledge managers who receive documents, images, or notes through Telegram and want to automatically organize and store them in Notion, Google Drive, and Google Sheets—without any manual work. What problem is this workflow solving? Managing Telegram messages and media manually across different tools like Notion, Drive, and Sheets can be tedious. This workflow automates the classification and storage of incoming Telegram content, whether it’s a text note, an image, or a document. It saves time, reduces human error, and ensures that media is stored in the right place with metadata tracking. What this workflow does Triggers on a new Telegram message** using the Telegram Trigger node. Classifies the message type** using a Switch node: Text messages are appended to a Notion block. Images are converted to base64, uploaded to imgbb, and then added to Notion as toggle-image blocks. Documents are downloaded, uploaded to Google Drive, and the metadata is logged in Google Sheets. Sends a completion confirmation** back to the original Telegram chat. Setup Telegram Bot: Set up a bot and get the API token. Notion Integration: Share access to your target Notion page/block. Use the Notion API credentials and block ID where content should be appended. Google Drive & Sheets: Connect the relevant accounts. Select the destination folder and spreadsheet. imgbb API: Obtain a free API key from imgbb. Replace placeholder credential IDs and asset URLs as needed in the imported workflow. How to customize this workflow to your needs Change Storage Locations**: Update the Notion block ID or Google Drive folder ID. Switch Google Sheet to log in a different file or sheet. Add More Filters**: Use additional Switch rules to handle other Telegram message types (like videos or voice messages). Modify Response Message**: Personalize the Telegram confirmation text based on the file type or sender. Use a different image hosting service** if you don’t want to use imgbb.
by Davide
This workflow automates the process of generating and scheduling social media posts using content from a WordPress blog. It leverages advanced AI (OpenAI & Anthropic Claude), Google Sheets, and the Postiz platform to create and publish platform-specific posts across LinkedIn, Facebook, Instagram, and Twitter (X). This system streamlines cross-platform social media publishing, ensuring consistent branding and AI-optimized content. Key Features Content Source: WordPress Automatically fetches the content of a WordPress post by its Post ID. Content Transformation via AI Uses Anthropic Claude and OpenAI to generate unique, optimized captions for each platform: LinkedIn: professional and insight-driven Instagram: creative with emojis and storytelling Facebook: community-oriented and friendly Twitter (X): concise, hashtag-optimized Visual Generation (Optional) Uses OpenAI's DALL·E (via OpenRouter) to generate custom images based on the AI-generated Instagram and Facebook/LinkedIn captions. Post Management with Google Sheets Uses a Google Sheet as the control panel: Simply input the WordPress Post ID Marks each post as “done” by updating corresponding columns (TWITTER, FACEBOOK, INSTAGRAM, LINKEDIN) Publishing via Postiz Uses the Postiz API to schedule or immediately publish posts to your connected social accounts. Handles image uploads and scheduling time for each platform. Benefits 💡 Intelligent automation: Saves time by removing manual copywriting and platform formatting. 🎯 Platform optimization: Ensures posts are tailored to each platform’s audience and algorithm. 🛠️ No-code friendly: Simple setup via Google Sheets + Postiz + WordPress. 🔁 Repeatable & Scalable: Ideal for agencies or content creators managing multiple posts per week. 🧪 +20 Social Media Platforms: Easy to start with social integrations. How It Works Input & Data Fetching: The workflow starts with a manual trigger (e.g., "Test workflow") or scheduled execution. It retrieves a WordPress post ID from a Google Sheets document, then fetches the full post content (title and body) via the WordPress API. AI-Powered Content Generation: The "Social Media Manager" node (powered by Claude Opus 4.1) analyzes the post and generates platform-optimized captions for: Twitter/X: Concise, hashtag-rich text (≤150 chars). Facebook/LinkedIn: Professional yet engaging copy with CTAs. Instagram: Visual-focused captions with emojis and hashtags. AI-generated images are created for Instagram (square) and Facebook/LinkedIn (landscape) using OpenAI’s image model. Publishing Automation: Captions and images are uploaded to Postiz, a social media scheduler. Postiz publishes the content to connected platforms (Twitter, Facebook, LinkedIn, Instagram) at the specified time. Google Sheets is updated with status markers (e.g., "x" in columns like TWITTER, FACEBOOK) to track published posts. Set Up Steps Prerequisites: Postiz Account: Sign up for Postiz (free trial available). API Keys: Configure Postiz API credentials in the "Postiz" and "Upload Image" nodes. Social Channels: Link your social accounts in Postiz’s dashboard and note their integrationId values (replace "XXX" in Postiz nodes). Google Sheets Setup: Clone the template Sheet and add WordPress post IDs to the "POST ID" column. Configure Nodes: WordPress: Add credentials for your WordPress site in the "Get Post" node. AI Models: Ensure API keys for Claude (Anthropic) and OpenAI (for images) are valid. Postiz Nodes: Replace placeholder integrationId values with your actual Postiz channel IDs. Test & Deploy: Trigger the workflow manually to verify captions, images, and Postiz scheduling. Activate the workflow for automation (e.g., run daily to publish new WordPress posts). Note: This workflow requires self-hosted n8n due to community nodes (Postiz, LangChain). Need help customizing? Contact me for consulting and support or add me on Linkedin.
by Frank Chen
Automatically fetch existing domains from Notion's Database and verify the validity of SSL certificates through SSL-Checker. If the validity period is less than 14 days, send a Telegram message notification and trigger SSH remote automatic refresh. Successful refresh notification will be sent through Telegram. This can prevent problems with the server-side automatic refresh program, which may cause unexpected service interruptions. Main use cases: Notion store domain. Telegram receives warning messages. Remotely trigger Certbot to refresh SSL. How it works: Record who triggered this workflow, because if there is a credential that is about to expire, this workflow will be triggered repeatedly. After getting all the domains from Notion, send an http request to SSL-Checker. After getting all the SSL-Checker results, add the validity label. And use the IF node to check if there are any certificates that are about to expire. Then there are two workflows: If there is a certificate that is about to expire: send an SSH command to the remote control server to refresh the certificate, notify through Telegram, and call this workflow again to re-verify the validity of the SSL certificate. If the validity period of SSL is normal: then refresh the data on Notion, and if a re-called workflow is detected, Telegram will be used to notify that the SSL has been updated.
by WeWeb
This n8n template helps you build a full AI-powered LinkedIn content generator with just a few clicks. Paired with the free WeWeb UI template, it becomes a ready-to-use web app where users can: Add their own OpenAI API key Customize the prompt and define 6 content topics Edit the AI-generated topics Choose when to generate LinkedIn posts, complete with hashtags and an optional image Who This Is For Perfect for marketers, indie hackers, and solopreneurs who want to build their personal brand on LinkedIn while staying in control of what gets posted. 🧠 What Makes This Different Unlike most AI agents, you stay fully in control: You define the tone and focus via the prompt. You choose which topics to keep or modify. You decide when to generate a post. You can build on top of this and create your own SaaS product. It’s also modular and extendable—hook it up to your backend, add user login, or feed AI improvements based on user input. ⚙️ How It Works Triggering Events: The app includes 3 pre-configured triggers, ready to be hooked into your WeWeb frontend. Just update the webhook URLs after duplicating the n8n workflow. Topic Generation: A call is made to OpenAI (GPT-4) to generate topic ideas based on your prompt. Post Creation: Once topics are approved or edited, GPT-4 writes full posts with suggested hashtags. Image Generation (Optional): If enabled, a DALL·E call generates a relevant image. Everything Stays Local: All data and images are handled locally, no cloud storage setup needed. 🧪 Requirements & Setup No fancy infrastructure required. Here’s what helps you get started: Free WeWeb account** (recommended) to use the frontend UI template OpenAI account** with API access (for GPT-4 and DALL·E) n8n account** (self-hosted or cloud) to run the backend workflow The template is completely free to use. Since each user adds their own OpenAI API key, you don't need to worry about usage costs or rate limits on your end. 🔧 Want to Go Further? This setup is beginner-friendly, but developers can: Add user accounts Save post history Feed user feedback back into the prompt logic Launch their own branded version as a SaaS