Automate event scheduling from emails with Gmail & Google Calendar keywords
This workflow contains community nodes that are only compatible with the self-hosted version of n8n.
β How It Works
This workflow operates as an automated personal assistant for your calendar. It listens to your Gmail inbox for new emails. When an email arrives, it checks the subject and body for keywords like "Meeting" or "Appointment." If a match is found, the workflow extracts key details from the email and automatically creates a new event on your Google Calendar, eliminating the need for manual data entry.
Setup Steps
Follow these steps to get the workflow running in your n8n instance.
1. Prerequisites
You'll need a working n8n instance and access to both your Gmail and Google Calendar accounts.
2. Workflow Import
Import the workflow's JSON file into your n8n instance. All the necessary nodes will appear on your canvas.
3. Configure Credentials
- Click on the
Gmail Triggernode andGoogle Calendarnode. - You will see a red error icon indicating that credentials are not set. Click on it.
- Click "Create new credential" and follow the instructions to connect your Gmail and Google Calendar accounts.
4. Customize the If Node
This node determines which emails will trigger a calendar event.
- Click on the
Ifnode. - Review the
Value 2field under the conditions. This is where you specify the keywords that should trigger an event. - You can add more keywords by clicking "Add Condition" and using the
ORoperator (e.g., addcall,interview, ordemo).
5. Customize the Code Node
This node extracts the event details from your email. The current code is a basic example using regular expressions to find a date and time.
- Click on the
Codenode. - Review the code. You may need to adjust the regular expressions if your emails have a different format for dates and times.
- The node will output a JSON object containing the
title,date, andtimethat will be used to create your calendar event.
6. Configure the Google Calendar Node
This is the final node that creates the event.
- Click on the
Google Calendarnode. - In the
Calendar IDfield, enter the ID of the specific calendar you want the events to be created on. You can find this in your Google Calendar settings.
7. Activate the Workflow
- Once all credentials and node configurations are complete, click "Save" at the top of the canvas.
- Finally, toggle the workflow to "Active". The workflow is now live and will automatically schedule events for you.
Automate Event Scheduling from Emails with Gmail and Google Calendar Keywords
This n8n workflow simplifies and automates the process of scheduling events in Google Calendar directly from emails received in Gmail. It intelligently parses email content for specific keywords and then creates a corresponding event.
What it does
- Monitors Gmail: Continuously checks for new emails in your Gmail inbox.
- Extracts Email Content: Retrieves the subject and body of new emails.
- Checks for Keywords: Uses a
Codenode to analyze the email content for specific keywords (e.g., "schedule", "meeting", "event"). - Conditional Logic: If the keywords are found, the workflow proceeds to create a Google Calendar event.
- Creates Google Calendar Event: Automatically schedules an event in your Google Calendar using details extracted or inferred from the email.
Prerequisites/Requirements
- Gmail Account: An active Gmail account to monitor for new emails.
- Google Calendar Account: A Google Calendar account where events will be created.
- n8n Credentials:
- Google OAuth2 credentials configured in n8n for both Gmail and Google Calendar.
Setup/Usage
- Import the Workflow: Import the provided JSON into your n8n instance.
- Configure Gmail Trigger:
- Select your Google account credential for the Gmail Trigger node.
- (Optional) Configure any specific labels or search queries if you only want to monitor certain types of emails.
- Configure Code Node:
- Review the JavaScript code in the
Codenode. This is where you define the keywords the workflow should look for in email subjects and bodies. Modify these keywords to suit your specific needs. - The code will likely extract information like event title, date, and time. Adjust the extraction logic if your email formats vary.
- Review the JavaScript code in the
- Configure Google Calendar Node:
- Select your Google account credential for the Google Calendar node.
- Map the data from the previous
Codenode to the event creation fields (e.g., Summary, Start Date/Time, End Date/Time, Description). - Specify the calendar ID where the events should be created.
- Activate the Workflow: Once configured, activate the workflow to start monitoring your Gmail for event scheduling requests.
Related Templates
Generate Weather-Based Date Itineraries with Google Places, OpenRouter AI, and Slack
π§© What this template does This workflow builds a 120-minute local date course around your starting point by querying Google Places for nearby spots, selecting the top candidates, fetching real-time weather data, letting an AI generate a matching emoji, and drafting a friendly itinerary summary with an LLM in both English and Japanese. It then posts the full bilingual plan with a walking route link and weather emoji to Slack. π₯ Who itβs for Makers and teams who want a plug-and-play bilingual local itinerary generator with weather awareness β no custom code required. βοΈ How it works Trigger β Manual (or schedule/webhook). Discovery β Google Places nearby search within a configurable radius. Selection β Rank by rating and pick the top 3. Weather β Fetch current weather (via OpenWeatherMap). Emoji β Use an AI model to match the weather with an emoji π€οΈ. Planning β An LLM writes the itinerary in Markdown (JP + EN). Route β Compose a Google Maps walking route URL. Share β Post the bilingual itinerary, route link, and weather emoji to Slack. π§° Requirements n8n (Cloud or self-hosted) Google Maps Platform (Places API) OpenWeatherMap API key Slack Bot (chat:write) LLM provider (e.g., OpenRouter or DeepL for translation) π Setup (quick) Open Set β Fields: Config and fill in coords/radius/time limit. Connect Credentials for Google, OpenWeatherMap, Slack, and your LLM. Test the workflow and confirm the bilingual plan + weather emoji appear in Slack. π Customize Adjust ranking filters (type, min rating). Modify translation settings (target language or tone). Change output layout (side-by-side vs separated). Tune emoji logic or travel mode. Add error handling, retries, or logging for production use.
Seo blog content automation with GPT-4o-mini and human approval in Google Docs
Overview This n8n workflow automates the entire content creation process for SEO blog posts, from topic submission and AI drafting to human approval, revision, and final storage in Google Docs. It ensures high-quality, SEO-optimized content is generated efficiently while keeping a human in the loop for quality control. Prerequisites To use this workflow, you need the following accounts and credentials: Google Sheets Account: To manage the content tracker. The sheet must contain columns for Topic, Reference URL, Title, Status, and Link to document. OpenAI API Key (for GPT-4o-mini): To power the initial content drafting and subsequent revisions. Gmail Account: To send the content for human approval and wait for feedback. Google Docs Account: To create and store the final approved blog posts. How It Works The workflow operates in four main stages: Topic Submission, AI Content Creation, Human Approval & Revision Loop, and Final Publishing. Stage 1: Topic Submission and Tracking This stage captures a new blog topic and adds it to the content tracker. On form submission (Form Trigger): The workflow is initiated when a user submits a Topic and an optional Reference link through the form. Append row in sheet (Google Sheets): The new topic and reference link are added as a new row in your content tracker sheet. Get Topic from Google Sheets: The workflow fetches the newly added row, including the system-generated row_number for tracking updates. Stage 2: AI Content Creation (Initial Draft) The workflow uses an expert AI agent to generate the first draft of the blog post. Copywriter AI Agent: Acting as an expert SEO content strategist, the agent receives the topic and reference URL. The agent improves the provided topic into an SEO-optimized title. It writes a complete, conversational, SEO-friendly blog post (800β1200 words) using proper Markdown headings and lists. OpenAI Chat Model (GPT-4o-mini): Powers the agent's generation. Structured Output Parser: Ensures the output is in a JSON format with separate title and content keys. Set Data: The AI-generated title and content are mapped to workflow variables (Topic Title, Content) for easy use in subsequent nodes. Stage 3: Human Approval and Revision Loop This is the critical quality control step where a human reviews the draft and decides on the next action. Send Content for Approval (Gmail): The generated title and content are sent via email to the approver (<your email>). This uses a custom form that allows the user to choose Yes (Approve), No (Request Revision), or Cancel. The form also includes a Content Feedback textarea. Approval Result (Switch): The workflow pauses until the approver submits the form, and then directs the flow based on their choice. If "Yes" (Approved): Proceeds to the final publishing stage. The Update Topic Status on Google Sheets node is executed, setting the Status to Approved and logging the new Title. If "No" (Revision Requested): Proceeds to the revision loop. Copywriter Revision Agent: This agent takes the original content, the topic title, and the user's Content Feedback. It is instructed to incorporate the feedback, preserving the existing structure and tone, and outputs a revised blog post. The flow loops back through the Set Data node and then returns to the Send Content for Approval node for a new review. If "Cancel": Stops the workflow, and the Update Topic Status on Google Sheets node is executed. Stage 4: Final Publishing Once approved, the content is stored in Google Docs and the tracker is updated. Create Blog file (Google Docs): A new Google Doc is created using the approved Topic Title. Add blog content in file (Google Docs): The final Content (in Markdown format) is inserted into the newly created document. Update sheet with blog post link (Google Sheets): The final tracker update logs the Link to document and the Published date. Customization Tip Recommend using AI humanazier and AI detector tools before approval to make the SEO score better.
Intelligent purchase order generator with AI supplier selection
Transform procurement from manual chaos to intelligent automation - AI-powered supplier selection analyzes urgency, cost, and delivery requirements to recommend optimal vendors, then automatically generates professional POs, manages approval workflows, and tracks delivery while maintaining complete audit trails. What This Workflow Does Revolutionizes purchase order management with AI-driven supplier optimization and automated procurement workflows: Webhook-Triggered Generation - Automatically creates POs from inventory systems, manual requests, or threshold alerts Smart Data Validation - Verifies item details, quantities, pricing, and calculates totals with tax and shipping AI Supplier Selection - OpenAI agent analyzes order requirements and recommends optimal supplier based on multiple factors Intelligent Analysis - AI considers urgency level, total value, item categories, delivery requirements, and cost optimization Multi-Supplier Database - Maintains supplier profiles with contact details, payment terms, delivery times, and specializations Approval Workflow - Routes high-value orders (>$5000) for management approval before supplier notification Professional PO Generation - Creates beautifully formatted purchase orders with company branding and complete details AI Insights Display - Shows supplier selection reasoning, cost optimization notes, and alternative supplier recommendations PDF Conversion - Transforms HTML into print-ready, professional-quality purchase order documents Automated Email Distribution - Sends POs directly to selected suppliers with all necessary attachments Google Drive Archival - Automatically saves POs to organized folders with searchable filenames Procurement System Logging - Records complete PO details, supplier info, and status in centralized system Delivery Tracking - Monitors order status from placement through delivery confirmation Slack Team Notifications - Real-time alerts to procurement team with PO details and AI recommendations Urgency Classification - Prioritizes orders based on urgency (urgent, normal) affecting supplier selection Cost Optimization - AI identifies opportunities for savings or faster delivery based on requirements Key Features AI-Powered Supplier Matching: Machine learning analyzes order characteristics and recommends best supplier from database based on delivery speed, cost, and specialization Intelligent Trade-Off Analysis: AI balances cost vs delivery time vs supplier capabilities to find optimal choice for specific order requirements Automatic PO Numbering: Generates unique sequential purchase order numbers with format PO-YYYYMM-for tracking and reference Approval Threshold Management: Configurable dollar thresholds trigger approval workflows for high-value purchases requiring management authorization Multi-Criteria Supplier Selection: Considers urgency level, order value, item categories, delivery requirements, and historical performance Supplier Specialization Matching: Routes technology orders to tech suppliers, construction materials to building suppliers, etc. Cost vs Speed Optimization: AI recommends premium suppliers for urgent orders and budget suppliers for standard delivery timelines Alternative Supplier Suggestions: Provides backup supplier recommendations in case primary choice is unavailable Real-Time Pricing Calculations: Automatically computes line items, subtotals, taxes, shipping, and grand totals Payment Terms Automation: Pulls supplier-specific payment terms (Net 30, Net 45, etc.) from supplier database Shipping Address Management: Maintains multiple delivery locations with automatic address population Special Instructions Field: Captures custom requirements, delivery notes, or handling instructions for suppliers Item Catalog Integration: Supports product codes, descriptions, quantities, and unit pricing for accurate ordering Audit Trail Generation: Complete activity log tracking PO creation, approvals, supplier notification, and delivery Status Tracking System: Monitors PO lifecycle from creation through delivery confirmation with real-time updates Multi-Department Support: Tracks requesting department for budget allocation and accountability Perfect For Retail Stores - Automated inventory reordering when stock reaches threshold levels Manufacturing Companies - Raw material procurement with delivery scheduling for production planning Restaurant Chains - Food and supplies ordering with vendor rotation and cost optimization IT Departments - Equipment purchasing with approval workflows for technology investments Construction Companies - Materials procurement with urgency-based supplier selection for project timelines Healthcare Facilities - Medical supplies ordering with compliance tracking and vendor management Educational Institutions - Procurement for facilities, supplies, and equipment across departments E-commerce Businesses - Inventory replenishment with AI-optimized supplier selection for margins Hospitality Industry - Supplies procurement for hotels and resorts with cost control Government Agencies - Compliant procurement workflows with approval chains and audit trails What You Will Need Required Integrations OpenAI API - AI agent for intelligent supplier selection and optimization (API key required) HTML to PDF API - PDF conversion service for professional PO documents (approximately 1-5 cents per PO) Gmail or SMTP - Email delivery for sending POs to suppliers and approval requests Google Drive - Cloud storage for PO archival and compliance documentation Optional Integrations Slack Webhook - Procurement team notifications with PO details and AI insights Procurement Software - ERP/procurement system API for automatic logging and tracking Inventory Management - Connect to inventory systems for automated reorder triggers Accounting Software - QuickBooks, Xero integration for expense tracking and reconciliation Supplier Portal - Direct integration with supplier order management systems Approval Software - Connect to approval management platforms for workflow automation Quick Start Import Template - Copy JSON workflow and import into your n8n instance Configure OpenAI - Add OpenAI API credentials for AI supplier selection agent Setup PDF Service - Add HTML to PDF API credentials in the HTML to PDF node Configure Gmail - Connect Gmail OAuth2 credentials and update sender email Connect Google Drive - Add Google Drive OAuth2 credentials and set folder ID for PO archival Customize Company Info - Edit company data with your company name, address, contact details Update Supplier Database - Modify supplier information in enrichment node with actual vendor details Set Approval Threshold - Adjust dollar amount requiring management approval ($5000 default) Configure Email Templates - Customize supplier email and approval request messages Add Slack Webhook - Configure Slack notification URL for procurement team alerts Test AI Agent - Submit sample order to verify AI supplier selection logic Test Complete Workflow - Run end-to-end test with real PO data to verify all integrations Customization Options Supplier Scoring Algorithm - Adjust AI weighting for cost vs delivery speed vs quality factors Multi-Location Support - Add multiple shipping addresses for different facilities or warehouses Budget Tracking - Integrate departmental budgets with automatic budget consumption tracking Volume Discounts - Configure automatic discount calculations based on order quantities Contract Compliance - Enforce existing vendor contracts and preferred supplier agreements Multi-Currency Support - Handle international suppliers with currency conversion and forex rates RFQ Generation - Extend workflow to generate requests for quotes for new items Delivery Scheduling - Integrate calendar for scheduled deliveries and receiving coordination Quality Tracking - Add supplier performance scoring based on delivery time and quality Return Management - Create return authorization workflows for defective items Recurring Orders - Automate standing orders with scheduled generation Inventory Forecasting - AI predicts reorder points based on historical consumption patterns Supplier Negotiation - Track pricing history and flag opportunities for renegotiation Compliance Documentation - Attach required certifications, insurance, or regulatory documents Multi-Approver Chains - Configure complex approval hierarchies for different dollar thresholds Expected Results 90% time savings - Reduce PO creation from 30 minutes to 3 minutes per order 50% faster supplier selection - AI recommends optimal vendor instantly vs manual research Elimination of stockouts - Automated reordering prevents inventory shortages 20-30% cost savings - AI optimization identifies better pricing and supplier options 100% approval compliance - No high-value orders bypass required approvals Zero lost POs - Complete digital trail with automatic archival Improved supplier relationships - Professional, consistent POs with clear requirements Faster order processing - Suppliers receive clear POs immediately enabling faster fulfillment Better delivery predictability - AI matches urgency to supplier capabilities reducing delays Reduced procurement overhead - Automation eliminates manual data entry and follow-up Pro Tips Train AI with Historical Data - Feed past successful orders to improve AI supplier recommendations Maintain Supplier Performance Scores - Track delivery times and quality to enhance AI selection accuracy Set Smart Thresholds - Adjust approval amounts based on department budgets and risk tolerance Use Urgency Levels Strategically - Reserve "urgent" classification for true emergencies to optimize costs Monitor AI Recommendations - Review AI reasoning regularly to validate supplier selection logic Integrate Inventory Triggers - Connect to inventory systems for automatic PO generation at reorder points Establish Preferred Vendors - Flag preferred suppliers in database for AI to prioritize when suitable Document Special Requirements - Use special instructions field consistently for better supplier compliance Track Cost Trends - Export PO data to analyze spending patterns and negotiation opportunities Review Alternative Suppliers - Keep AI's alternative recommendations for backup when primary unavailable Schedule Recurring Orders - Set up automated triggers for regular supply needs Centralize Receiving - Use consistent ship-to addresses to simplify delivery coordination Archive Systematically - Organize Drive folders by fiscal year, department, or supplier Test Approval Workflow - Verify approval routing works before deploying to production Communicate AI Benefits - Help procurement team understand AI recommendations build trust Business Impact Metrics Track these key metrics to measure workflow success: PO Generation Time - Average minutes from request to supplier notification (target: under 5 minutes) Supplier Selection Accuracy - Percentage of AI recommendations that meet delivery and cost expectations (target: 90%+) Approval Workflow Speed - Average hours for high-value PO approvals (target: under 4 hours) Stockout Prevention - Reduction in inventory shortages due to faster PO processing Cost Savings - Percentage reduction in procurement costs from AI optimization (typical: 15-25%) Order Accuracy - Reduction in PO errors requiring correction or cancellation Supplier On-Time Delivery - Improvement in delivery performance from better supplier matching Procurement Productivity - Number of POs processed per procurement staff member Budget Compliance - Percentage of POs staying within approved departmental budgets Audit Readiness - Time required to produce PO documentation for audits (target: under 5 minutes) Template Compatibility Compatible with n8n version 1.0 and above Requires OpenAI API access for AI agent functionality Works with n8n Cloud and Self-Hosted instances Requires HTML to PDF API service subscription No coding required for basic setup Fully customizable supplier database and selection criteria Integrates with major procurement and ERP systems via API Supports unlimited suppliers and product categories Scales to handle thousands of POs monthly --- Ready to transform your procurement process? Import this template and start generating intelligent purchase orders with AI-powered supplier selection, automated approval workflows, and complete procurement tracking - eliminating manual processes, preventing stockouts, and optimizing costs across your entire supply chain!