đ¤ Build an interactive AI agent with chat interface and multiple tools
How it works This template is a complete, hands-on tutorial that lets you build and interact with your very first AI Agent. Think of an AI Agent as a standard AI chatbot with superpowers. The agent doesn't just talk; it can use tools to perform actions and find information in real-time. This workflow is designed to show you exactly how that works. The Chat Interface (Chat Trigger): This is your window to the agent. It's a fully styled, public-facing chat window where you can have a conversation. The Brain (AI Agent Node): This is the core of the operation. It takes your message, understands your intent, and intelligently decides which "superpower" (or tool) it needs to use to answer your request. The agent's personality and instructions are defined in its extensive system prompt. The Tools (Tool Nodes): These are the agent's superpowers. We've included a variety of useful and fun tools to showcase its capabilities: Get a random joke. Search Wikipedia for a summary of any topic. Calculate a future date. Generate a secure password. Calculate a monthly loan payment. Fetch the latest articles from the n8n blog. The Memory (Memory Node): This gives the agent a short-term memory, allowing it to remember the last few messages in your conversation for better context. When you send a message, the agent's brain analyzes it, picks the right tool for the job, executes it, and then formulates a helpful response based on the tool's output. Set up steps Setup time: ~3 minutes This template is nearly ready to go out of the box. You just need to provide the AI's "brain." Configure Credentials: This workflow requires an API key for an AI model. Make sure you have credentials set up in your n8n instance for either Google AI (Gemini) or OpenAI. Choose Your AI Brain (LLM): By default, the workflow uses the Google Gemini node. If you have Google AI credentials, you're all set! If you prefer to use OpenAI, simply disable the Gemini node and enable the OpenAI node. You only need one active LLM node. Make sure it is connected to the Agent parent node. Explore the Tools: Take a moment to look at the different tool nodes connected to the Your First AI Agent node. This is where the agent gets its abilities! You can add, remove, or modify these to create your own custom agent. Activate and Test! Activate the workflow. Open the public URL for the Example Chat Window node (you can copy it from the node's panel). Start chatting! Try asking it things like: "Tell me a joke." "What is n8n?" "Generate a 16-character password for me." "What are the latest posts on the n8n blog?" "What is the monthly payment for a $300,000 loan at 5% interest over 30 years?"
Telegram bot starter template setup & AI agent chatbot
Telegram Bot Starter template workflow + n8n AI Agent Chatbot provides a foundational setup for creating powerful Telegram bots with n8n. It handles incoming messages, photos, files, and voice notes, making it an excellent starting point for developers looking to create bots for customer engagement, support, or interactive services. Sign up to n8n now â and try it! Key Features: Dynamic Message Handling: Respond to text messages, photos, files, and more. Modular Design: Easily integrate additional workflows such as user registration, payment modules, or custom commands. Error Handling: Ensure the bot gracefully manages errors and user inputs. Extensibility: This workflow is the base for building any Telegram bot. Additional modules, such as a user registration module, payment integration, and user profile management, are available for easy connection to expand the botâs functionality. âđťUse the Telegram user registration workflow â đľUse the Telegram Payment, Invoicing and Refund Workflow for Stars â Who Can Use This Workflow? Developers looking for a quick way to build and customize Telegram bots. Businesses and service providers who need customer interaction automation. Setup Instructions: Replace Telegram credentials with your own API credentials. Customize responses for different message types (text, photo, file). If integrating with external services (like Google Sheets), update the necessary credentials and links. UPDATES: đĽ Get the most up-to-date and expanded version â June 25: New! AI Agent + Setup Instructions Simple setup instructions and examples are included inside the workflow as sticky notes. Sep 24: Improved message handler: Updated logic to handle various types of messages using Switch (text, photo, file, voice, and callback). Payment processing: Added new nodes for sending invoices and handling payments via Telegram Aug 24: Changed processing of system events: ânew userâ and âuser who blocked botâ events Please reach out to Victor if you need further assistance with your n8n workflows and automations! Sign up to n8n â, you have to try it!
WhatsApp RAG chatbot with Supabase, Gemini 2.5 Flash, and OpenAI embeddings
WhatsApp RAG Chatbot with Supabase, Gemini 2.5 Flash, and OpenAI Embeddings This n8n template demonstrates how to build a WhatsApp-based AI chatbot that answers user questions using document retrieval (RAG) powered by Supabase for storage, OpenAI embeddings for semantic search, and Gemini 2.5 Flash LLM for generating high-quality responses. Use cases are many: Turn your WhatsApp into a knowledge assistant for FAQs, customer support, or internal company documents â all without coding. --- Good to know The workflow uses OpenAI embeddings for both document embeddings and query embeddings, ensuring accurate semantic search. Gemini 2.5 Flash LLM is used to generate user-friendly answers from the retrieved context. Messages are processed in real-time and sent back directly to WhatsApp. Workflow is modular â you can split document ingestion and query handling for large-scale setups. Supabase and WhatsApp API credentials must be configured before running. --- How it works Trigger: A new WhatsApp message triggers the workflow via webhook. Message Check: Determines if the message is a query or a document upload. Document Handling: Fetch file URL from WhatsApp. Convert binary to text. Generate embeddings with OpenAI and store them in Supabase. Query Handling: Generate query embeddings with OpenAI. Retrieve relevant context from Supabase. Pass context to Gemini 2.5 Flash LLM to compose a response. Response: Send the answer back to the user on WhatsApp. Optional: Add Gmail node to forward chat logs or daily summaries. --- How to use Configure WhatsApp Business API webhook for incoming messages. Add your Supabase and OpenAI credentials in n8nâs credentials manager. Upload documents via WhatsApp to populate the Supabase vector store. Ask queries â the bot retrieves context and answers using Gemini 2.5 Flash. --- Requirements WhatsApp Business API (or Twilio WhatsApp Sandbox) Supabase account (vector storage for embeddings) OpenAI API key (for generating embeddings) Gemini API access (for LLM responses) --- Customising this workflow Swap WhatsApp with Telegram, Slack, or email for different chat channels. Extend ingestion to other sources like Google Drive or Notion. Adjust the number of retrieved documents or prompt style in Gemini for tone control. Add a Gmail output node to send logs or alerts automatically.
Chat with your event schedule from Google Sheets in Telegram
What it is Chat with your event schedule from Google Sheets in Telegram: "When is the next meetup?" "How many events are there next month?" "Who presented most often?" "Which future meetups have no presenters yet?" This workflow lets you chat with a telegram bot about past, present and future events that are scheduled in a Google Spreadsheet. (Info: This proof-of-concept was created as a demo for a hackathon of an AI & Developer Meetup in Da Nang (Vietnam) that uses a telegram group to organize) Who it is for If you want an easy way for your audience to get information about your events, you can us this workflow for the same purpose, or easily adapt it to your needs and different use-cases where you want to query smaller amounts of tabular data in natural language. How it works Upon getting triggered by a chat message to a telegram bot, the schedule of meetups is retrieved from Google Spreadsheets, converted into a markdown table syntax and fed into the system prompt of an LLM (we're using OpenRouter in this example), whose output is posted back as answer into the same telegram chat. Setup steps TO REVIEWING IN ACTION As the reviewer of this workflow, you can temporarily use it via an existing telegram bot, simply point your telegram client to https://t.me/AiDaNangBot and start to ask questions like: "When is the next meetup?" "What future meetings do not have presenters?" "Who presented on Future of Human Relationships?" To build upon this workflow: Import the workflow Customize the Google Docs credentials for your individual access Create a telegram bot and connect it to the workflow by entering its API token into the credentials used in the telegram trigger node In the "Settings" node, replace the "scheduleURL" with the URL of your own copy of the Google Spreadsheet or a copy of the Event Schedule Template Sheet to spin off your own â whereby the structure of the spreadsheet doesn't matter, it's just important that you semantically structure your information in dedicated columns clearly labeled in the header row.
Webpage change detection & alerts with Google Suite and hash tracking
This n8n template can monitor and detect changes to a webpage's contents and notify you only when a change occurs. Great to keep an eye on and track publicly available documents such as company TOS, government policy or competitor pages. How it works A scheduled trigger is used so we can run everyday to automate this process. A website page is then fetched with the HTTP request node and the contents we want to track are extracted using the HTML node. To detect changes, we generate a hash on the contents with the cryptography node and compare it with previously seen hashes using the "remove duplicates" node. If the hash was seen before, the workflow stops here. Finally, when new changes are detected a copy of the contents are uploaded to Google Drive and a logged into a Google sheet. A notification email can also be sent if action is required. How to use Update the URL you want to track in the node named "variables" and ensure the HTML node has updated selectors to get the content you want. Ensure the timezone is set correctly when using the Scheduled Trigger node. Requirements Google Sheets, Drive and Gmail for storing and notifying about changes. Webpages should ideally be publicly accessible. If not, you may need to switch the HTTP request node with a webscraping service. Customising this workflow Not using Google? Easier swap to other Service providers such as Miscrosoft365. Need more URLs? Try modifing the variables node to accept multiple URLs though the HTML node will need to be customised.
Beginner Outlook calendar summary with OpenAI
A step-by-step demo that shows how to pull your Outlook calendar events for the week and ask GPT-4o to write a short summary. Along the way youâll practice basic data-transform nodes (Code, Filter, Aggregate) and see where to attach the required API credentials. --- 1ď¸âŁ Manual Trigger â Run Workflow | Why | Lets you click âExecuteâ in the n8n editor so you can test each change. | | --- | --- | --- 2ď¸âŁ Get Outlook Events â Get many events Node type: Microsoft Outlook â Event â Get All Fields selected: subject, start API setup (inside this node): Click Credentials ⸠Microsoft Outlook OAuth2 API If you havenât connected before: Choose âMicrosoft Outlook OAuth2 APIâ â âCreate Newâ. Sign in and grant the Calendars.Read permission. Save the credential (e.g., âMicrosoft Outlook accountâ). Output: A list of events with the raw ISO start time. > Teaching moment: Outlook returns a full dateTime string. Weâll normalize it next so itâs easy to filter. --- 3ď¸âŁ Normalize Dates â Convert to Date Format js // Code node contents return $input.all().map(item => { const startDateTime = new Date(item.json.start.dateTime); const formattedDate = startDateTime.toISOString().split('T')[0]; // YYYY-MM-DD return { json: { ...item.json, startDateFormatted: formattedDate } }; }); 4ď¸âŁ Filter the Events Down to This Week After weâve normalised the start date-time into a simple YYYY-MM-DD string, we drop in a Filter node. Add one rule for every day you want to keepâfor example 2025-08-07 or 2025-08-08. Rows that match any of those dates will continue through the workflow; everything else is quietly discarded. Why weâre doing this: we only want to summarise tomorrowâs and the following dayâs meetings, not the entire calendar. --- 5ď¸âŁ Roll All Subjects Into a Single Item Next comes an Aggregate node. Tell it to aggregate the subject field and choose the option âOnly aggregated fields.â The result is one clean item whose subject property is now a tidy list of every meeting title. Itâs far easier (and cheaper) to pass one prompt to GPT than dozens of small ones. --- 6ď¸âŁ Turn That List Into Plain Text Insert a small Code node right after the aggregation: js return [{ json: { text: items .map(item => JSON.stringify(item.json)) .join('\n') } }]; Need a Hand? Iâm always happy to chat automation, n8n, or Outlook API quirks. Robert Breen â Automation Consultant & n8n Instructor đ§ robert@ynteractive.comâ|âLinkedIn
Automate customer support with WhatsApp AI assistant for Whatsapp groups
How it works Your WhatsApp AI Assistant automatically handles customer inquiries by linking your Google Docs knowledge base to incoming WhatsApp messages. The system instantly processes customer questions, references your business documentation, and delivers AI-powered responses through OpenAI or Gemini - all without you lifting a finger. Works seamlessly in individual chats and WhatsApp groups where the assistant can respond on your behalf. Set up steps Time to complete: 15-30 minutes Step 1: Create your WhapAround account and connect your WhatsApp number (5 minutes) Step 2: Prepare your Google Doc with business information and add the document ID to the system (5 minutes) Step 3: Configure the WhatsApp webhook and map message fields (10 minutes) Step 4: Connect your OpenAI or Gemini API key (3 minutes) Step 5: Send a test message to verify everything works (2 minutes) Optional: Set up PostgreSQL database for conversation memory and configure custom branding/escalation rules (additional 15-20 minutes) Detailed technical configurations, webhook URLs, and API parameter settings are provided within each workflow step to guide you through the exact setup process.
AI-powered reservation reminder calls for restaurant with Twilio & Grok-4
đ¤đ This workflow automates the process of calling customers to remind them of their booking reservations using AI-generated messages and a Twilio phone number. It can easily be adapted for other venues. --- Key Benefits Time-Saving Automation: Eliminates the need for manual calls by staff, saving hours per week. Human-like AI Messages: Uses a custom language model to generate polite, natural phone messages tailored to each customer. Multi-Channel Integration: Google Sheets for reservation tracking. Twilio for automated calling. OpenRouter (or other LLMs) for generating speech content. Error Reduction: Ensures all customers receive reminders exactly on the reservation day, minimizing no-shows. Scalable: Easily adapts to growing reservation lists and more complex message logic. Suitable for restaurants, hairdressers, offices and any other business --- How It Works Trigger: The workflow can be triggered manually (via "When clicking âExecute workflowâ) or automatically at 11 AM daily (via Schedule Trigger). Data Fetch: Retrieves todayâs reservations from a Google Sheet, filtering rows where DATE = today and CALLED is empty. AI-Generated Call Script: For each reservation, the Secretary Agent (powered by OpenRouterâs Grok-4) generates a phone script using the guestâs name, time, and party size. Twilio Call: The script is sent to Twilio, which calls the guestâs phone number (from the sheet) and reads the message aloud using text-to-speech. Update & Loop: Marks the reservation as called (CALLED = "x") in the sheet and waits 2 minutes between calls to avoid rate limits. --- Set Up Steps Twilio Configuration: Sign up for Twilio, buy a phone number, and: Enable text-to-speech (set language to Italian). Configure geo permissions for the target country. Add credentials to the Twilio node (sender number in From field). Google Sheets Setup: Clone the Google Sheet template and ensure: Phone numbers include the international prefix (without "+"). Columns: DATE, TIME, NAME, N. PEOPLE, PHONE, CALLED. OpenRouter API: Connect the OpenRouter Chat Model node to your account (using Grok-4 or another model). Deploy: Activate the workflow and test with manual execution. Note: The workflow is currently inactive (active: false). Enable it after setup. ---- Need help customizing? Contact me for consulting and support or add me on Linkedin.
Store new orders to Airtable and summarize daily orders through email
What this template does This workflow will collect order data as it is produced, then send a summary email of all orders at the end of every day, formatted in a table. It receives new orders via webhook and stores in Airtable. At 7PM every day, it sends a summary email with the day's orders in a HTML table Setup: Instructions Video Create a new table in Airtable and give it a field time with type date, orderID with type number, and orderPrice also with type number. Create a new access token if you haven't already at https://airtable.com/create/tokens/new. Make sure to give the token the scopes data.records:read, data.records:write, schema.bases:read and access to whichever table you choose to store the orders. A pop-up window appears with the token. Use this token to make Create New Credential > Access Token for Airtable in the Store Order and Airtable Get Today's Orders nodes. Create access credentials for your Gmail as described here: https://developers.google.com/workspace/guides/create-credentials. Use the credentials from your client_secret.json in the Send to Gmail node. In the Store Order node, change Base and Table to the database and table in your Airtable account you wish to use to store orders. Make sure to use these same values in the Airtable Get Today's Orders node. Every time an order is created in your system, send a POST request to Webhook from your order software. Each request must contain a single order containing fields 'orderID' and 'orderPrice' (or, edit Set Order Fields to select which incoming fields you wish to save) Change the schedule time for sending email from Everyday at 7PM to whichever time you choose. Test: Activate the workflow. From the node Webhook, copy Production URL Send the following CURL request to the URL given to you: curl -X POST -H "Content-Type: application/json" -d '{"orderID": 12345, "orderPrice": 99.99}' YOURURLHERE It should say Node executed successfully. Now check your Airtable and confirm the order was stored in the right place.
IP reputation check & SOC alerts with Splunk, VirusTotal and AlienVault
IP Reputation Check & Threat Summary using Splunk + VirusTotal + AlienVault + n8n This workflow automates IP reputation analysis using Splunk alerts, enriches data via VirusTotal and AlienVault OTX, and generates actionable threat summaries for SOC teams â all without any coding. --- What It Does When a Splunk alert contains a suspicious IP: Ingests the IP from the Splunk alert via webhook. Performs dual threat enrichment using: VirusTotal IP reputation & tags. AlienVault OTX pulses, reputation & WHOIS. Merges & processes threat intel data. Generates a rich HTML summary for analyst review. Routes action based on severity: Sends Slack alert for suspicious IPs. Creates an incident in ServiceNow. Emails a formatted HTML report to the SOC inbox. --- Tech Stack Used Splunk â SIEM alert source VirusTotal API â Reputation check & analysis stats AlienVault OTX API â Community threat intel & pulse info n8n â For orchestration, merging, summary generation Slack, Gmail, ServiceNow â For SOC notifications and ticketing --- Ideal Use Case Perfect for security teams wanting to: Automatically validate IP reputation from SIEM logs Get quick context from multiple threat feeds Generate email-ready reports and escalate high-risk IPs --- Included Nodes Webhook (Splunk) Function nodes for IOC extraction and intel processing HTTP Request (VirusTotal & AlienVault) Merge + Switch nodes for conditional logic Gmail, Slack, ServiceNow integration --- Tips Add your VirusTotal and AlienVault credentials in n8n's credential manager. Use the Switch node to route based on your internal threat score logic. Easily extend this to include AbuseIPDB or GreyNoise for deeper enrichment.
Convert documents to Markdown with MinerU API and GPT-4o-mini
How it works This workflow automates the conversion of various document formats (such as PDF, Word, and PPT) into Markdown. It connects to the MinerU API service, which leverages OCR, formula, and table recognition to produce high-quality output. Users can initiate the process by simply uploading a document through an n8n chat interface. Set up steps Ensure you have a local n8n instance running. Set up and run the MinerU MCP (MinerU Computing Platform) server locally. Import this workflow into your n8n instance. Configure your AI model credentials (e.g., for OpenAI, add your API Key and Base URL). Click the "Write Files from Disk" node and edit the file path to your desired local save location. Click the "MCP Client" node and input your MinerU MCP server address (e.g., http://localhost:8000/sse). Click the "Open Chat" button to upload a file, send a message, and test the workflow.
Daily Google Ads performance to Notion and Google Sheets
Description This workflow automates the daily reporting of Google Ads campaign performance. It pulls click and conversion data from the Google Ads API, merges both datasets, and stores the results into Notion databases and Google Sheets. It includes a campaign-level log and a daily performance summary. The workflow is triggered automatically every day at 08:00 AM, helping marketing teams maintain a consistent and centralized reporting system without manual effort. --- How It Works Scheduled Trigger at 08:00 AM The workflow begins with a Schedule Trigger node that runs once per day at 08:00. Set Yesterdayâs Date The Set node defines a variable for the target date (yesterday), which is used in the API queries. Query Google Ads API â Clicks & Cost The first HTTP request pulls campaign-level metrics: campaign.id, campaign.name metrics.clicks, metrics.impressions, metrics.cost_micros Query Google Ads API â Conversions The second HTTP request pulls conversion-related data: metrics.conversions, segments.conversionactionname Split and Merge Both responses are split into individual campaign rows and merged using: campaign.id segments.date Store Campaign-Level Data Stored in Notion database: "Google Ads Campaign Tracker" Appended to Google Sheets tab: "Campaign Daily Report" Generate Daily Summary A code node calculates daily totals across all campaigns: Total impressions, clicks, conversions, cost Unique conversion types The summary is stored in: Notion database: "Google Ads Daily Summary" Google Sheets tab: "Summary Report" --- Setup Steps Schedule the Workflow The workflow is triggered using a Schedule Trigger node Set the schedule to run every day at 08:00 AM Connect it to the Set Yesterday Date node Google Ads API Access Create a Google Ads developer account and obtain a developer token Set up OAuth2 credentials with Google Ads scope In n8n, configure the Google Ads OAuth2 API credential Ensure HTTP request headers include: developer-token login-customer-id Content-Type: application/json Notion Database Setup Create two databases in Notion: Google Ads Campaign Tracker Fields: Campaign Name, Campaign ID, Impressions, Clicks, Cost, Conversion Type, Conversions, Date Google Ads Daily Summary Fields: Date, Total Impressions, Total Clicks, Total Conversions, Total Cost, Conversion Types Share both databases with your Notion integration Google Sheets Setup Create a spreadsheet with two tabs: Campaign Daily Report â for campaign-level rows Summary Report â for daily aggregated metrics Match all column headers to the workflow fields Connect your Google account to n8n using Google Sheets OAuth2 --- Output Summary Notion Databases: Google Ads Campaign Tracker: stores individual campaign metrics Google Ads Daily Summary: stores daily totals and conversion types Google Sheets Tabs: Campaign Daily Report: per-campaign data Summary Report: aggregated daily performance