by Guillaume Duvernay
Unlock a new level of sophistication for your AI agents with this template. While the native n8n Think Tool is great for giving an agent an internal monologue, it's limited to one instance. This workflow provides a clever solution using a sub-workflow to create multiple, custom thinking tools, each with its own specific purpose. This template provides the foundation for building agents that can plan, act, and then reflect on their actions before proceeding. Instead of just reacting, your agent can now follow a structured, multi-step reasoning process that you design, leading to more reliable and powerful automations. Who is this for? AI and automation developers:** Anyone looking to build complex, multi-tool agents that require robust logic and planning capabilities. LangChain enthusiasts:** Users familiar with advanced agent concepts like ReAct (Reason-Act) will find this a practical way to implement similar frameworks in n8n. Problem solvers:** If your current agent struggles with complex tasks, giving it distinct steps for planning and reflection can dramatically improve its performance. What problem does this solve? Bypasses the single "Think Tool" limit:** The core of this template is a technique that allows you to add as many distinct thinking steps to your agent as you need. Enables complex reasoning:** You can design a structured thought process for your agent, such as "Plan the entire process," "Execute Step 1," and "Reflect on the result," making it behave more intelligently. Improves agent reliability and debugging:** By forcing the agent to write down its thoughts at different stages, you can easily see its line of reasoning, making it less prone to errors and much easier to debug when things go wrong. Provides a blueprint for sophisticated AI:** This is not just a simple tool; it's a foundational framework for building state-of-the-art AI agents that can handle more nuanced and multi-step tasks. How it works The re-usable "Thinking Space": The magic of this template is a simple sub-workflow that does nothing but receive text. This workflow acts as a reusable "scratchpad." Creating custom thinking tools: In the main workflow, we use the Tool (Workflow) node to call this "scratchpad" sub-workflow multiple times. We give each of these tools a unique name (e.g., Initial thoughts, Additional thoughts). The power of descriptions: The key is the description you give each of these tool nodes. This description tells the agent when and how it should use that specific thinking step. For example, the Initial thoughts tool is described as the place to create a plan at the start of a task. Orchestration via system prompt: The main AI Agent's system prompt acts as the conductor, instructing the agent on the overall process and telling it about its new thinking abilities (e.g., "Always start by using the Initial thoughts tool to make a plan..."). A practical example: This template includes two thinking tools to demonstrate a "Plan and Reflect" cycle, but you can add many more to fit your needs. Setup Add your own "action" tools: This template provides the thinking framework. To make it useful, you need to give the agent something to do. Add your own tools to the AI Agent, such as a web search tool, a database lookup, or an API call. Customize the thinking tools: Edit the description of the existing Initial thoughts and Additional thoughts tools. Make them relevant to the new action tools you've added. For example, "Plan which of the web search or database tools to use." Update the agent's brain: Modify the system prompt in the main AI Agent node. Tell it about the new action tools you've added and how it should use your customized thinking tools to complete its tasks. Connect your AI model: Select the OpenAI Chat Model node and add your credentials. Taking it further Create more granular thinking steps:** Add more thinking tools for different stages of a process, like a "Hypothesize a solution" tool, a "Verify assumptions" tool, or a "Final answer check" tool. Customize the thought process:* You can change *how the agent thinks by editing the prompt inside the fromAI('Thoughts', ...) field within each tool. You could ask for thoughts in a specific format, like bullet points or a JSON object. Change the workflow trigger:** Switch the chat trigger for a Telegram trigger, email, Slack, whatever you need for your use case! Integrate with memory:** For even more power, combine this framework with a long-term memory solution, allowing the agent to reflect on its thoughts from past conversations.
by Oneclick AI Squad
๐ Automated School Fee Reminder Workflow with Payment Link Automatically sends fee reminders (via email and WhatsApp) to parents with secure payment links, 3 days before the due date. ๐ง Main Components Daily Fee Check โ 8 AM** Scheduled trigger that starts the workflow daily at 8 AM. Read Pending Fees** Fetches student fee records from an Excel sheet (using getAll method). Process Fee Reminders** Filters records to find pending fees due within the next 3 days. Prepare Email Reminder** Generates personalized email messages with payment links. Wait for Email Preparation** Adds delay/wait condition for email logic readiness. Send Email Reminder** Sends the fee reminder email with a secure payment link to the parent. Prepare WhatsApp Reminder** Generates WhatsApp-friendly messages with fee and payment details. Wait for WhatsApp Preparation** Waits for WhatsApp message logic to complete. Send WhatsApp Message** Sends the message to the parentโs WhatsApp number using a message API. Update Reminder Status** Updates the Excel file to mark reminders as sent to avoid duplicates. ๐งฉ Channels Used ๐ง Email โ with personalized payment link ๐ฌ WhatsApp โ formatted reminder message ๐ Payment Integration Secure payment links are auto-generated per student to enable direct and safe online fee payments. โ Essential Prerequisites Excel sheet with fee records (student_fee_data.xlsx) SMTP credentials for sending email WhatsApp API or provider integration (like Twilio or Gupshup) Access to a payment gateway or service for link generation File storage access to update reminder status in Excel ๐ Required Excel File Structure (student_fee_data.xlsx) | Student ID | Name | Email | Phone | Fee Due Date | Amount | Reminder Sent | | ---------- | ---- | ----- | ----- | ------------ | ------ | ------------- | ๐งพ Expected Input Format Example { "studentId": "ST123", "name": "Ria Mehta", "email": "ria.mehta@example.com", "phone": "+919123456789", "dueDate": "2025-08-10", "amount": "โน5000", "reminderSent": "No" } ๐ Key Features โฐ Scheduled Daily Execution โ Fully automated at 8 AM ๐งฎ Due-Date Filtering โ Only targets fees due in the next 3 days ๐ฌ Multi-Channel Notifications โ Sends reminders via both Email and WhatsApp ๐ Secure Payment Links โ Auto-generated for each student ๐ Reminder Tracking โ Prevents duplicate reminders by updating status โ๏ธ Quick Setup Guide Import Workflow JSON into your n8n instance. Configure schedule in the โDaily Fee Checkโ node (default: 8 AM). Set Excel file path in the โRead Pending Feesโ node. Update your fee processing logic in the โProcess Fee Remindersโ node. Add email credentials in the โSend Email Reminderโ node. Integrate WhatsApp provider API in the โSend messageโ node. Define how you generate secure payment links. Test with sample data and activate workflow. ๐ ๏ธ Parameters to Configure | Parameter | Description | | ------------------ | ------------------------------------------ | | excel_file_path | Path to the fee tracking Excel file | | smtp_host | SMTP server for sending email reminders | | smtp_user | Email username | | smtp_password | Email password | | whatsapp_api_key | WhatsApp API key for sending messages | | payment_api_url | URL for generating payment links | | admin_email | (Optional) Admin email for error reporting |
by Intuz
This n8n template from Intuz provides a complete and automated solution for hyper-personalized email outreach. It powerfully combines AI with Gmail and Google Sheets, using specific keywords and prospect data to automatically craft unique, compelling email content that boosts engagement and secures more replies. Instead of manually replying to every lead or inquiry, this template does the heavy lifting for you, ensuring every response is relevant, thoughtful, and timely. It reads each person's unique inquiry, uses OpenAI to craft a perfectly tailored and human-like response, and sends it directly from your Gmail account. Ideal for sales, marketing, and customer support teams looking to boost engagement and save hours of manual work. Use Cases: Sales Teams: Instantly follow up with new leads from your website's contact form with a personalized touch. Customer Support: Provide initial, intelligent responses to support tickets, answering common questions or acknowledging receipt of a complex issue. Marketing Automation: Nurture leads by responding to content downloads or webinar sign-ups with relevant, non-generic information. Founders & Solopreneurs: Manage all incoming business inquiries (partnerships, media, etc.) efficiently without sacrificing quality. How It Works: Trigger the Flow (Manual): Start the automation whenever you're ready to process a new batch of inquiries from your sheet. Fetch Inquiries from Google Sheets: The workflow connects to your specified Google Sheet and reads each row. It pulls the contact's First Name, Email ID, the Inquiry Intent (e.g., "Demo Request," "Pricing Inquiry"), and the full text of their Original Inquiry. Sync Your Signature: Before writing the email, an HTTP Request node dynamically fetches your display name from your Gmail account settings. This ensures the signature in the generated email (Thanks, {{Your Name}}) is always accurate. Craft a Hyper-Personalized Reply with AI: It uses this context to generate a high-quality, professional, and friendly email reply in HTML format. For example: If the intent is "Technical Support," the AI will generate a helpful, empathetic response addressing the technical issue. If the intent is "Partnership Proposal," it will draft a professional reply acknowledging the proposal and outlining the next steps. Send via Gmail: The final node takes the AI-generated message, adds a relevant subject line (e.g., "Re: Your Demo Request"), and sends it directly to the contact's email address from your connected Gmail account. This process loops for every single row in your Google Sheet, turning a list of names into a series of meaningful conversations. Setup Instructions: To get this workflow running, you'll need to configure a few things: Credentials: Google: Connect your Google account via OAuth2 and ensure you have enabled access for Google Sheets, Google Drive, and Gmail. OpenAI: Add your OpenAI API key as a credential. Google Sheet Setup: Create a Google Sheet with the following exact column headers: -First Name -Email ID -Inquiry Intent (A short category like "Demo Request", "Billing Issue", etc.) -Original Inquiry (The full text of the email or message you received). Node Configuration: Get row(s) in sheet: Select your Google Sheet document and the specific sheet name. Message a model (OpenAI): Choose your preferred OpenAI model (e.g., gpt-4-turbo, gpt-3.5-turbo). HTTP Request & Send Personalized emails: These nodes should automatically use your configured Gmail credentials. No changes are typically needed. Connect with us Website: https://www.intuz.com/cloud/stack/n8n Email: getstarted@intuz.com LinkedIn: https://www.linkedin.com/company/intuz Get Started: https://n8n.partnerlinks.io/intuz
by Tomek
How it works Use Telegram to send in new phrases (flashcard front) You can also manually input phrase in the workflow itself ChatGPT generates provided phrase description (in English but you can change it) including multiple meanings & generates examples of using the phrase in a sample sentence (flashcard back) Steps to setup Provide your Telegram bot API key (optional) Provide your OpenAI key Provide Google Sheets credentials How to import flashcards from Google Sheets into Anki Use Google Sheets to Anki add-on: 1871608121 In Anki simply click Sync Decks and you're done :) Enjoy
by Robert Breen
This n8n training workflow demonstrates how to connect a sub-workflow as a tool to an AI Agent. In this example, the main workflow is a Website Chatbot that engages visitors, collects contact information, and sends that data to a CRM process. The CRM process itself is a separate sub-workflow, connected to the agent as a tool via the Tool Workflow node. Step-by-Step Setup Instructions 1. Create the Sub-Workflow (CRM Tool) This sub-workflow will be triggered by the AI agent to process collected information. It will: Receive inputs (email, description) from the main chatbot workflow. Format the data into a structured JSON format. Append the data to a Google Sheet (acting as the CRM database). Send a confirmation message back to the main workflow. Steps inside the sub-workflow: When Executed by Another Workflow** โ Triggered by the main workflowโs tool node. Convert Conversation (Agent)** โ Uses OpenAI to extract and format the input into a JSON structure: { "email": "jane.doe@example.com", "description": "Wants help automating lead intake and sending Slack notifications." } Structured Output Parser โ Ensures the extracted data matches the expected JSON schema. Append row in sheet (Google Sheets) โ Adds the new lead data to your CRM sheet. Code Node โ Returns a simple text confirmation like "Thanks for the info, we will be in touch soon". Required setup for Google Sheets: Enable the Google Sheets API and connect your Google account in n8n. Create a sheet with at least the columns email and description. Use the sheet's Document ID and tab name in the Google Sheets node. 2. Create the Main Workflow (Website Chatbot) This workflow acts as the main AI Agent handling incoming chat messages. Steps in the main workflow: When chat message received โ Starts the workflow whenever a visitor sends a message via your chatbot integration. Website Chatbot (Agent Node) โ Configured with a System Message that: Briefly explains your services. Asks the visitor what processes they want to automate. Requests their name and email. Sends collected data to the CRM tool once email and description are available. OpenAI Chat Model โ Connects to the AI agent as its language model. Simple Memory โ Stores short-term context for the ongoing chat. CRM Tool (Tool Workflow Node) โ Points to the sub-workflow created in Step 1, allowing the chatbot to trigger it directly. 3. Connecting the Sub-Workflow to the AI Agent Add a Tool Workflow node to the main workflow. Select "Parameter" as the source. Paste in your sub-workflow JSON or select it from your n8n workflows. Connect the Tool Workflow node to your AI Agent using the ai_tool connection. Give the tool a clear description (e.g., crm tool to store lead information) so the agent knows when to use it. 4. How It Works in Action A visitor sends a message through the chatbot. The AI Agent engages, asks questions, and collects their name, email, and request. Once collected, the agent triggers the CRM Tool. The sub-workflow formats the data, stores it in Google Sheets, and sends a confirmation. The chatbot confirms with the visitor that their request was received. 5. Customization Ideas Replace Google Sheets with your actual CRM API. Add validation to ensure the email format is correct before saving. Expand the CRM tool to send a Slack or email notification after storing the lead. Created by Robert A. โ Ynteractive Website: https://ynteractive.com Email: robert@ynteractive.com
by Artur
Overview This automated workflow fetches Upwork job postings using Apify, removes duplicate job listings via Airtable, and sends new job opportunities to Slack. Key Features: Automated job retrieval** from Upwork via Apify API Duplicate filtering** using Airtable to store only unique jobs Slack notifications** for new job postings Runs every 30 minutes** during working hours (9 AM - 5 PM) This workflow requires an active Apify subscription to function, as it uses the Apify Upwork API to fetch job listings. Who is This For? This workflow is ideal for: Freelancers looking to track Upwork jobs in real time Recruiters automating job collection for analytics Developers who want to integrate Upwork job data into their applications What Problem Does This Solve? Manually checking Upwork for jobs is time-consuming and inefficient. This workflow: Automates job discovery based on your keywords Filters out duplicate listings, ensuring only new jobs are stored Notifies you on Slack when new jobs appear How the Workflow Works 1. Schedule Trigger (Every 20 Minutes) Triggers the workflow at 20-minute intervals Ensures job searches are only executed during working hours (9 AM - 5 PM) 2. Query Upwork for Jobs Uses Apify API to scrape Upwork job posts for specific keywords (e.g., "n8n", "Python") 3. Find Existing Jobs in Airtable Searches Airtable to check if a job (based on title and link) already exists 4. Filter Out Duplicate Jobs The Merge Node compares Upwork jobs with Airtable data The IF Node filters out jobs that are already stored in the database 5. Save Only New Jobs in Airtable The Insert Node adds only new job listings to the Airtable collection 6. Send a Slack Notification If a new job is found, a Slack message is sent with job details Setup Guide Required API Keys Upwork Scraper (Apify Token) โ Get your token from Apify Airtable Credentials Slack API Token โ Connect Slack to n8n and set the channel ID (default: #general) Configuration Steps Modify search keywords in the 'Assign Parameters' node (startUrls) Adjust the Working Hours in the 'If Working Hours' node Set your Slack channel in the Slack node Ensure Airtable is connected properly - you'll need to create a table with 'title' and 'link' columns. Adjust the 'If Working Hours' node to match your timezone and hours, or remove it altogether to receive notifications and updates constantly. How to Customize the Workflow Change keywords: update the startUrls in the 'Assign Parameters' node to track different job categories Change 'If Working Hours': Modify conditions in the IF Node to filter times based on your needs Modify Slack Notifications: Adjust the Slack message format to include additional job details Why Use This Workflow? Automated job tracking without manual searches Prevents duplicate entries in Airtable Instant Slack notifications for new job opportunities Customizable โ adapt the workflow to different job categories Next Steps Run the workflow and test with a small set of keywords Expand job categories for better coverage Enhance notifications by integrating Telegram, Email, or a dashboard This workflow ensures real-time job tracking, prevents duplicates, and keeps you updated effortlessly.
by Derek Cheung
Purpose of workflow: The purpose of this workflow is to automate scraping of a website, transforming it into a structured format, and loading it directly into a Google Sheets spreadsheet. How it works: Web Scraping: Uses the Jina AI service to scrape website data and convert it into LLM-friendly text. Information Extraction: Employs an AI node to extract specific book details (title, price, availability, image URL, product URL) from the scraped data. Data Splitting: Splits the extracted information into individual book entries. Google Sheets Integration: Automatically populates a Google Sheets spreadsheet with the structured book data. Step by step setup: Set up Jina AI service: Sign up for a Jina AI account and obtain an API key. Configure the HTTP Request node: Enter the Jina AI URL with the target website. Add the API key to the request headers for authentication. Set up the Information Extractor node: Use Claude AI to generate a JSON schema for data extraction. Upload a screenshot of the target website to Claude AI. Ask Claude AI to suggest a JSON schema for extracting required information. Copy the generated schema into the Information Extractor node. Configure the Split node: Set it up to separate the extracted data into individual book entries. Set up the Google Sheets node: Create a Google Sheets spreadsheet with columns for title, price, availability, image URL, and product URL. Configure the node to map the extracted data to the appropriate columns.
by Abrar Sami
Auto-generate & post content using AI This workflow helps you create daily content using just a topic prompt. It writes a tweet, generates an image, and publishes across Twitter, Facebook, and LinkedIn โ all on autopilot. How it works Triggers daily at 10 PM to start the flow Uses OpenAI to generate a niche topic title Writes a short-form post (tweet style) with hashtags Generates a Japanese anime-style image for visual context Saves everything in Google Sheets Publishes automatically on Twitter, LinkedIn, and Facebook Set up steps Youโll need OpenAI, Google Sheets, and social media credentials (Twitter, Facebook, LinkedIn) Takes about 10โ15 minutes to configure if you already have the credentials ready Make sure your Sheet and API keys are properly linked before activating ๐ Keep detailed notes inside the workflow with sticky notes for easier handoff or collaboration.
by Mathis
Convert PDF documents to AI-generated podcasts with Google Gemini and Text-to-Speech Transform any PDF document into an engaging, natural-sounding podcast using Google's Gemini AI and advanced Text-to-Speech technology. This automated workflow extracts text content, generates conversational scripts, and produces high-quality audio files. Who is this for? This workflow template is perfect for content creators, educators, researchers, and marketing professionals who want to repurpose written content into audio format. Ideal for creating podcast episodes, educational content, or making documents more accessible. What problem does this solve? Converting written documents to engaging audio content manually is time-consuming and requires scriptwriting skills. This workflow automates the entire process, turning static PDFs into dynamic, conversational podcasts that sound natural and engaging. What this workflow does Extracts text from uploaded PDF documents Generates podcast script using Google Gemini AI with conversational tone Converts script to speech using Google's advanced TTS with customizable voices Processes audio into properly formatted WAV files Saves final podcast ready for distribution Setup Obtain API credentials: Get Google Gemini API key from AI Studio Configure credentials in n8n as "Google Gemini(PaLM) Api account" Configure voice settings: Choose from available voices: Kore (professional), Aoede (conversational), Laomedeia (energetic) Customize script generation prompts if needed Test the workflow: Upload a sample PDF file Verify audio output quality Adjust voice settings as preferred How to customize this workflow Modify script style:** Edit the prompt in the "Generate Podcast Script" node to change tone, length, or format Change voice:** Update the voice name in "Prepare TTS Request" node Add preprocessing:** Insert text cleaning nodes before script generation Integrate with storage:** Connect to Google Drive, Dropbox, or other storage services Add notifications:** Include Slack or email notifications when podcasts are ready Note: This template requires Google Gemini API access and works best with text-based PDF files under 10MB.
by Keith Rumjahn
Who is this template for? Anyone who is drowning in emails Busy parents who has alot of school emails Busy executives with too many emails Case Study I get too many emails from my kid's school about soccer practice, lunch orders and parent events. I use this workflow to read all the emails and tell me what is important and what requires actioning. Read more -> How I used A.I. to read all my emails What this workflow does It uses IMAP to read the emails from your email account (i.e. Gmail). It then passes the email to Openrouter.ai and uses a free A.I. model to read and summarize the email. It then sends the summary as a message to your messenger (i.e. Line). Setup You need to find your email server IMAP credentials. Input your openrouter.ai API credentials or replace the HTTP request node with an A.I. node such as OpenAI. Input your messenger credentials. I use Line but you can change the node to another messenger line Telegram. You need to change the message ID to your ID inside the http request. You can find your user ID inside the https://developers.line.biz/console/. Change the "to": {insert your user ID}. How to adjust it to your needs You can change the A.I. prompt to fit your needs by telling it to mark emails from a certain address as important. You can change the A.I. model from the current meta-llama/llama-3.1-70b-instruct:free to a paid model or other free models. You can change the messenger node to telegram or any other messenger app you like.
by James Francis
Overview In cold email campaigns, the lead's company name is the 2nd most frequently inserted variable after their first name. They're critical for effective cold email personalization. However, company names are often messy and can contain taglines, legal suffixes (e.g. LLC, Inc.), and other variations that would never be written out by a human in an email. If your email starts with "I came across Techwave Solutions LLC on LinkedIn...", it's a dead giveaway that you're sending a tempalted email and a response is much less likely. This simple workflow uses AI to clean up messy company names in a Google Sheet so that your cold email campaigns can achieve better results. How It Works A form is submitted with a Google Sheet url The workflow grabs the leads and uses an LLM node to clean the company names The updated leads are saved back in a new sheet within the original spreadsheet Setup Steps Add your Google Sheets and OpenAI (or your AI model provider of choice) credentials to n8n Create a Google Sheet with your list of leads. IMPORTANT: the sheet MUST have a column called "Company" (Optional). The AI workflow has a highly optimized system prompt. However, you may achieve better results by updating the list of examples in the prompt with companies (real or fake) in the industry you're targeting. If you have any questions or feedback about this workflow, or would like me to build custom workflows for your business, email me at n8n@paperjam.agency.
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