by WeblineIndia
Automate Telegram Chat Responses Using Google Gemini By WeblineIndia* ⚡ TL;DR (Quick Steps) Create a Telegram bot using @BotFather and copy the API Token. Obtain Google Gemini API Key via Google Cloud. Set up the n8n workflow: Trigger: Telegram message received. AI Model: Google Gemini generates response. Output: AI reply sent back to user via Telegram. Customize the system prompt, model, or message handling to suit your use case. 🧠 Description This n8n workflow enables seamless automation of real-time chat replies in Telegram by integrating with Google Gemini's Chat Model. Every time a user sends a message to your Telegram bot, the workflow routes it through the Gemini AI, which analyzes and crafts a professional response. This reply is then automatically delivered back to the user. The setup acts as a lightweight but powerful chatbot system — ideal for businesses, customer service, or even personal productivity bots. You can easily modify its tone, intelligence level, or logging mechanisms to cater to specific domains such as sales, tech support, or general Q&A. 🎯 Purpose of the Workflow The primary goal of this workflow is to automate intelligent, context-aware chat responses in Telegram using a robust AI model. It eliminates manual reply handling, enhances user engagement, and ensures 24/7 interaction capabilities — all through a no-code or low-code setup using n8n. 🛠️ Steps to Configure and Use ✅ Pre-Conditions / Requirements Telegram Bot Token**: Get it from @BotFather. Google Gemini API Key**: Available via Google Cloud PaLM/Gemini API access. n8n Instance**: Hosted or local instance with required nodes installed (Telegram, Basic LLM Chain, and Google Gemini support). 🔧 Setup Instructions Step 1: Telegram Trigger – Listen for Incoming Messages Add Telegram Trigger node. Select Trigger On: Message. Authenticate using your Telegram Bot Token. This will capture incoming messages from any user interacting with your bot. Step 2: Google Gemini AI – Generate a Smart Reply Add the Basic LLM Chain node. Connect the input message ({{$json.message.text}}) from the Telegram Trigger. System Prompt: > "You are an AI assistant. Reply to the following user message professionally:" Choose Google Gemini Chat Model (models/gemini-1.5-pro). Connect this node to receive the text input and pass it to Gemini for processing. Step 3: Telegram Reply – Send the AI Response Add a Telegram node (Operation: Send Message). Set Chat ID dynamically from the Telegram Trigger node. Input the generated message from the Gemini output. Enable Parse Mode as HTML for rich formatting. Final Step: Link All Nodes Receive Telegram Message → Generate AI Response → Send Telegram Reply. > Tip: Test the workflow by sending a message to your Telegram bot and ensure you receive an AI-generated reply. 🧩 Customization Guidance ✏️ Modify the AI tone by updating the system prompt. 🤖 Use other AI models (e.g., OpenAI GPT-4o). 🔍 Add filters to respond differently based on specific keywords. 📊 Extend the workflow to store chats in Google Sheets, Airtable, or databases for audit or analytics. 🌐 Multi-language support: Add translation layers before and after AI processing. 🛠️ Troubleshooting Guide No message received?** Check if your Telegram bot is active and webhook is working. AI not responding?** Validate your Google Gemini API key and usage quota. Wrong replies?** Refine the system prompt or validate message routing. Formatting issues?** Ensure Parse Mode is correctly set to HTML. 💡 Use Case Examples Customer Service Chatbot** for product queries. Educational Bots** for answering user questions on a topic. Mental Health Companion** that gives supportive replies. Event-based Announcers** or automatic responders during off-hours. > And many more! This workflow can be easily extended to support advanced use cases with just a few additional nodes. 👨💻 About the Creator This workflow is developed by WeblineIndia, a trusted provider of AI development services and process automation solutions. If you're looking to build or customize intelligent workflows like this, we invite you to get in touch with our team. We also offer specialized Python development and AI developer hiring services to supercharge your automation needs.
by Eduardo Hales
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. How it works This workflow is a simple AI Agent that connects to Langfuse so send tracing data to help monitor LLM interactions. The main idea is to create a custom LLM model that allows the configuration of callbacks, which are used by langchain to connect applications such Langfuse. This is achieves by using the "langchain code" node: Connects a LLM model sub-node to obtain the model variables (model name, temp and provider) - Creates a generic langchain initChatModel with the model parameters. Return the LLM to be used by the AI Agent node. 📋 Prerequisites Langfuse instance (cloud or self-hosted) with API credentials LLM API key (Gemini, OpenAI, Anthropic, etc.) n8n >= 1.98.0 (required for LangChain code node support in AI Agent) ⚙️ Setup Add these to your n8n instance: Langfuse configuration LANGFUSE_SECRET_KEY=your_secret_key LANGFUSE_PUBLIC_KEY=your_public_key LANGFUSE_BASEURL=https://cloud.langfuse.com # or your self-hosted URL LLM API key (example for Gemini) GOOGLE_API_KEY=your_api_key Alternative: Configure these directly in the LangChain code node if you prefer not to use environment variables Import the workflow JSON Connect your preferred LLM model node Send a test message to verify tracing appears in Langfuse
by Akram Kadri
Who is this for? This workflow is designed for YouTubers who want to update their video descriptions in bulk without manually editing each one. It's especially useful for creators who include a standard set of links in their descriptions and need to insert a new link between existing ones across multiple videos. What problem does this workflow solve? Manually updating video descriptions for multiple videos can be tedious and time-consuming. If you have a section in your video descriptions that contains important links, adding a new one in a specific position (e.g., between two existing links) can be a challenge. This workflow automates that process, allowing you to insert a specific string between two predefined rows in all of your video descriptions at once. What this workflow does Fetches all videos from your YouTube channel. Iterates through each video to retrieve its existing description. Identifies two predefined rows in the description. Inserts a new row between the two specified rows. Updates the video description with the modified text. Setup Connect your YouTube account to n8n and grant necessary permissions. Define your variables in the "Set String to Insert" node: rowBefore: The existing row after which the new row will be inserted. rowToInsert: The new text or link to insert. rowAfter: The existing row before which the new row will be inserted. Run the workflow using the manual trigger. Review the updated descriptions to ensure accuracy. How to customize this workflow to your needs Change the insertion criteria** by modifying the rowBefore and rowAfter values. Insert multiple rows** by adjusting the JavaScript code in the Code node. Extend the workflow** by adding conditions (e.g., only updating descriptions of videos with certain tags). Filter specific** videos instead of updating all by modifying the "Get All Videos" node. This workflow ensures that all your YouTube descriptions stay updated and consistent with minimal effort.
by Luke
Built this for a dedicated Slack outage-notifications channel — works well on both desktop and mobile. This is for: IT Administrators & small MSPs looking to streamline M365 alerts from one or multiple mailboxes into a single or specific Slack channels IT Admins who prefer ChatOps over management-by-email What does it do Scans for M365 outage alerts emails (every 1 min) Checks if it impacts a specific user region (if the alert calls it out, countries have to be manually set) Summarizes the incident using OpenAI o4-mini (cheap model - or you can swap for local Ollama) Sends a Slack Block to your outage channel with incident link (can be extended) Deletes the original alert email after successful delivery Credentials Outlook: Create an Outlook credential (OAuth2.0) to point to the mailbox (regular or shared) where M365 service alerts will be received Slack: Create a Slack bot credential with access to the slack channel you want updates posted to OpenAI: Create a OpenAI credential that has access to the GPT-4O-MINI model. Recommend you use projects in OpenAI so that you may set a per-project-budget and not impact other projects. Review this OpenAI documentation for more info on managing Projects in the API portal. Expect this to consume no more than 1-2 cents per month on average. Setup Download & import the workflow Modify the first Outlook block (Check for 365 Service Alert) to use the Outlook credential Modify the OpenAI block's system prompt to call out the countries your users reside in ie. "- Assume the organization has users primarily in the U.S. and Australia. If those regions are affected, state: "Your users may have been affected." Otherwise, add: "No impact expected for your user base."" ← swap U.S. & Australia for desired countries Modify the Slack block (Post outage to Slack) to specify the channel updates will be posted to Sample Slack Output Workflow Diagram
by Anton Vanhoucke
This workflow converts Notion pages to markdown, and then converts that markdown back to Notion blocks. It will triple the content of the last updated page it finds. This is useless by itself, but you can copy-paste from this workflow to create your own. Prerequisites A notion account with some pages or databases Setup instructions Create a notion credential and share some pages as described here: https://docs.n8n.io/integrations/builtin/credentials/notion/ How it works The HTTP Request gets notion child blocks from a page, because the default n8n block only gets plain text and no links. The first code block converts it to markdown. The second code block converts it back to Notion blocks The last HTTP block appends everything to the original Notion page, essentially duplicating it for the purpose of demoing the script. I hope in the future we get official n8n blocks that extract markdown, or use markdown to write to Notion. There is community block that also does this, but this template is easier: you can simply copy-paste the blocks from this workflow.
by Praveena
Idea The idea for app came since I wanted to build a unique gift for my niece because she gets excited for her birthday (which Im going to miss this year). The web app has a simple countdown (in html and JS) but more importantly, there is an AI agent that will answer some specific questions and know her preferences. How it works The questions from app are sent via web hook to N8N which has pulls preferences file (about her likes, dislikes, personality) from postgre and AI Agent that will answer questions/respond. The current status is stored back in postgre (especially about status of cat and universe happenings) before responding back. Features Integrated AI chatbot via N8N webhook Persistent conversation history Minimizable chat interface Fallback support for offline testing Features: -- Wheres Mittens - This is a query to track her lost cat in multiverse. -- Multiverse updates with recent update stored Pre Requisites Postgre SQL database is available. Alternatively, use any other database but change the N8N nodes. LLM Api Key. Step by Step Instructions Export this N8N Workflow. Modify LLM API Key, I used openAI, 4.1 For web app scofflding,you will need Node, HTML and Javascript. I've created a mini version using Node and JS with web app and N8N connection settings here: <https://github.com/productiser/FiBirthdayAgent> PostgreSQL Database Script (1 table for memory and context storage): CREATE TABLE fifi_world_context ( id TEXT PRIMARY KEY, -- e.g., 'agent_fifi' cat_location TEXT, -- e.g., "Bubble Nebula" cat_activity TEXT, -- e.g., "Playing laser tag with moon mice" fifi_preferences JSONB, -- e.g., likes/dislikes/foods/shows world_history TEXT, -- Summary of narrative events last_updated TIMESTAMP DEFAULT CURRENT_TIMESTAMP ); 5.Modify system prompt as per your needs. Built With N8N Self hosted Self hosted web app Hosted on Vercel Total spend = <£1 (AI costs only) Total Time = <1 day Support Watch this video for web app overview and how it looks. <https://youtu.be/e7PlrTdvwoM> Contact me on info@pankstr.com/ superllmuser@gmail.com for any queries Hope you enjoy!!
by Greg Evseev
This n8n workflow template allows you to upload a photo to a SharePoint folder using the Microsoft Graph API. The workflow includes steps for authentication, retrieving a photo for testing purposes, setting the destination folder and file name, and uploading the photo. Who is this for? This workflow is ideal for users who need to automate the process of uploading images to SharePoint. It is particularly useful for developers, IT administrators, and anyone managing digital assets within a SharePoint environment. What problem is this workflow solving? / Use Case This workflow addresses the need to automate the uploading of photos to a specific SharePoint folder. By using the Microsoft Graph API, it ensures secure and efficient file management, reducing manual effort and potential errors. What this workflow does Trigger the Workflow: The workflow starts when the user clicks the 'Test workflow' button. Set Configuration: Sensitive data such as TENANT_ID, CLIENT_ID, and CLIENT_SECRET are set. Authentication: Obtains an access token from Microsoft Graph API using the provided credentials. Get Photo: Retrieves a sample photo from a URL for testing purposes. Set Destination: Sets the target folder and file name for the photo upload. Upload Photo: Uploads the photo to the specified SharePoint folder using the Microsoft Graph API. Setup Prerequisites Create an Application User: Follow this guide to create an application user. Set Permissions: Ensure the following permissions are set: Sites.ReadWrite.All: For SharePoint site access. Files.ReadWrite.All: For file upload operations. Authentication For successful authentication, provide the following: TENANT_ID CLIENT_ID CLIENT_SECRET Note: For demonstration purposes, these values are stored in a 'Set' node. In a production environment, ensure the safety of such data using credentials, secure vaults, or other safe methods. Set Destination The destination is defined by two parameters: TARGET_FOLDER: The folder path in SharePoint where the photo will be uploaded. FILE_NAME: The name of the file to be uploaded. Example: Desired file location: https://contoso.sharepoint.com/uploads/pictures from n8n/example.jpg Set the following: TARGET_FOLDER = /uploads/pictures from n8n FILE_NAME = example.jpg How to Customize This Workflow to Your Needs Update Sensitive Data: Replace the placeholder values for TENANT_ID, CLIENT_ID, and CLIENT_SECRET with your actual credentials. Change Destination: Modify the TARGET_FOLDER and FILE_NAME parameters to match your desired upload location and file name. Test with Different Photos: Update the URL in the 'Get Photo' node to test with different images. Sticky Notes Workflow Overview This sticky note explains the overall purpose and dependencies of the workflow. Authentication Details This sticky note provides details on the authentication process and the importance of securing sensitive data. Set Destination Details This sticky note explains how to set the destination folder and file name for the photo upload. By following these guidelines, you can easily customize and use this workflow to automate photo uploads to SharePoint using the Microsoft Graph API.
by Airtop
Monitor X for Relevant Posts Use Case This automation monitors X (formerly Twitter) search pages in real time and extracts high-signal posts that match your categories of interest. It’s ideal for community engagement, lead discovery, thought leadership tracking, or competitive analysis. What This Automation Does Given a search URL and a list of categories, it: Logs into X using Airtop Opens the specified search URL Scrolls through the results Extracts up to 10 valid, English-language posts Filters and classifies each post by category (or marks as [NA] if unrelated) Returns the structured results as JSON Input parameters: airtop_profile** — An Airtop browser profile authenticated on X x_url** — X search URL (e.g., https://x.com/search?q=ai agents&f=live) relevant_categories** — Text-based list of categories to classify posts (e.g., "Web automation use cases", "Thought leadership") Output: A JSON array of posts, each with: writer time text url category How It Works Trigger: This workflow is triggered by another workflow (e.g., a community engagement pipeline). Input Setup: Accepts the Airtop profile, search URL, and categories to use for classification. Session: Starts a browser session using the Airtop profile. Window Navigation: Opens the provided X search URL. Extraction: Scrapes up to 10 posts with /status/ in the URL and text in English. Classification: Each post is labeled with a category if relevant, or [NA] otherwise. Filtering: Discards [NA] posts. Output: Returns the list of classified posts. Setup Requirements Airtop profile with an active X login. Airtop API key connected in n8n. List of category definitions to guide post classification (used in prompt). Next Steps Feed into Engagement Workflows**: Pass the results to workflows that reply, retweet, or track posts. Use in Slack Alerts**: Push classified posts into Slack channels for review and reaction. Customize Classifier**: Refine the categorization logic to include sentiment or company mentions. Read more about Monitoring X for Relevant Posts
by Automate With Marc
✉️ Telegram Email Agent with GPT + Gmail Category: Messaging / AI Agent Level: Beginner-Friendly Tags: Telegram, Email Automation, AI Agent, Gmail, GPT Model Watch Step-by-step video guide here: https://www.youtube.com/watch?v=nyI40s9QOuw&t=420s&pp=0gcJCb4JAYcqIYzv 🤖 What This Workflow Does This workflow turns your Telegram bot into a personal email assistant powered by AI. With just a message on Telegram, users can: Send an email via Gmail Automatically generate the email content using OpenAI Models. Get confirmation or responses directly in Telegram It's like ChatGPT meets Gmail, inside your Telegram chat. 🔧 How It Works Telegram Trigger – Listens for incoming messages from your bot. AI Agent – Processes the input using OpenAI Model and converts it into structured email content (To, Subject, Body). Memory Node – Stores short-term context per user (via chat ID), so the agent can hold simple conversations. Gmail Node – Sends the generated email using your Gmail account. Telegram Node – Replies to the user confirming the output or status. 🧠 Why This is Useful Ever wanted to send an email while on the go, without typing the whole thing out in Gmail? This is a fast, intuitive, and AI-powered way to: Dictate or draft emails from anywhere Create an AI-powered virtual assistant via Telegram Integrate n8n's Langchain Agent with real-world productivity use cases 🪜 Setup Instructions Connect your Telegram bot via BotFather and add the credentials in n8n. Set up your OpenAI API key (GPT-4o-mini recommended). Add your Gmail OAuth credentials. Activate the workflow and start messaging your bot!
by Abdul Mir
Company Website Chatbot Agent Overview This workflow implements a modular Website AI Chatbot Assistant capable of handling multiple types of customer interactions autonomously. Instead of relying on a single large agent to handle all logic and tools, this system routes user queries to specialized sub-agents—each dedicated to a specific function. By using a manager-style orchestration layer, this approach prevents overloading a single AI model with excessive context, leading to cleaner routing, faster execution, and easier scaling as your automation needs grow. How It Works 1. Chat Trigger The flow is initiated when a chat message is received via the website widget. 2. Manager Agent (Ultimate Website AI Assistant) The central LLM-based agent is responsible for parsing the message and deciding which specialized sub-agent to route it to. It uses an OpenAI GPT model for natural language understanding and a lightweight memory system to preserve recent context. 3. Sub-Agent Routing calendarAgent: Handles availability checks and books meetings on connected calendars. RAGAgent: Searches company documentation or FAQs to provide accurate responses from your internal knowledge base. ticketAgent: Forwards requests to human support by generating and sending support tickets to a designated email. Setup Instructions Embed the Chatbot Use a custom HTML widget or script to embed the chatbot interface on your website. Connect the frontend to the webhook that triggers the When chat message received node. Configure Your OpenAI Key Insert your API key in the OpenAI Chat Model node. Adjust the model parameters for temperature, max tokens, etc., based on how formal or creative you want the bot to be. Customize Sub-Agents calendarAgent: Connect to your Google or Outlook calendar. RAGAgent: Link to a vector store or document database via API or native integration. ticketAgent: Set the destination email and format for ticket generation (e.g. via SendGrid or SMTP). Deploy in Production Host on n8n Cloud or your self-hosted instance. Monitor usage through the Executions tab and refine prompts based on user behavior. Benefits Modular system with dedicated logic per function Reduces token bloat by offloading complexity to sub-agents Easy to scale by adding more tools (e.g. CRM, analytics) Fast and responsive user experience for customers on your site Cleaner code structure and easier debugging
by Yang
👤 Who is this for? This workflow is ideal for social media managers, personal brand strategists, ghostwriters, and founders who want to post regularly on LinkedIn without spending hours writing from scratch. It’s also useful for marketing agencies and assistants looking to automate consistent post creation using curated articles as source material. 🧩 What problem does this workflow solve? Manually reading multiple articles, extracting key insights, and writing a clean, professional LinkedIn post is a time-consuming process. This workflow automates everything: from pulling topics, finding related articles, summarizing them using AI, and even generating a matching image to accompany the post. It ensures faster content turnaround, more consistency, and less manual effort. 🔁 What this workflow does This workflow starts manually and retrieves one topic marked as “To do” from a Google Sheet. That topic is used as a search term for Dumpling AI’s search endpoint, which scrapes and returns the top three article contents related to the topic. These articles are sent to a LangChain agent powered by GPT-4o, which analyzes and summarizes the content into a LinkedIn post in a friendly, insightful tone. It also generates an image prompt for the post. After generating the post and image prompt, the data is extracted using a Set node. The prompt is sent to Dumpling AI’s image generation endpoint, which returns an image URL. Finally, the post text, image prompt, image URL, and status update (“created”) are saved back to the original row in Google Sheets. 🛠️ Workflow Breakdown Manual Trigger – Starts the automation. Google Sheets (Get Topic) – Searches for the first row in your content pipeline sheet where the “status” is “To do”. HTTP Request (Dumpling AI Search) – Uses the topic as a search query to pull 3 article contents using Dumpling AI’s API. Set LangChain GPT Model – Defines GPT-4o as the LLM for the LangChain Agent. LangChain Agent (Summarize & Generate) – Summarizes all 3 articles and generates a LinkedIn post and a related image prompt. Set (Extract Data) – Extracts postText and imagePrompt from the LangChain agent output. HTTP Request (Dumpling Image Gen) – Sends imagePrompt to Dumpling AI’s image generation endpoint. Update Google Sheets – Writes the post, image prompt, and image URL back to the sheet and changes the row status to “created”. ⚙️ Setup Instructions Dumpling AI Sign up at Dumpling AI Get your API key and connect it in the HTTP Request nodes (Search and Image endpoints) Use the /search endpoint to retrieve article content Use the /generate-image endpoint to create the image Google Sheets Create a spreadsheet with columns: topic, status, postText, imagePrompt, imageURL Add sample topics and set their status to To do LangChain (GPT-4o) Connect your OpenAI credentials to n8n Make sure GPT-4o is available in your OpenAI account Use the LangChain node to process multi-input summarization and generate a social media caption Customize the Prompt (Optional) Adjust the Set node to tweak the input format sent to the LangChain agent Add constraints like tone, hashtags, or emojis to fit your brand style 🧠 How to Customize This Workflow Change the content source (RSS feed, Notion DB, etc.) instead of Google Sheets Add a scheduler node to run this automatically every morning or weekly Use Airtable instead of Google Sheets for more control and filtering Send the final post to LinkedIn using the Buffer or LinkedIn API Add a Telegram or Slack notification when new content is ready for approval
by Zain Ali
🧾 Generate Project Summary from meeting transcript Who’s it for 🤝 Project managers looking to automate client meeting summaries Client success teams needing structured deliverables from transcripts Agencies and consultants who want consistent, repeatable documentation How it works / What it does ⚙️ Trigger: Manual or webhook trigger kicks off the workflow. Get meeting transcript: Reads the raw transcript from a specified Google Docs file. Generate summary: Sends transcript + instructions to OpenAI (gpt-4.1-mini) to produce a structured project summary. Convert to HTML: Transforms the LLM-generated Markdown into styled HTML. Prepare request: Wraps HTML and metadata into a multipart request body. Create Google Doc: Uploads the new “Project Summary” document into your Drive folder. How to set up 🛠️ Credentials Google Docs & Drive OAuth2 credentials OpenAI API key (gpt-4.1-mini) Nodes configuration Manual Trigger / webhook node Google Docs “Get meeting transcript” node: set documentURL AI Chat Model node: select gpt-4.1-mini Markdown node: enable tables & emoji Google Drive “CreateGoogleDoc” node: set target folder ID Paste in your IDs Update documentURL to your transcript doc Update google_drive_folder_id in the Set node Execute Click “Execute Workflow” or call via webhook Requirements 📋 n8n Google OAuth2 scopes for Docs & Drive OpenAI account with GPT-4.1-mini access A Google Drive folder to store summaries How to customize ✨ Output format**: Edit the Markdown prompt in the ChainLlm node to adjust headings or tone Timeline section**: Extend LLM prompt template with your own phase table Styling**: Tweak inline CSS in the Code node (Prepare_Request) for fonts or margins Trigger**: Swap Manual Trigger for HTTP/Webhook trigger to integrate with other tools Language model**: Upgrade to a different model by changing model.value in the AI node