Back to Catalog

Gmail to Zendesk: AI-enriched ticket creation with GPT-4o and Google Sheets logging

Rahul JoshiRahul Joshi
82 views
2/3/2026
Official Page

Description

Turn incoming Gmail messages into structured Zendesk tickets, enriched by Azure OpenAI, and log key details to Google Sheets for tracking. Ideal for IT Support teams needing fast, consistent intake and documentation. โšก

What This Template Does

  • Fetches new emails via Gmail Trigger. โœ‰๏ธ
  • Normalizes Gmail data and formats it for downstream steps.
  • Enriches and structures content with Azure OpenAI Chat Model and Output Parsers.
  • Creates Zendesk tickets from the processed data. ๐ŸŽซ
  • Appends or updates logs in Google Sheets for auditing and reporting. ๐Ÿ“Š

Key Benefits

  1. Saves time by automating ticket creation and logging. โฑ๏ธ
  2. Improves ticket quality with AI-driven normalization and structure.
  3. Ensures consistent records in Google Sheets for easy reporting.
  4. Reduces manual errors in IT Support intake. โœ…

Features

  • Gmail-triggered intake flow for new messages.
  • AI enrichment using Azure OpenAI Chat Model with parsing and memory tooling.
  • Zendesk ticket creation (create: ticket) with structured fields.
  • Google Sheets logging (appendOrUpdate: sheet).
  • Modular design with Execute Workflow nodes for reuse and scaling.

Requirements

  • n8n instance (Cloud or self-hosted).
  • Gmail credentials configured in n8n for the Gmail Trigger.
  • Zendesk credentials with permission to create tickets.
  • Google Sheets credentials with access to the target spreadsheet (append/update enabled).
  • Azure OpenAI credentials configured for the Azure OpenAI Chat Model and associated parsing.

Target Audience

  • IT Support and Helpdesk teams handling email-based requests. ๐Ÿ› ๏ธ
  • Operations teams standardizing inbound email workflows.
  • Agencies and MSPs offering managed support intake.
  • Internal automation teams centralizing ticket capture and logging.

Step-by-Step Setup Instructions

  • Connect Gmail credentials in n8n and select the inbox/label for the Gmail Trigger.
  • Add Zendesk credentials and confirm ticket creation permissions.
  • Configure Google Sheets credentials and select the target sheet for logs.
  • Add Azure OpenAI credentials to the Azure OpenAI Chat Model node and verify parsing steps.
  • Import the workflow, assign credentials to each node, update any placeholders, and run a test.
  • Rename the final email/logging nodes descriptively (e.g., โ€œLog to Support Sheetโ€) and schedule if needed.

AI-Enriched Zendesk Ticket Creation from Gmail with Google Sheets Logging

This n8n workflow automates the process of transforming incoming Gmail emails into intelligently enriched Zendesk tickets, while also maintaining a detailed log of these interactions in Google Sheets. It leverages the power of AI to extract key information and categorize emails, streamlining customer support operations.

What it does

This workflow performs the following steps:

  1. Monitors Gmail: Continuously listens for new emails in a specified Gmail account.
  2. Extracts Email Content: Retrieves the subject and body of the incoming email.
  3. Analyzes with AI Agent: Passes the email content to an AI Agent (powered by a Langchain Azure OpenAI Chat Model) to perform several tasks:
    • Summarize: Creates a concise summary of the email.
    • Categorize: Assigns a category to the email (e.g., "Feature Request", "Bug Report", "General Inquiry", "Customer Support").
    • Extract Key Information: Identifies and extracts relevant data points from the email (e.g., customer name, product mentioned, issue details).
  4. Parses AI Output: Uses a Structured Output Parser to extract the summary, category, and key information from the AI Agent's response.
  5. Logs to Google Sheets: Records the original email subject, body, the AI-generated summary, category, and extracted key information into a specified Google Sheet.
  6. Creates Zendesk Ticket: Generates a new Zendesk ticket using the AI-enriched data. The ticket subject will be the AI-generated summary, and the description will include the original email body, category, and extracted key information.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • Gmail Account: Configured as a credential in n8n for the Gmail Trigger node.
  • Google Sheets Account: Configured as a credential in n8n for the Google Sheets node. You will need a specific spreadsheet and sheet name for logging.
  • Zendesk Account: Configured as a credential in n8n for the Zendesk node.
  • Azure OpenAI Service: An Azure OpenAI deployment with a chat model (e.g., gpt-4o) configured as a credential in n8n for the Azure OpenAI Chat Model node. This is used by the AI Agent.

Setup/Usage

  1. Import the workflow: Download the JSON provided and import it into your n8n instance.
  2. Configure Credentials:
    • For the Gmail Trigger node, select or create your Gmail OAuth2 credential.
    • For the Google Sheets node, select or create your Google Sheets OAuth2 credential. Specify the Spreadsheet ID and Sheet Name where you want to log the data.
    • For the Zendesk node, select or create your Zendesk API Token credential.
    • For the Azure OpenAI Chat Model node, select or create your Azure OpenAI credential. Ensure your deployment name and API version are correctly configured.
  3. Review AI Agent Prompt: The AI Agent node contains a prompt that instructs the AI on how to summarize, categorize, and extract information. You may want to review and adjust this prompt to better suit your specific needs and the types of emails you expect.
  4. Activate the Workflow: Once all credentials and configurations are set, activate the workflow. It will start listening for new emails in your Gmail account.

This workflow provides a robust solution for automating and enhancing your customer support ticket creation process by integrating email, AI, and your helpdesk system.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatโ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. ๐Ÿ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing ๐Ÿ”ง Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation ๐Ÿ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com โ†’ API keys (sidebar) Click "Create new secret key" โ†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai โ†’ Dashboard โ†’ API Keys Generate a new API key โ†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) โš™๏ธ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowโ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" ๐ŸŽฏ Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration โš ๏ธ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Auto-reply & create Linear tickets from Gmail with GPT-5, gotoHuman & human review

This workflow automatically classifies every new email from your linked mailbox, drafts a personalized reply, and creates Linear tickets for bugs or feature requests. It uses a human-in-the-loop with gotoHuman and continuously improves itself by learning from approved examples. How it works The workflow triggers on every new email from your linked mailbox. Self-learning Email Classifier: an AI model categorizes the email into defined categories (e.g., Bug Report, Feature Request, Sales Opportunity, etc.). It fetches previously approved classification examples from gotoHuman to refine decisions. Self-learning Email Writer: the AI drafts a reply to the email. It learns over time by using previously approved replies from gotoHuman, with per-classification context to tailor tone and style (e.g., different style for sales vs. bug reports). Human Review in gotoHuman: review the classification and the drafted reply. Drafts can be edited or retried. Approved values are used to train the self-learning agents. Send approved Reply: the approved response is sent as a reply to the email thread. Create ticket: if the classification is Bug or Feature Request, a ticket is created by another AI agent in Linear. Human Review in gotoHuman: How to set up Most importantly, install the gotoHuman node before importing this template! (Just add the node to a blank canvas before importing) Set up credentials for gotoHuman, OpenAI, your email provider (e.g. Gmail), and Linear. In gotoHuman, select and create the pre-built review template "Support email agent" or import the ID: 6fzuCJlFYJtlu9mGYcVT. Select this template in the gotoHuman node. In the "gotoHuman: Fetch approved examples" http nodes you need to add your formId. It is the ID of the review template that you just created/imported in gotoHuman. Requirements gotoHuman (human supervision, memory for self-learning) OpenAI (classification, drafting) Gmail or your preferred email provider (for email trigger+replies) Linear (ticketing) How to customize Expand or refine the categories used by the classifier. Update the prompt to reflect your own taxonomy. Filter fetched training data from gotoHuman by reviewer so the writer adapts to their personalized tone and preferences. Add more context to the AI email writer (calendar events, FAQs, product docs) to improve reply quality.

gotoHumanBy gotoHuman
353

Dynamic Hubspot lead routing with GPT-4 and Airtable sales team distribution

AI Agent for Dynamic Lead Distribution (HubSpot + Airtable) ๐Ÿง  AI-Powered Lead Routing and Sales Team Distribution This intelligent n8n workflow automates end-to-end lead qualification and allocation by integrating HubSpot, Airtable, OpenAI, Gmail, and Slack. The system ensures that every new lead is instantly analyzed, scored, and routed to the best-fit sales representative โ€” all powered by AI logic, sir. --- ๐Ÿ’ก Key Advantages โšก Real-Time Lead Routing Automatically assigns new leads from HubSpot to the most relevant sales rep based on region, capacity, and expertise. ๐Ÿง  AI Qualification Engine An OpenAI-powered Agent evaluates the leadโ€™s industry, region, and needs to generate a persona summary and routing rationale. ๐Ÿ“Š Centralized Tracking in Airtable Every lead is logged and updated in Airtable with AI insights, rep details, and allocation status for full transparency. ๐Ÿ’ฌ Instant Notifications Slack and Gmail integrations alert the assigned rep immediately with full lead details and AI-generated notes. ๐Ÿ” Seamless CRM Sync Updates the original HubSpot record with lead persona, routing info, and timeline notes for audit-ready history, sir. --- โš™๏ธ How It Works HubSpot Trigger โ€“ Captures a new lead as soon as itโ€™s created in HubSpot. Fetch Contact Data โ€“ Retrieves all relevant fields like name, company, and industry. Clean & Format Data โ€“ A Code node standardizes and structures the data for consistency. Airtable Record Creation โ€“ Logs the lead data into the โ€œLeadsโ€ table for centralized tracking. AI Agent Qualification โ€“ The AI analyzes the lead using the TeamDatabase (Airtable) to find the ideal rep. Record Update โ€“ Updates the same Airtable record with the assigned team and AI persona summary. Slack Notification โ€“ Sends a real-time message tagging the rep with lead info. Gmail Notification โ€“ Sends a personalized handoff email with context and follow-up actions. HubSpot Sync โ€“ Updates the original contact in HubSpot with the assignment details and AI rationale, sir. --- ๐Ÿ› ๏ธ Setup Steps Trigger Node: HubSpot โ†’ Detect new leads. HubSpot Node: Retrieve complete lead details. Code Node: Clean and normalize data. Airtable Node: Log lead info in the โ€œLeadsโ€ table. AI Agent Node: Process lead and match with sales team. Slack Node: Notify the designated representative. Gmail Node: Email the rep with details. HubSpot Node: Update CRM with AI summary and allocation status, sir. --- ๐Ÿ” Credentials Required HubSpot OAuth2 API โ€“ To fetch and update leads. Airtable Personal Access Token โ€“ To store and update lead data. OpenAI API โ€“ To power the AI qualification and matching logic. Slack OAuth2 โ€“ For sending team notifications. Gmail OAuth2 โ€“ For automatic email alerts to assigned reps, sir. --- ๐Ÿ‘ค Ideal For Sales Operations and RevOps teams managing multiple regions B2B SaaS and enterprise teams handling large lead volumes Marketing teams requiring AI-driven, bias-free lead assignment Organizations optimizing CRM efficiency with automation, sir --- ๐Ÿ’ฌ Bonus Tip You can easily extend this workflow by adding lead scoring logic, language translation for follow-ups, or Salesforce integration. The entire system is modular โ€” perfect for scaling across global sales teams, sir.

MANISH KUMARBy MANISH KUMAR
113