Gmail to Zendesk Ticket Creation and Google Sheets Logging - n8n Workflow

Automate customer support intake using this powerful n8n workflow. It listens for specific Gmail messages, instantly creates Zendesk tickets, and logs all transaction details to Google Sheets for tracking. Deploy this essential n8n template today!

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Customer Support Managers: Who need reliable, automated ticket creation from email. Operations Teams: Requiring a centralized log (Google Sheets) of all incoming support requests processed by the n8n automation. n8n Automation Specialists: Looking for robust examples of integrating email triggers, CRM actions, and database logging in a single n8n workflow. SaaS and E-commerce Businesses: That manage high volumes of incoming customer requests via Gmail.

Overview

Managing customer support requires rapid response and meticulous logging. This sophisticated n8n workflow solves the problem of manual triaging by establishing a seamless integration pipeline between Gmail, Zendesk, and Google Sheets.

When a customer sends an email to a monitored address or an email receives a specific label (e.g., 'Support Queue'), this n8n trigger fires. The subsequent steps normalize the email content, automatically assess the priority (checking for 'urgent' keywords), create a structured ticket in Zendesk, and finally, log the ticket ID, subject, and Zendesk URL in a Google Sheet spreadsheet.

This robust n8n template ensures that no support request is missed, tickets are created instantly with correct metadata, and your team has a verifiable log of all automated actions, significantly boosting efficiency for your customer service operations.

How it Works

This automation operates through a five-step sequential process initiated by the primary n8n trigger:


  1. Email Reception (Gmail Trigger): The n8n trigger, configured as the Gmail Trigger n8n node, constantly polls the specified Gmail account, looking for messages that match a specific label (as defined in the filters parameter).

  2. Data Normalization (Code): The raw JSON output from the Gmail n8n trigger is processed by the first Code n8n node. This node extracts the requester's name and email, cleans up the body text by stripping HTML tags, and crucially, scans the subject and description for the keyword 'urgent' to set the priority field for Zendesk.

  3. Ticket Creation (Zendesk Node): The normalized data feeds into the Create Zendesk Ticket n8n node. This node uses the extracted subject, cleaned description, and assigned priority/tags to automatically generate a new ticket in your Zendesk instance.

  4. Logging Data Formatting (Code): The second Code n8n node receives the success payload from Zendesk (which includes the new ticket ID and API URL). It combines this with the original Gmail data and calculates the direct agent-facing URL for the Zendesk ticket, preparing a clean object suitable for spreadsheet logging.

  5. Record Keeping (Google Sheets Node): The final step in this n8n workflow uses the Log to Google Sheets n8n node to append a new row containing all critical metadata (Ticket ID, URL, Subject, Status, Tags, Timestamps) into the designated Google Sheet for auditing and tracking.

Installation Guide

To deploy this comprehensive n8n template, follow these steps:


  1. Import the Workflow: Copy the provided JSON data and paste it directly into your n8n instance via the 'Import from JSON' option.

  2. Set Up Gmail Credentials: Click on the 'Gmail Trigger' n8n node. You must create or select an OAuth2 credential that grants n8n access to monitor your Gmail account. Ensure the specific label ID configured in the n8n trigger exists in your Gmail inbox.

  3. Set Up Zendesk Credentials: Click the 'Create Zendesk Ticket' n8n node. Configure a Zendesk API Key credential. You will need your Zendesk subdomain, a registered email, and an API token.

  4. Set Up Google Sheets Credentials: Click the 'Log to Google Sheets' n8n node. Set up an OAuth2 credential with access to your Google Drive and Sheets.

  5. Configure Google Sheet Target: In the Google Sheets n8n node, specify the Document ID and Sheet Name. Ensure the target sheet has headers matching the fields being written (e.g., 'Ticket ID', 'Ticket URL', 'Subject', 'Status').

  6. Activate: Save the n8n workflow and set the n8n trigger to 'Active' to start polling for new emails.

Node Details

Gmail Trigger: This is the starting n8n trigger. Its function is to initiate the n8n workflow whenever a new email is received with the specific label ID configured (Label_7215267856143431312), ensuring only relevant support emails trigger the automation. Normalize Gmail Data (Code n8n node): Transforms unstructured Gmail data. It handles extraction of requester email/name, converts the email body (including stripping HTML) into a clean description, and implements business logic to dynamically set priority (to 'urgent' if the text contains the keyword 'urgent'). Create Zendesk Ticket (Zendesk n8n node): Creates the actual ticket. Key configuration maps the normalized fields: description to the ticket body and dynamically maps priority (which is also configured as a tag) and subject from the preceding n8n node output. Format Sheet Data (Code n8n node): This crucial Code n8n node standardizes the final log entry. It pulls the newly created Zendesk ID and URL and constructs the user-friendly agent ticket URL. This ensures all required columns for the Google Sheet are present and formatted correctly.* Log to Google Sheets (Google Sheets n8n node): Performs the final logging action. It uses the appendOrUpdate operation to add the detailed ticket information (ID, URLs, status, tags) to the defined spreadsheet, finalizing the n8n workflow's logging function.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

Rahul Joshi is a seasoned technology leader specializing in the n8n automation tool and AI-driven workflow automation. With deep expertise in building open-source workflow automation and self-hosted automation platforms, he helps organizations eliminate manual processes through intelligent n8n ai agent automation solutions.

Featured*