by AlQaisi
Streamline data from an n8n form into Google Sheet Airtable and and Email Sending Video for workflow process This workflow facilitates efficient data collection and management by leveraging the capabilities of various nodes within the n8n platform. It commences with the n8n Form Trigger node, where users provide their name, location, and email address. Subsequently, the data seamlessly flows through nodes like Google Sheets, Code, Set, Airtable, Gmail, and Gmail1 for processing and storage. n8n Form Trigger:** Gathers user input data, including Name, City, and Email. Google Sheets:** Manages data operations related to Google Sheets. Code:** Executes JavaScript code to manipulate data fields. Set:** Formats and sets data values for further processing. Airtable:** Facilitates data operations specific to Airtable. Gmail:** Sends custom emails to the provided Email address. Gmail:** Sends additional emails using different templates. Each node within the workflow performs specialized tasks such as extracting date and time fields, formatting data, appending it to Google Sheets and Airtable, and sending personalized emails to the submitter. This streamlined process ensures effective handling of collected information and enhances overall data management efficiency. Workflow Description: n8n Form Trigger: A trigger node that initiates the workflow upon form submission. Captures essential user details like Name, City, and Email. Extracting Date and Time Fields from 'submittedAt' Field: Utilizes a code node to extract Date and Time information from the submitted data. Format the Fields: Standardizes the format of extracted fields (Name, City, Date, Time, Email) for consistency. Airtable: Creates a new record in Airtable with the formatted data. Includes columns for Name, City, Email, Time, and Date. Google Sheets: Appends the formatted data to a designated Google Sheet. Includes columns for Name, City, Email, Date, and Time. Gmail: Sends an email to the provided Email address with a customized message. Subject: "Testing Text Message Delivery" Message: Personalized content with a Name placeholder. Gmail1: Sends another email using a different template. Subject incorporates the Date field for variation. Message content tailored to the subject line. Workflow Connections: n8n Form Trigger -> Extracting Date and Time Fields -> Format the Fields -> Google Sheets & Airtable -> Gmail Google Sheets -> Gmail1 This comprehensive workflow efficiently collects user data, processes it to extract Date and Time fields, stores the formatted information in Google Sheets and Airtable, and delivers tailored emails to the recipients. Copy these templates to get started : Google Sheet Airtable Links to Node Documentation: n8n Form Trigger Documentation Code Node Documentation Set Node Documentation Airtable Node Documentation Google Sheets Node Documentation Gmail Node Documentation
by David w/ SimpleGrow
Receive Webhook Notification The workflow starts when a webhook receives a POST request from Whapi, notifying that a new participant has joined a WhatsApp group. Filter the Event The workflow checks two conditions: The event is for the correct WhatsApp group (matching the specific group ID). The action type is "add" (meaning a user was added to the group). Send Welcome Message If both conditions are met, the workflow sends a personalized welcome message to the new participant via Whapi. The message explains the group rules and how the user can earn points and participate in weekly raffles. Create Airtable Record After sending the welcome message, the workflow creates a new record in the Airtable database for the new participant. The record includes: The participant’s WhatsApp ID An initial engagement count of 100 points The date of the last interaction (set to today) Result Every new group member is automatically welcomed and registered in your engagement database with starter points, ready to participate in your group’s activities and rewards. This workflow ensures new users are greeted, informed, and instantly included in your engagement tracking system.
by AlQaisi
Transforming Emails into Podcasts 🎙️ Check out this channel for example. The n8n workflow described here aims to revolutionize the way users engage with promotional emails by converting them into entertaining audio podcasts. This innovative project leverages automation through n8n to streamline tasks and enhance user experience. Project Benefit 🎧🌟 The primary goal of this project is to transform "CATEGORY_PROMOTIONS" emails into engaging audio content. By converting text into speech, users can enjoy promotional material hands-free, making it easier to consume information while on the go or relaxing. The workflow consists of several key steps orchestrated seamlessly to deliver a delightful experience to users. How to Use the Workflow: Gmail trigger Node: Initiates the workflow by fetching "CATEGORY_PROMOTIONS" emails at regular intervals. The Gmail Trigger node in your N8N workflow is set to poll for new emails every minute and is configured to filter emails with the label "CATEGORY_PROMOTIONS" before triggering the workflow. Steps to Use Filters Inside the Gmail Trigger Node: Configure Gmail Trigger Node: Set "Poll Times" to "Every Minute" to check for new emails at regular intervals. Enable the "Simple" toggle if you want to simplify the node interface. Under "Filters", specify the label IDs you want to filter by. In this case, it's set to "CATEGORY_PROMOTIONS". Adjust any additional options as needed. // Configure Gmail Trigger node pollTimes: { item: [ { mode: "everyMinute" } ] }, simple: false, filters: { labelIds: [ "CATEGORY_PROMOTIONS" ] }, options: {} Save and Execute: Save your workflow and execute it to start monitoring your Gmail account for new emails with the specified label filter. By following these steps, your workflow will effectively trigger based on new emails that match the "CATEGORY_PROMOTIONS" label in your Gmail account. Get message content Node: Extracts the email content for processing. Summarization Chain Node: Generates concise summaries using advanced methods for better readability. Delete the unnecessary items Node: Removes irrelevant details from the email content. Text to Free TTS Node: Converts the summary text into speech using Free TTS technology. Convert from base64 to File Node: Transforms the audio data into a compatible file format. Merge Text with Audio Node: Combines the text and audio components seamlessly. Aggregate in same cell Node: Gathers all processed data for finalization. Send Message to Telegram Node: Dispatches the audio message along with a caption to a designated Telegram chat ID. By automating these tasks, the workflow ensures efficient communication and delivers content in a more engaging format, fostering a positive user experience. Configuration Instructions: The configuration of this workflow involves setting up the necessary nodes and establishing connections between them. Each node performs a specific function crucial to the overall operation of the workflow. Additionally, credentials need to be provided for accessing Gmail and OpenAI services to enable seamless data processing and summarization. Utilizing Text-to-Speech API 🎧 In addition to n8n automation, an external Text-to-Speech API plays a pivotal role in generating audio content from text data. By sending a POST request with JSON data containing the text and voice preferences, users can quickly receive audio files of the converted content. The API offers a straightforward interface for text-to-speech conversion, making it ideal for creating audio clips efficiently. To access this API, simply submit the desired text and voice selection to receive the generated speech audio file. The API endpoint can be accessed at https://tiktok-tts.weilnet.workers.dev/api/generation or through https://tiktokvoicegenerator.com/. In conclusion, this n8n workflow coupled with a Text-to-Speech API presents a powerful solution for transforming emails into captivating podcasts, enhancing user engagement and communication effectiveness. By embracing automation and innovative technologies, this project aims to improve user experience and streamline content delivery processes. 🌈✨🚀
by Dataki
This workflow enriches new Pipedrive organization's data by adding a note to the organization object in Pipedrive. It assumes there is a custom "website" field in your Pipedrive setup, as data will be scraped from this website to generate a note using OpenAI. Then, a notification is sent in Slack. ⚠️ Disclaimer This workflow uses a scraping API. Before using it, ensure you comply with the regulations regarding web scraping in your country or state. Important Notes The OpenAI model used is GPT-4o, chosen for its large input token capacity. However, it is not the cheapest model if cost is very important to you. The system prompt in the OpenAI Node generates output with relevant information, but feel free to improve or modify it according to your needs. How It Works Node 1: Pipedrive Trigger - An Organization is Created This is the trigger of the workflow. When an organization object is created in Pipedrive, this node is triggered and retrieves the data. Make sure you have a "website" custom field in Pipedrive (the name of the field in the n8n node will appear as a random ID and not with the Pipedrive custom field name). Node 2: ScrapingBee - Get Organization's Website's Homepage Content This node scrapes the content from the URL of the website associated with the Pipedrive Organization created in Node 1. The workflow uses the ScrapingBee API, but you can use any preferred API or simply the HTTP request node in n8n. Node 3: OpenAI - Message GPT-4o with Scraped Data This node sends HTML-scraped data from the previous node to the OpenAI GPT-4o model. The system prompt instructs the model to extract company data, such as products or services offered and competitors (if known by the model), and format it as HTML for optimal use in a Pipedrive Note. Node 4: Pipedrive - Create a Note with OpenAI Output This node adds a Note to the Organization created in Pipedrive using the OpenAI node output. The Note will include the company description, target market, selling products, and competitors (if GPT-4o was able to determine them). Node 5 & 6: HTML To Markdown & Code - Markdown to Slack Markdown These two nodes format the HTML output to Slack Markdown. The Note created in Pipedrive is in HTML format, as specified by the System Prompt of the OpenAI Node. To send it to Slack, it needs to be converted to Markdown and then to Slack Markdown. Node 7: Slack - Notify This node sends a message in Slack containing the Pipedrive Organization Note created with this workflow.
by Kev
⚠️ Important: This workflow uses the Autype community node and requires a self-hosted n8n instance. Send an email with a document request and optional PDF attachments. The AI assistant can summarize documents, compare multiple PDFs, draft new content, or create documents from scratch with internet research — all output as professionally branded PDFs using Autype. The finished document is delivered back to the sender via email. Who is this for? Consultants, analysts, project managers, and teams who need on-demand document generation. Send an email and get a branded PDF back — whether it's a summary, comparison, draft, or a freshly researched document. Concrete example: Attach 3 PDF proposals and write "Compare these proposals and recommend the best option" — each PDF is OCR'd via Autype Lens, the AI assistant produces a structured comparison with tables, and you receive a branded PDF within minutes. This also works as an additional skill for an AI agent. Instead of an email trigger, connect the workflow to a webhook or chat trigger so an agent can call it when a user asks "create a summary of these documents." What this workflow does On each incoming email, the workflow: Extracts the email subject + body as the document request, and detects PDF attachments Processes each attached PDF sequentially: uploads to Autype, extracts text via Lens OCR Combines all OCR results into a single context Downloads the Autype Extended Markdown syntax reference so the AI knows the output format Passes the request text + all PDF content to an AI Document Assistant with Firecrawl and SerpAPI as research tools The assistant determines the task type (summarize, compare, draft, or create from scratch) and produces the document in Autype Extended Markdown Autype renders the markdown to a branded PDF with company styling (fonts, colors, heading styles, tables, header with logo, footer with page numbers) The PDF is delivered back to the original sender via email Output structure How it works New Email Received — An IMAP Email Trigger monitors your inbox for incoming document requests. The email subject and body become the request text; PDF attachments are automatically detected. Set Company Config — A Set node defines your company name, logo URL, and brand color. Edit these values once. Extract & Split PDFs — A Code node extracts the sender email, combines subject + body as request text, and detects PDF attachments. Each PDF is split into a separate item for loop processing. If no PDFs are attached, a single item with just the text is output. Has PDFs? — An IF node routes the flow: emails with PDF attachments enter the processing loop, text-only emails skip directly to the AI Assistant. Loop Over PDFs — A Split In Batches node processes each PDF sequentially (one at a time to avoid API rate limits). Upload PDF to Autype — Each PDF is uploaded to Autype via the community node (resource: file). Autype Lens OCR — An HTTP Request node triggers Autype Lens OCR on the uploaded file with outputFormat: "md". This uses Generic Auth Type → Header Auth with X-API-Key set to your Autype API key. Cost: 4 credits per page. A dedicated community node for Lens is planned. Wait for OCR → Poll OCR Status — Waits 8 seconds, then polls the job status via HTTP Request (same Header Auth credential). The loop continues to the next PDF after each OCR completes. Extract OCR Text — Extracts the markdown text from each OCR result and stores it with the original filename. Combine All OCR Results — After the loop completes, collects all OCR texts and combines them into a single context string with labeled sections per PDF. Prepare Text Only — For emails without PDFs, passes just the request text forward. Download Markdown Syntax — Fetches the Autype Extended Markdown syntax reference so the AI knows the output format. Merge Context — Combines the request text, all OCR content, and the markdown syntax reference into a single item for the AI Agent. AI Document Assistant — An n8n AI Agent (OpenRouter) with two tools: Firecrawl Scrape — Scrapes specific URLs to extract page content as markdown. SerpAPI — Web search for current information, statistics, and facts. The assistant determines the task type (summarize, compare, draft, or create from scratch). The system prompt limits tool usage to max 5 calls and prioritizes attached PDF content. Prepare Render Payload — Cleans the AI output (strips code fences), generates a filename, and prepares branding variables. Render Branded PDF — Autype Render from Markdown generates the PDF with a full defaults JSON for company styling: Roboto font, heading colors from brand color, styled tables with colored headers, header with company logo, and footer with page numbers. See the defaults schema for all options. Send Report via Email — SMTP sends the PDF as an attachment back to the original email sender. Setup Install the Autype community node (n8n-nodes-autype) via Settings > Community Nodes. Create an Autype API credential with your API key from app.autype.com. See API Keys in Settings. Create a Header Auth credential for the Lens OCR HTTP Request nodes: Go to Credentials > New > Header Auth Name: X-API-Key Value: your Autype API key (same key as step 2) Assign this credential to the "Autype Lens OCR" and "Poll OCR Status" nodes. Create an OpenRouter API credential (or replace the chat model with OpenAI/Anthropic). Create an IMAP credential for the email inbox to monitor. Create an SMTP credential for sending emails. Get a Firecrawl API key from firecrawl.dev and create a Firecrawl credential. Get a SerpAPI key from serpapi.com and create a SerpAPI credential. Import this workflow and assign your credentials to each node. Edit the Set Company Config node: companyName — Your company name (appears in header/footer) companyLogoUrl — URL to your company logo (PNG/JPEG, publicly accessible) brandColor — Hex color for headings and table headers (e.g. #1a5276) Update the Send Report via Email node with your sender email address. Activate the workflow — any new email to the monitored inbox triggers document generation. > Note: This is a community node. It is not maintained by the n8n team. You need a self-hosted n8n instance to use community nodes. Requirements Self-hosted n8n instance (community nodes are not available on n8n Cloud) Autype account with API key (Lens OCR costs 4 credits/page, Render from Markdown costs 1 credit) n8n-nodes-autype community node installed OpenRouter API key (or OpenAI/Anthropic — configurable chat model) IMAP credentials for the monitored inbox SMTP credentials for sending emails Firecrawl API key (free tier: 500 pages/month) SerpAPI key (serpapi.com) How to customize Change AI model:** Replace the OpenRouter Chat Model sub-node with OpenAI, Anthropic Claude, Google Gemini, or any LangChain-compatible chat model. Add more research tools:** Add additional tool nodes for specialized APIs — Google Scholar, SEC filings, PubMed, or internal knowledge bases. Customize styling:** Edit the defaults JSON in the Render Branded PDF node to change fonts, colors, heading styles, table designs, header/footer content, and spacing. See the defaults schema for all available options. Replace email trigger:** Swap the IMAP Email Trigger with a Form Trigger, Webhook, or Chat Trigger to accept input from different sources. Add watermark:** Insert an Autype Watermark step after rendering to stamp "DRAFT" or "CONFIDENTIAL" on every page. Save to cloud storage:** Add a Google Drive, S3, or SharePoint upload step after rendering (before or instead of SMTP). Adjust OCR wait time:** For large PDFs (10+ pages), increase the Wait node from 8 to 15-20 seconds, or add a retry loop that polls until status is COMPLETED. Use Autype community node for Lens:** Once the Autype community node adds Lens OCR support, replace the HTTP Request OCR/poll chain with a single Autype node. Change output format:** Switch from Render from Markdown to Render from JSON for a better manipulation experience
by David Roberts
OpenAI Assistant is a powerful tool, but at the time of writing it doesn't automatically remember past messages from a conversation. This workflow demonstrates how to get around this, by managing the chat history in n8n and passing it to the assistant when required. This makes it possible to use OpenAI Assistant for chatbot use cases. Note that to use this template, you need to be on n8n version 1.28.0 or later.
by Alex Kim
n8n Workflow: Exponential Backoff for Google APIs Overview This n8n workflow implements an Exponential Backoff mechanism to handle retries when interacting with Google APIs. It ensures that failed API requests are retried with increasing delays, up to a specified maximum retry count. This approach helps mitigate transient errors (e.g., rate limits or temporary network issues) while maintaining workflow efficiency. Key Features: Exponential Backoff Logic**: Dynamically increases wait time between retries based on the retry count. Error Handling**: Stops the workflow and raises an error after a specified number of retries. Dynamic Waiting**: Waits for a calculated duration before each retry. Scalable Design**: Modular nodes for easy debugging and customization. Workflow Details Nodes in the Workflow: Trigger (When clicking "Test Workflow"): Manually starts the workflow for testing. Loop Over Items: Iterates over multiple input items to process Google API requests row by row. Google API Node (Example: Update Sheet): Sends a request to a Google API endpoint (e.g., updating a row in Google Sheets). On success: Moves to the next item in the loop. On error: Passes the error to the Exponential Backoff node. Exponential Backoff: Calculates the delay for the next retry based on the retry count. Logic: const retryCount = $json["retryCount"] || 0; const maxRetries = 5; const initialDelay = 1; // in seconds if (retryCount < maxRetries) { const currentDelayInSeconds = initialDelay * Math.pow(2, retryCount); return { json: { retryCount: retryCount + 1, waitTimeInSeconds: currentDelayInSeconds, status: 'retrying', } }; } else { return { json: { error: 'Max retries exceeded', retryCount: retryCount, status: 'failed' } }; } Wait: Dynamically waits for the waitTimeInSeconds value calculated in the Exponential Backoff node. Configuration: Resume: After Time Interval Wait Amount: {{ $json["waitTimeInSeconds"] }} Unit: Seconds Check Max Retries: Evaluates whether the retry count has exceeded the maximum limit. Routes the workflow: True: Passes to the Stop and Error node. False: Loops back to the Google API node for retry. Stop and Error: Stops the workflow and logs the error when the maximum retry count is reached. Parameters Configurable Settings: Max Retries: Defined in the Exponential Backoff node (const maxRetries = 5). Adjust this value based on your requirements. Initial Delay: The starting wait time for retries, defined as 1 second. Google API Configuration: Ensure your Google API node is properly authenticated and configured with the desired endpoint and parameters. How to Use Import the Workflow: Copy the workflow JSON and import it into your n8n instance. Configure Google API Node: Set up the Google API node with your credentials and target API endpoint (e.g., Google Sheets, Gmail, etc.). Test the Workflow: Manually trigger the workflow and observe the retry behavior in case of errors. Monitor Logs: Use the console logs in the Exponential Backoff node to debug retry timings and status. Example Scenarios Scenario 1: Successful Execution The Google API processes all requests without errors. Workflow completes without triggering the retry logic. Scenario 2: Transient API Errors The Google API returns an error (e.g., 429 Too Many Requests). The workflow retries the request with increasing wait times. Scenario 3: Maximum Retries Exceeded The workflow reaches the maximum retry count (e.g., 5 retries). An error is raised, and the workflow stops. Considerations Jitter: This workflow does not implement jitter (randomized delay) since it's not required for low-volume use cases. If needed, jitter can be added to the exponential backoff calculation. Retry Storms: If multiple workflows run simultaneously, ensure your API quotas can handle potential retries. Error Handling Beyond Max Retries: Customize the Stop and Error node to notify stakeholders or log errors in a centralized system. Customization Options Adjust the maximum retry limit and delay calculation to suit your use case. Add additional logic to handle specific error codes differently. Extend the workflow to notify stakeholders when an error occurs (e.g., via Slack or email). Troubleshooting Retry Not Triggering**: Ensure the retryCount variable is passed correctly between nodes. Confirm that the error output from the Google API node flows to the Exponential Backoff node. Incorrect Wait Time**: Verify the Wait node is referencing the correct field for waitTimeInSeconds. Request for Feedback We are always looking to improve this workflow. If you have suggestions, improvements, or ideas for additional features, please feel free to share them. Your feedback helps us refine and enhance this solution!
by Fernanda Silva
Workflow Description Your workflow is an intelligent chatbot, using ++OpenAI assistant++, integrated with a backend that supports WhatsApp Business, designed to handle various use cases such as sales and customer support. Below is a breakdown of its functionality and key components: Workflow Structure and Functionality Chat Input (Chat Trigger) The flow starts by receiving messages from customers via WhatsApp Business. Collects basic information, such as session_id, to organize interactions. Condition Check (If Node) Checks if additional customer data (e.g., name, age, dependents) is sent along with the message. If additional data is present, a customized prompt is generated, which includes this information. The prompt specifies that this data is for the assistant's awareness and doesn’t require a response. Data Preparation (Edit Fields Nodes) Formats customer data and the interaction details to be processed by the AI assistant. Compiles the customer data and their query into a single text block. AI Responses (OpenAI Nodes) The assistant’s prompt is carefully designed to guide the AI in providing accurate and relevant responses based on the customer’s query and data provided. Prompts describe the available functionalities, including which APIs to call and their specific purposes, helping to prevent “hallucinated” or irrelevant responses. Memory and Context (Postgres Chat Memory) Stores context and messages in continuous sessions using a database, ensuring the chatbot maintains conversation history. API Calls The workflow allows the use of APIs with any endpoints you choose, depending on your specific use case. This flexibility enables integration with various services tailored to your needs. The OpenAI assistant understands JSON structures, and you can define in the prompt how the responses should be formatted. This allows you to structure responses neatly for the client, ensuring clarity and professionalism. Make sure to describe the purpose of each endpoint in the assistant’s prompt to help guide the AI and prevent misinterpretation. Customer Response Delivery After processing and querying APIs, the generated response is sent to the backend and ultimately delivered to the customer through WhatsApp Business. Best Practices Implemented Preventing Hallucinations** Every API has a clear description in its prompt, ensuring the AI understands its intended use case. Versatile Functionality** The chatbot is modular and flexible, capable of handling both sales and general customer inquiries. Context Persistence** By utilizing persistent memory, the flow maintains continuous interaction context, which is crucial for longer conversations or follow-up queries. Additional Recommendations Include practical examples in the assistant’s prompt, such as frequently asked questions or decision-making flows based on API calls. Ensure all responses align with the customer’s objectives (e.g., making a purchase or resolving technical queries). Log interactions in detail for future analysis and workflow optimization. This workflow provides a solid foundation for a robust and multifunctional virtual assistant 🚀
by Davide
This workflow implements an AI-powered WhatsApp booking assistant for a hair salon. The system allows customers to book, reschedule, or cancel appointments automatically via text or voice messages on WhatsApp. The workflow supports both text and voice messages. An AI agent manages the conversation logic, determines the user's intent, and calls the appropriate tools to perform actions such as checking availability, creating appointments, rescheduling bookings, or canceling events. The system also includes guardrails to filter unsafe or irrelevant inputs and escalation mechanisms to notify the team when a request falls outside supported tasks. Key Advantages 1. ✅ 24/7 Automated Appointment Booking Customers can book, reschedule, or cancel appointments at any time through WhatsApp without requiring manual staff intervention. 2. ✅ Multi-Modal Communication (Text + Voice) The workflow supports both text messages and voice messages. Audio messages are automatically transcribed and processed by the AI assistant. 3. ✅ Intelligent AI Assistant An AI agent manages the conversation, understands user intent, and automatically performs actions such as checking calendar availability or creating appointments. 4. ✅ Real-Time Calendar Integration The assistant connects directly to Google Calendar to: check available time slots create new bookings update existing appointments cancel reservations This ensures real-time accuracy. 5. ✅ Automatic Client Management Customer information such as phone number, name, and service type is stored and updated in Google Sheets, creating a lightweight CRM database. 6. ✅ Conversation Memory The system stores chat history in PostgreSQL, allowing the AI assistant to maintain context during conversations and deliver a more natural experience. 7. ✅ Smart Error Handling and Escalation If the AI cannot handle a request (for example, a question unrelated to appointments), the workflow automatically: notifies the team via email escalates the conversation for human assistance. 8. ✅ Secure and Controlled AI Responses Guardrails are implemented to prevent irrelevant or unsafe responses, ensuring that the assistant follows defined policies and tasks. 9. ✅ Omnichannel Architecture The workflow is designed to work with: WhatsApp messages chatbot interface (chat trigger) This allows the same logic to power multiple communication channels. 10. ✅ Scalable Automation The system is fully automated and can handle multiple simultaneous conversations, reducing operational workload and improving customer service efficiency. How it works Input Handling (WhatsApp & Chat): It listens for incoming messages from either a WhatsApp Trigger or a Chat Trigger. WhatsApp: It processes both text messages and voice notes. If a voice note is received, it automatically downloads the audio, transcribes it using OpenAI (Whisper), and converts it into text for the AI to process. The user's phone number (for WhatsApp) or session ID (for Chat) is stored as a sessionId to maintain conversation context. Guardrails (Security & Policy): Before the message reaches the main AI agent, it passes through a Guardrails node (using Google Gemini). This acts as a safety filter to check for jailbreak attempts or inappropriate content, ensuring the conversation stays within company policies. AI Agent (The Virtual Assistant): The cleaned-up message is sent to the AI Agent ("Virtual Assistant"). The agent is prompted to act as "Emma" and follows strict instructions: Identify User: It first uses the New client tool to check a Google Sheet to see if the user is already registered. Manage Appointments: Based on the user's request (book, reschedule, cancel), it intelligently calls specific tools in the correct order. Date Logic: It is aware of the current date and time to calculate correct future dates (e.g., interpreting "this Thursday"). Tool Execution (Actions): The agent has access to several tools to perform actions: Google Sheets (New client, Add client): To check if a client exists and add new clients to a spreadsheet. Google Calendar (Get events, Create event, Update event, Delete event): To check availability and manage appointments. The Get events tool is configured to look for slots in the next 30 days. Gmail (Send Email): To notify the team if a user asks for something outside the scope (e.g., pricing, product questions). WhatsApp HITL / Chat HITL (Escalation): To hand over the conversation to a human agent for complex requests. Response Delivery: The AI agent's text response is routed back to the user. On WhatsApp: It intelligently handles the response format. If the original message was text, it sends a text reply. If the original message was a voice note, it uses OpenAI's TTS to convert the text reply into an audio message and sends that back. Setup steps To get this workflow running, you need to configure the following credentials and nodes: Configure Credentials: Google Calendar OAuth2: Connect your Google account (used in Calendar nodes). Google Sheets OAuth2: Connect your Google account to access the spreadsheet. Gmail OAuth2: Connect your Google account to send notification emails from xxx@xxx.com. WhatsApp API: Connect your WhatsApp Business API credentials (Phone Number ID). OpenAI API (OpenRouter): Provide your API key for audio transcription and text-to-speech. Google Gemini API: Provide your API keys for the main AI model (Google Gemini Chat Model) and the Guardrails model (Google Gemini Chat Model1). Postgres: Configure the connection to your Postgres database for chat memory. Configure Google Sheets: Create a Google Sheet. Update the Document ID in the New client and Add client nodes with your sheet's ID. Ensure the sheet has columns for Phone Number, Client, and Service. Configure Google Calendar: Verify that the calendar ID in the Calendar nodes is correct and accessible. Configure WhatsApp Triggers & Actions: The WhatsApp Trigger node needs to be connected to your WhatsApp Business App. The Send message and Send audio nodes must have the correct Phone Number ID for your WhatsApp Business number. Update Email Recipient: In the Send Email tool (for escalations), change the sendTo email address from xxx@xxx.com to the actual email of the team that should receive these notifications. Review AI Prompts: Open the "Virtual Assistant" (AI Agent) node and review the system message. Update the salon name ("Cuts & Styles"), stylist name ("Alex Carter"), and address to match your business. Check the "Guardrails" node to adjust the safety threshold if necessary. 👉 Subscribe to my new YouTube channel. Here I’ll share videos and Shorts with practical tutorials and FREE templates for n8n. Need help customizing? Contact me for consulting and support or add me on Linkedin.
by Ron
This flow monitors a file for changes of its content. If changed, an alert is sent out and you receive it as push, SMS or voice call on SIGNL4. User cases: Log-file monitoring Monitoring of production data Integration with third-party systems via file interface Etc. Sample file "alert-data.json": { "Body": "Alert in building A2.", "Done": false, "eventId": "2518088743722201372_4ee5617b-2731-4d38-8e16-e4148b8fb8a0" } Body: The alert text to be sent. Done: If false this is a new alert. If true this indicated the alert has been closed. eventId: Last SIGNL4 event ID written by SIGNL4. This flow can be easily adapted for database monitoring as well.
by Jordan Haisley
Overview: Automate Your Google OAuth2 Credential Creation This workflow template streamlines the process of creating and naming individual Google OAuth2 credentials for multiple Google services within n8n. By automating tasks typically done manually, it saves significant time and reduces the risk of errors. Who Is This For? This template is perfect for: Marketers who frequently use Google Docs, Google Sheets, Google Slides, and Google Drive for document automation. Developers or technical users who manage numerous integrations and need to minimize credential creation overhead. Teams or solo users with multiple Google accounts who want to eliminate repetitive Google OAuth2 credential creation tasks. Prerequisite Knowledge • Basic familiarity with n8n, including how to configure nodes and connect services. • A Google OAuth JSON file (client ID, client secret, etc.) already set up in your Google Cloud Console. • An understanding of Google services (Docs, Sheets, Slides, Drive, Gmail, Calendar, Contacts and others) and which you may need for your use cases What Problem Does It Solve? Manually creating and naming separate OAuth2 credentials for each Google service can be time-consuming and prone to errors. For instance, if you manage 16 Google accounts, you might need to create 112 credentials manually. This workflow automates that process by using your Google OAuth JSON file and email address, generating uniquely named OAuth2 credentials for each Google service in just a single run per account. Key Features Manual Trigger – Start the workflow on demand to generate new credentials. Set Node for Google OAuth Details – Store your client ID, client secret, and other JSON info securely in one place. Automated Naming Convention – Use your Google email address to create distinct names for each credential, simplifying organization. Array of Google Services – Customize which services to create credentials for, such as Docs, Sheets, Slides, Drive, Gmail, Calendar, or Contacts. Batch Credential Creation – Split the array of Google services and automatically create separate OAuth2 credentials for each. Seamless OAuth2 Integration – Effortlessly authenticate all generated credentials within n8n. How to Set Up Insert Your JSON Details – Paste your Google OAuth 2.0 JSON data into the “Google JSON” node. Add Your Google Email Address – Specify your email address in the “Google Email” node to personalize the naming convention. Configure n8n Account Credentials – In the “n8n Create Credentials” node, select or add proper credentials (e.g., n8n API credentials). Execute the Workflow – Run the workflow to automatically generate individual OAuth2 credentials. Finalize in n8n – Visit your n8n Credentials dashboard to complete the OAuth sign-in for each newly created credential. Customization Options Modify the Services Array** – Easily add or remove Google products based on your workspace needs by editing the array in the “Services” node. Adjust Naming Logic** – Tailor the credential naming convention in the “n8n Create Credentials” node to match your organization’s style or best practices. Set Role-Based Access** – In n8n, control who can view and use these automatically generated credentials by adjusting user permissions. Time-Saving Example I initially had 16 Google accounts, requiring 112 credentials if done manually. With this workflow, I needed just one run per account—saving around two hours of repetitive data entry. Yes, I spent three hours building and documenting this, but it pays off quickly for anyone managing multiple accounts or large teams.
by Joseph LePage
The 🌐🤖 AI Agent Chatbot with Jina.ai Webpage Scraper workflow is a powerful automation designed to integrate real-time web scraping capabilities into an AI-driven chatbot. Here's how it works and why it's important: How It Works 💬 Chat Trigger: The workflow begins when a user sends a chat message, triggering the "When chat message received" node. 🧠 AI Agent Processing: The input is passed to the "Jina.ai Web Scraping Agent," which uses advanced AI logic to interpret the user’s query and determine the information needed. 🌐 Web Scraping: The agent utilizes the "HTTP Request" node to scrape real-time data from a user-provided URL, enabling the chatbot to fetch and analyze live website content. 🗂️ Memory Management: The "Window Buffer Memory" node ensures context retention by storing and managing conversational history, allowing for seamless interactions. 🤖 Language Model Integration: The scraped data is processed using the "gpt-4o-mini" language model, which generates clear, accurate, and contextually relevant responses for the user. Why It's Cool ⏱️ Real-Time Information Retrieval**: This workflow empowers users to access up-to-date web content directly through a chatbot, eliminating manual web searches. ✨ Enhanced User Experience**: By combining web scraping with conversational AI, it delivers precise answers tailored to user queries in real time. 🔄 Versatility**: It can be applied across various domains, such as customer support, research, or data analysis, making it a valuable tool for businesses and individuals alike. ⚙️ Automation Efficiency**: Automating web scraping and response generation saves time and effort while ensuring accuracy.