See llms.txt for all machine-readable content.

Gmail and GraphQL integration

Save yourself the work of writing custom integrations for Gmail and GraphQL and use n8n instead. Build adaptable and scalable Communication, HITL, workflows that work with your technology stack. All within a building experience you will love.

How to connect Gmail and GraphQL

Create a new workflow and add the first step

In n8n, click the "Add workflow" button in the Workflows tab to create a new workflow. Add the starting point – a trigger on when your workflow should run: an app event, a schedule, a webhook call, another workflow, an AI chat, or a manual trigger. Sometimes, the HTTP Request node might already serve as your starting point.

Gmail and GraphQL integration: Create a new workflow and add the first step

Score Shopify customer churn risk and sync results to Klaviyo, Slack, and Gmail

Quick overview This workflow runs weekly to fetch customers from the Shopify Admin GraphQL API, calculate churn risk based on each customer’s median reorder interval, and then sync at-risk customers to Klaviyo while sending a CSV report and summary to Slack and/or Gmail. How it works Runs weekly on a schedule and loads your Shopify domain, thresholds, and toggles for Klaviyo, Slack, and Gmail alerts. Queries the Shopify Admin GraphQL API in pages of 100 customers filtered by minimum order count and an order-date window that excludes very recent purchasers. Calculates each customer’s median days between recent orders, computes days since last order, and labels customers as MEDIUM or HIGH risk based on the days-since-last vs. median interval ratio. Stores at-risk customers across pagination and continues fetching until Shopify reports there are no more pages. Retrieves the full at-risk customer list, clears stored data for the next run, and stops if no at-risk customers are found. If enabled, updates each at-risk customer profile in Klaviyo by writing churn_risk and days_since_last_order via the Klaviyo API. Generates a dated CSV of at-risk customers, aggregates counts and revenue-at-risk totals, and sends the summary with the CSV attached to Slack and/or Gmail. Setup Add Shopify Admin API credentials (Header Auth) and set your shopifyDomain value in the workflow configuration. Add a Klaviyo Private API key (HTTP Header Auth) if you want to sync profile properties to Klaviyo. Connect your Gmail OAuth2 credential and set the recipient email address if you want email alerts. Connect your Slack credential and set the target Slack channel ID if you want Slack alerts and error notifications. In the workflow configuration, enable or disable emailAlert, slackAlert, and klaviyoEvent, and adjust minimumOrderRequired, customerActiveDays, and safeDays to match your store’s buying cycles. Requirements Shopify store with Admin API access (GraphQL endpoint). Klaviyo account for profile updates. Slack workspace and Gmail account for reporting.

Build your own Gmail and GraphQL integration

Create custom Gmail and GraphQL workflows by choosing triggers and actions. Nodes come with global operations and settings, as well as app-specific parameters that can be configured. You can also use the HTTP Request node to query data from any app or service with a REST API.

Gmail supported actions

Gmail and GraphQL integration details

Gmail

Gmail

Gmail is a free of charge email service offered as part of Google Workspace. It is used by individuals and organizations to send and receive emails and communicate internally and externally. It remains the world’s most widely used email service.

GraphQL

GraphQL

GraphQL allows you to answer API queries using your pre-existing data. It makes it simpler to expand APIs over time, offers customers the power to request only the information they want and nothing more, and enables creative developer tools.

Save engineering resources

Reduce time spent on customer integrations, engineer faster POCs, keep your customer-specific functionality separate from product all without having to code.

Learn more

FAQ about Gmail integrations

Need help setting up your Gmail and GraphQL integration?

Discover our latest community's recommendations and join the discussions about Gmail and GraphQL integration.

  • jake chard

    How do I remove n8n Email footer in Gmail node send message?

    jake chard

    Each email sent has “This email was sent automatically with n8n” in the footer or after the email. How do I remove this please?

    Open topic
  • Jan Koch

    Sending attachment via Gmail

    Jan Koch

    Describe the problem/error/question I am trying to send an email with an attachment using the Gmail node and get an error that I don’t understand. I am able to download that file from the original email and upload it to …

    Open topic
  • FawenYo

    Failed to send Gmail attachment

    FawenYo

    Describe the problem/error/question I’m trying to send an HTML file in the Gmail attachment, but it just raise an error. This question is similar to Sending attachment via Gmail , but I just couldn’t get it work …

    Open topic
  • Jean-Pierre GARNIER

    Gmail node subject text encoding issue

    Jean-Pierre GARNIER

    Describe the problem/error/question Hi, I’m facing an encoding problem while sending email with gmail node for every char with and accent (é,à,ô,î…). I noticed that this problem doesn’t occurs when i’m directly writing …

    Open topic
  • Anirudh Tugawe

    Update Google Sheets After sending Email

    Anirudh Tugawe

    Hi everyone, I’m working on a workflow where I’m using Google Sheets to get input data. I have a loop set up that correctly reads the data and processes it: it takes a Word document template, app…

    Open topic

Looking to integrate Slack and VirusTotal in your company?

Trusted by teams building smarter workflows.

Why

Why use n8n to integrate Gmail with GraphQL

Handle branching, merging and iteration easily. Pause your workflow to wait for external events.

Re-run single steps to test changes in no time. And pin your data to avoid generating trigger events every time you execute.

Your data is displayed alongside your settings, making edge cases easy to track down.

Use 1000+ workflow templates available from our core team and our community.

Copy and paste, easily import and export workflows.

Simple enough to 
understand + sophisticated 
enough to ship