by Robert Breen
This n8n workflow template creates an intelligent data analysis system that converts natural language questions into Google Sheets SQL queries using OpenAI's GPT-4o model. The system generates proper Google Sheets query URLs and executes them via HTTP requests for efficient data retrieval. What This Workflow Does Natural Language to SQL**: Converts user questions into Google Sheets SQL syntax Direct HTTP Queries**: Bypasses API limits by using Google Sheets' built-in query functionality Column Letter Mapping**: Automatically maps column names to their corresponding letters (A, B, C, etc.) Structured Query Generation**: Outputs properly formatted Google Sheets query URLs Real-time Data Access**: Retrieves live data directly from Google Sheets Memory Management**: Maintains conversation context for follow-up questions Tools Used OpenAI Chat Model (GPT-4o)** - SQL query generation and natural language understanding OpenAI Chat Model (GPT-4.1 Mini)** - Result formatting and table output Google Sheets Tool** - Column metadata extraction and schema understanding HTTP Request Node** - Direct data retrieval via Google Sheets query API Structured Output Parser** - Formats AI responses into executable queries Memory Buffer Window** - Conversation history management Chat Trigger** - Webhook-based conversation interface Step-by-Step Setup Instructions 1. Prerequisites Before starting, ensure you have: An n8n instance (cloud or self-hosted) An OpenAI account with API access and billing setup A Google account with access to Google Sheets The target Google Sheet must be publicly accessible or shareable via link 2. Import the Workflow Copy the workflow JSON provided In your n8n instance, go to Workflows β Import from JSON Paste the JSON and click Import Save with a descriptive name like "Google Sheets SQL Query Generator" 3. Set Up OpenAI Connections Get API Key: Go to OpenAI Platform Sign in or create an account Navigate to API Keys section Click Create new secret key Copy the generated API key Important: Add billing information and credits to your OpenAI account Configure Both OpenAI Nodes: OpenAI Chat Model1 (GPT-4o): Click on the node Click Create New Credential Select OpenAI API Paste your API key Save the credential OpenAI Chat Model2 (GPT-4.1 Mini): Apply the same OpenAI API credential This handles result formatting 4. Set Up Google Sheets Connection Create OAuth2 Credentials: Go to Google Cloud Console Create a new project or select existing one Enable the Google Sheets API Go to Credentials β Create Credentials β OAuth 2.0 Client IDs Set application type to Web Application Add authorized redirect URIs (get this from n8n credentials setup) Copy the Client ID and Client Secret Configure in n8n: Click on the Get Column Info2 node Click Create New Credential Select Google Sheets OAuth2 API Enter your Client ID and Client Secret Complete the OAuth flow by clicking Connect my account Authorize the required permissions 5. Prepare Your Google Sheet Option A: Use the Sample Data Sheet Access the pre-configured sheet: Sample Marketing Data Make a copy to your Google Drive Important**: Set sharing to "Anyone with the link can view" Critical: Set sharing to "Anyone with the link can view" for HTTP access Copy the Sheet ID from the URL Update the Get Column Info2 node with your Sheet ID and column metadata sheet 6. Configure Sheet References Get Column Info2 Node: Set Document ID to your Google Sheet ID Set Sheet Name to your columns metadata sheet (e.g., "Columns") This provides the AI with column letter mappings HTTP Request Node: No configuration needed - it uses dynamic URLs from the AI agent Ensure your sheet has proper sharing permissions 7. Update System Prompt (If Using Custom Sheet) If using your own Google Sheet, update the system prompt in the AI Agent3 node: Replace the URL in the system message with your Google Sheet URL Update the GID (sheet ID) to match your data sheet Keep the same query structure format Contact Information Robert Ynteractive For support, customization, or questions about this template: Email**: robert@ynteractive.com LinkedIn**: Robert Breen Need help implementing this workflow, want to add security features, or require custom modifications? Reach out for professional n8n automation services and AI integration support.
by Robert Breen
This n8n workflow template creates an efficient data analysis system that uses Google Gemini AI to interpret user questions about spreadsheet data and processes them through a specialized sub-workflow for optimized token usage and faster responses. What This Workflow Does Smart Query Parsing**: Uses Gemini AI to understand natural language questions about your data Efficient Processing**: Routes calculations through a dedicated sub-workflow to minimize token consumption Structured Output**: Automatically identifies the column, aggregation type, and grouping levels from user queries Multiple Aggregation Types**: Supports sum, average, count, count distinct, min, and max operations Flexible Grouping**: Can aggregate data by single or multiple dimensions Token Optimization**: Processes large datasets without overwhelming AI context limits Tools Used Google Gemini Chat Model** - Natural language query understanding and response formatting Google Sheets Tool** - Data access and column metadata extraction Execute Workflow** - Sub-workflow processing for data calculations Structured Output Parser** - Converts AI responses to actionable parameters Memory Buffer Window** - Basic conversation context management Switch Node** - Routes to appropriate aggregation method Summarize Nodes** - Performs various data aggregations π MAIN WORKFLOW - Query Parser What This Workflow Does The main workflow receives natural language questions from users and converts them into structured parameters that the sub-workflow can process. It uses Google Gemini AI to understand the intent and extract the necessary information. Prerequisites for Main Workflow Google Cloud Platform account with Gemini API access Google account with access to Google Sheets n8n instance (cloud or self-hosted) Main Workflow Setup Instructions 1. Import the Main Workflow Copy the main workflow JSON provided In your n8n instance, go to Workflows β Import from JSON Paste the JSON and click Import Save with name: "Gemini Data Query Parser" 2. Set Up Google Gemini Connection Go to Google AI Studio Sign in with your Google account Go to Get API Key section Create a new API key or use an existing one Copy the API key Configure in n8n: Click on Google Gemini Chat Model node Click Create New Credential Select Google PaLM API Paste your API key Save the credential 3. Set Up Google Sheets Connection for Main Workflow Go to Google Cloud Console Create a new project or select existing one Enable the Google Sheets API Create OAuth 2.0 Client ID credentials In n8n, click on Get Column Info node Create Google Sheets OAuth2 API credential Complete OAuth flow 4. Configure Your Data Source Option A: Use Sample Data The workflow is pre-configured for: Sample Marketing Data Make a copy to your Google Drive Option B: Use Your Own Sheet Update Get Column Info node with your Sheet ID Ensure you have a "Columns" sheet for metadata Update sheet references as needed 5. Set Up Workflow Trigger Configure how you want to trigger this workflow (webhook, manual, etc.) The workflow will output structured JSON for the sub-workflow βοΈ SUB-WORKFLOW - Data Processor What This Workflow Does The sub-workflow receives structured parameters from the main workflow and performs the actual data calculations. It handles fetching data, routing to appropriate aggregation methods, and formatting results. Sub-Workflow Setup Instructions 1. Import the Sub-Workflow Create a new workflow in n8n Copy the sub-workflow JSON (embedded in the Execute Workflow node) Import as a separate workflow Save with name: "Data Processing Sub-Workflow" 2. Configure Google Sheets Connection for Sub-Workflow Apply the same Google Sheets OAuth2 credential you created for the main workflow Update the Get Data node with your Sheet ID Ensure it points to your data sheet (e.g., "Data" sheet) 3. Configure Google Gemini for Output Formatting Apply the same Gemini API credential to the Google Gemini Chat Model1 node This handles final result formatting 4. Link Workflows Together In the main workflow, find the Execute Workflow - Summarize Data node Update the workflow reference to point to your sub-workflow Ensure the sub-workflow is set to accept execution from other workflows Sub-Workflow Components When Executed by Another Workflow**: Trigger that receives parameters Get Data**: Fetches all data from Google Sheets Type of Aggregation**: Switch node that routes based on aggregation type Multiple Summarize Nodes**: Handle different aggregation types (sum, avg, count, etc.) Bring All Data Together**: Combines results from different aggregation paths Write into Table Output**: Formats final results using Gemini AI Example Usage Once both workflows are set up, you can ask questions like: Overall Metrics: "Show total Spend ($)" "Show total Clicks" "Show average Conversions" Single Dimension: "Show total Spend ($) by Channel" "Show total Clicks by Campaign" Two Dimensions: "Show total Spend ($) by Channel and Campaign" "Show average Clicks by Channel and Campaign" Data Flow Between Workflows Main Workflow: User question β Gemini AI β Structured JSON output Sub-Workflow: Receives JSON β Fetches data β Performs calculations β Returns formatted table Contact Information For support, customization, or questions about this template: Email**: robert@ynteractive.com LinkedIn**: Robert Breen Need help implementing these workflows, want to remove limitations, or require custom modifications? Reach out for professional n8n automation services and AI integration support.
by Jitesh Dugar
Verified User Profile Creation - Automated Email Validation & PDF Generation Overview This comprehensive automation workflow streamlines the user onboarding process by validating email addresses, generating professional profile PDFs, and delivering them seamlessly to verified users. π― What This Workflow Does: Receives User Data - Webhook trigger accepts user signup information (name, email, city, profession, bio) Validates Email Addresses - Uses VerifiEmail API to ensure only legitimate email addresses proceed Conditional Branching - Smart logic splits workflow based on email verification results Generates HTML Profile - Creates beautifully styled HTML templates with user information Converts to PDF - Transforms HTML into professional, downloadable PDF documents Email Delivery - Sends personalized welcome emails with PDF attachments to verified users Data Logging - Records all verified users in Google Sheets for analytics and tracking Rejection Handling - Notifies users with invalid emails and provides guidance β¨ Key Features: β Email Verification - Prevents fake registrations and maintains data quality π Professional PDF Generation - Beautiful, branded profile documents π§ Automated Email Delivery - Personalized welcome messages with attachments π Google Sheets Logging - Complete audit trail of all verified users π Smart Branching - Separate paths for valid and invalid emails π¨ Modern Design - Clean, responsive HTML/CSS templates π Secure Webhook - POST endpoint for seamless form integration π― Perfect Use Cases: User registration systems Community membership verification Professional certification programs Event registration with verified attendees Customer onboarding processes Newsletter signup verification Educational platform enrollments Membership card generation π¦ What's Included: Complete workflow with 12 informative sticky notes Pre-configured webhook endpoint Email verification integration PDF generation setup Gmail sending configuration Google Sheets logging Error handling guidelines Rejection email template π οΈ Required Integrations: VerifiEmail - For email validation (https://verifi.email) HTMLcsstoPDF - For PDF generation (https://htmlcsstopdf.com) Gmail OAuth2 - For email delivery Google Sheets OAuth2 - For data logging β‘ Quick Setup Time: 15-20 minutes π Skill Level: Beginner to Intermediate Benefits: β Reduces manual verification work by 100% β Prevents spam and fake registrations β Delivers professional branded documents automatically β Maintains complete audit trail β Scales effortlessly with user growth β Provides excellent user experience β Easy integration with any form or application Technical Details: Trigger Type:** Webhook (POST) Total Nodes:** 11 (including 12 documentation sticky notes) Execution Time:** ~3-5 seconds per user API Calls:** 3 external (VerifiEmail, HTMLcsstoPDF, Google Sheets) Email Format:** HTML with binary PDF attachment Data Storage:** Google Sheets (optional) License: MIT (Free to use and modify) π BONUS FEATURES: Comprehensive sticky notes explaining each step Beautiful, mobile-responsive email template Professional PDF styling with modern design Easily customizable for your branding Ready-to-use webhook endpoint Error handling guidelines included Perfect for: Developers, No-code enthusiasts, Business owners, SaaS platforms, Community managers, Event organizers Start automating your user verification process today! π
by Jan Oberhauser
This workflow returns the current weather at a predefined or given city and returns it so that it can be displayed with bash-dash. By default does it return the weather in Berlin if no city got defined. That default can be changed in the "Set City" node. Example usage: \- weather london Example bash-dash config: commands[weather]="http://localhost:5678/webhook/weather"
by Jan Oberhauser
Receives data from an incoming HTTP Request Reads file from internet Writes data on image Returns the data The URL to call will look like this: http://localhost:5678/webhook-test/webhook/test?name=Jim Once called it will return an image like this:
by sven
In this video we will create a simple n8n Nodemation workflow to receive date via webhook, alter the data and send it to a webserver. We will be using webhook, function and http request node together. > Youtube Video
by Lorena
This workflow allows you to send a message in a Telegram chat via bash-dash. Example usage: - telegram I'll be late If you want to send a predefined message without typing it in the command line, you can replace the Text Expression in the Telegram node with a specific message. In this case, the dash command - telegram will send the predefined message to the chat. Example bash-dash config: commands[telegram]="http://localhost:5678/webhook/telegram"
by Pawel
This is a simple temlate that will allow you to customise the notifications in Radarr, Sonarr, Bazarr and similar. By default the notifications are configured to be sent to discord and look similar to the default ones but are just minimalistic. All you need to configure is in your Radarr etc. instances to have Webhook notification type and here point to your Discord channel webhook.
by Tom
This workflow shows a no code approach to creating a HTML table based on Google Sheets data. To run the workflow: Make sure you have a Google Sheet with a header row and some data in it. Grab your sheet ID: Add it to the Google Sheets node: Activate the workflow or execute it manually Visit the URL provided by the webhook node in your browser (production URL if the workflow is active, test URL if the workflow is executed manually)
by Luciano Gutierrez
π€ AI-Powered Gmail MCP Server for n8n Description This n8n workflow template leverages an external AI Model Control Plane (MCP) Server to automate various Gmail tasks, such as composing emails, replying to threads, and handling follow-ups using dynamically generated content. It uses the native n8n Gmail nodes available from v1.88.0 onwards. Who is this template for? Ideal for developers, automation engineers, and power users using self-hosted n8n (v1.88.0+) who want to integrate artificial intelligence directly into their email workflows via a dedicated MCP Server for enhanced control and customization over AI interactions. What problem does this workflow solve? βοΈ Reduces Manual Effort: Decreases the work involved in writing, sending, and following up on emails in Gmail. β Consistency and Quality: Ensures standardized, professional responses free from typos by leveraging controlled AI prompts. π Complete Automation: Automates the entire email cycle: from the initial send, through waiting for a reply, to sending automated follow-ups based on AI logic. Workflow Overview This template provides a structured approach to integrating Gmail with an MCP Server: π‘ MCP Trigger (βMCP_GMAILβ): An n8n Webhook node that receives HTTP calls from your MCP Server. It standardizes the inputs (like recipient, subject, AI prompt) for all subsequent Gmail nodes. (You will need to configure your MCP Server to call this webhook URL). π€ SEND_EMAIL (Gmail Node v2.1): Sends new messages. The email body (message field) is typically populated by content generated from an AI prompt processed by your MCP server and passed via the trigger. π REPLY_EMAIL (Gmail Node v2.1): Automatically replies to existing conversations (threads). It uses AI-generated content (via MCP) to formulate the reply based on the thread context. Requires Message ID and/or Thread ID. π₯ GET_EMAIL (Gmail Node v2.1): Fetches data for a specific message (using Message ID) for analysis, processing, or archiving. Useful for retrieving context before replying. β³ SEND_AND_WAIT (Gmail Node v2.1): Sends an email and pauses the workflow execution until a reply is received in that specific conversation (thread). This is crucial for building automated follow-up sequences. It then outputs data from the reply message. Note:* All Gmail nodes in this template use the native n8n *Gmail Tool*, integrated since v1.88.0. No additional installation of community nodes is required. See the official n8n documentation for more details on node configuration. Prerequisites Ensure you have the following before importing: π A self-hosted n8n instance running version 1.88.0 or higher. βοΈ A Google Cloud project with the Gmail API correctly enabled. π Gmail OAuth2 credentials configured in your n8n instance. Navigate to Settings > Credentials > New > Google > Gmail (OAuth2 API) to set this up if you haven't already. π§ Access to your MCP Server and an API Key (or other authentication method) required to interact with it via HTTP requests. How to Import and Configure Follow these steps to get the template running: In your n8n interface, navigate to Templates β Import from URL. Paste the JSON link provided for this workflow template. Configure the necessary credentials within n8n under Credentials: Gmail OAuth2: Select the Google OAuth2 credential you previously configured that has access to the desired Gmail account. MCP API Key: You'll likely need to configure credentials for interacting with your MCP Server. This might involve setting up a Header Auth credential in n8n with your MCP API Key, or configuring the HTTP Request node within the workflow directly, depending on your MCP's authentication scheme. Link this credential where needed (e.g., in the Trigger node if MCP calls n8n with auth, or in HTTP Request nodes if n8n calls MCP). Activate the Workflow: Ensure the workflow toggle is set to "Active" in the top right corner. Webhook URL: Copy the Webhook URL from the "MCP_GMAIL" Trigger node (Test or Production URL as needed) and configure your MCP Server to send requests to this URL. Recommendation: Rename the nodes with clear, descriptive names relevant to your specific use case (e.g., β¨ Generate Sales Email Body via MCP, π₯ Fetch Customer Replies). Utilize the workflow notes (sticky notes on the canvas) to document specific logic, prompt details, or configuration choices for future reference. Customization & Technical Guidance Tailor the workflow to your specific needs: π Search Filters: In nodes that fetch emails (like GET_EMAIL or if you add a Gmail - Get Many node), refine the search using the Search field (standard Gmail search operators) or filter by Label Names to process specific emails (e.g., unread from a specific sender, emails with a certain label). βοΈ AI Fine-Tuning (Prompt Engineering): The core of the AI integration happens in the prompts sent to your MCP Server. Modify these prompts (often constructed within function nodes or directly in the trigger input expected from MCP) in the message or body fields passed to the send/reply nodes. Adjust prompts to control: Tone & Style: Formal, informal, empathetic, technical, etc. Content & Format: Request bullet points, summaries, specific data extraction. Dynamic Variables: Inject data from previous n8n nodes (e.g., customer name, order details, previous email content) into the prompt for context-aware generation. Example: `"Reply to the following email thread [{{ $json.thread_content }}] addressing the customer {{ $json.customer_name }} about their query..."` π Post-Response Actions: Extend the workflow after key actions, especially the SEND_AND_WAIT node. Add nodes to: Log results to a database (MySQL, PostgreSQL, Airtable). Update CRM records (HubSpot, Salesforce). Send notifications (Slack, Discord, Telegram). Trigger other n8n workflows. π‘οΈ Error Handling: Implement robust error handling. Connect the red output pins (error output) of critical nodes (like Gmail nodes or HTTP Requests to MCP) to an Error Trigger node. From there, you can: Log detailed error information to a monitoring tool or spreadsheet. Send failure notifications. Implement retry logic (using loops or specific retry settings on nodes). Route to alternative paths or fallback workflows.
by Abdullah Alshiekh
π Description Instantly turn images into marketing content with one Telegram message. It automatically: Accepts an image and caption via Telegram Sends the image to an AI model with your brandβs content rules Generates copy with headline, body, hashtags, and CTA Sends it back to you for approval On approval, posts directly to your Facebook Page If rejected or sent as plain text, request edits and it will regenerate your content π― Key Advantages for Content Teams β Creates professional post content from raw images in seconds β Keeps the process inside Telegramβno app-switching β Allows fast edits through natural text replies β Reduces creative workload using your own AI style guide β Posts directly to Facebookβno copy-pasting needed π οΈ Features Telegram Bot Trigger (via Telegram API) Image file parsing + downloading AI Content Generation using OpenRouter + LangChain Custom Brand Prompt: Hook + Content + CTA in natural Arabic JSON Parsing with fallback handling Dual approval route (human- or bot-origin) Facebook publishing via Graph API Retry loop: users can request changes directly Sticky notes on all nodes for fast onboarding π§ Requirements Telegram Bot Token Facebook Page access with pages_manage_posts + pages_read_engagement OpenRouter API key (or another LLM provider) n8n credentials for: Telegram Bot Facebook (OAuth or Bearer token) OpenRouter (or alternative) π§ Use Case Examples π§΄ Beauty Brands: Auto-generate Arabic content from new skincare routine photos π₯ Clinics: Transform testimonial photos into compliant social posts π§’ Streetwear Shops: Quickly convert customer-submitted photos into engaging product drops π Education Pages: Teachers send photos and instantly get shareable awareness content πΎ Pet Pages: Easily publish heartfelt stories from community-submitted photos βοΈ Customization Tips Edit the Brand Prompt Update the AI node with your own brand tone, examples, and structure. Switch LLMs Swap the OpenRouter model with Gemini, GPT-4, or others by changing the LLM node. Change Post Target Replace the Facebook post URL with Instagram or your CMS webhook. Customize Loop Logic Adjust the re-triggering workflow to better match your desired Telegram conversation UX. If you need any help Get in touch
by Yaron Been
CSO Agent with Sales Team Description Complete AI-powered sales department with a Chief Sales Officer (CSO) agent orchestrating specialized sales team members for comprehensive revenue operations and sales automation. Overview This n8n workflow creates a comprehensive sales department using AI agents. The CSO agent analyzes sales opportunities and delegates tasks to specialized agents for lead generation, copywriting, proposals, objection handling, demos, and follow-up sequences. Features Strategic CSO agent using OpenAI O3 for complex sales strategy and decision-making Six specialized sales agents powered by GPT-4.1-mini for efficient execution Complete sales funnel coverage from lead generation to deal closure Automated proposal and contract generation Objection handling playbooks and closing techniques Demo preparation and presentation materials Follow-up and nurture campaign automation Team Structure CSO Agent**: Strategic sales oversight and team coordination (O3 model) Lead Generation Specialist**: Prospecting, research, qualification, cold outreach Sales Copywriter**: Pitch decks, proposals, sales collateral, persuasive content Proposal & Contract Specialist**: Deal structuring, terms negotiation, contracts Objection Handler**: Sales objections, responses, closing techniques Demo & Presentation Expert**: Demo scripts, presentation materials, call preparation Follow-up & Nurture Specialist**: Sequence campaigns, relationship building How to Use Import the workflow into your n8n instance Configure OpenAI API credentials for all chat models Deploy the webhook for chat interactions Send sales requests via chat (e.g., "Create a complete B2B SaaS sales campaign") The CSO will analyze and delegate to appropriate specialists Receive comprehensive sales deliverables and strategies Use Cases Complete Sales Funnels**: Lead generation β Qualification β Demo β Proposal β Close Account-Based Sales**: Personalized outreach strategies for enterprise accounts Product Launch Sales**: Go-to-market strategy with full sales enablement Objection Playbooks**: Comprehensive responses to common sales objections Demo Optimization**: Compelling presentations tailored to different audiences Follow-up Automation**: Systematic nurturing to prevent lead loss Proposal Generation**: Professional proposals with terms and pricing Sales Training**: Objection handling and closing technique development Requirements n8n instance with LangChain nodes OpenAI API access (O3 for CSO, GPT-4.1-mini for specialists) Webhook capability for chat interactions Optional: Integration with CRM systems (Salesforce, HubSpot, etc.) Cost Optimization O3 model used only for strategic CSO decisions GPT-4.1-mini provides 90% cost reduction for specialist tasks Parallel processing enables simultaneous agent execution Template library reduces redundant content generation Integration Options Connect to CRM systems for lead management Integrate with email platforms for outreach automation Link to proposal and contract management tools Export to sales enablement platforms Performance Metrics Lead qualification accuracy and conversion rates Proposal win rates and deal velocity Objection handling success rates Demo-to-close conversion optimization Follow-up engagement and response rates Contact & Resources Website**: nofluff.online YouTube**: @YaronBeen LinkedIn**: Yaron Been Tags #SalesOps #LeadGeneration #SalesEnablement #RevenueGrowth #SalesAutomation #B2BSales #SalesStrategy #ProposalAutomation #DemoOptimization #SalesAI #n8n #OpenAI #MultiAgentSystem #SalesTech #RevOps #PipelineAutomation