Gmail (Developer App)

Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.

Go to site
Explore
/
Apps
/
Gmail (Developer App)

Gmail (Developer App) API Integrations

Build and run workflows using the Gmail (Developer App) API. Use 1000s of source-available triggers and actions across 1,700+ apps. Or write custom code to integrate any app or API in seconds.

Overview

By connecting your personal Gmail account to Pipedream, you'll be able to incorporate email into whatever you're building with any of the 900+ apps that are available on Pipedream.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import { axios } from "@pipedream/platform"
export default defineComponent({
  props: {
    gmail_custom_oauth: {
      type: "app",
      app: "gmail_custom_oauth",
    }
  },
  async run({steps, $}) {
    return await axios($, {
      url: `https://www.googleapis.com/oauth2/v1/userinfo`,
      headers: {
        Authorization: `Bearer ${this.gmail_custom_oauth.$auth.oauth_access_token}`,
      },
    })
  },
})

Choose an API to Connect with Gmail (Developer App) API

1
-
24
of
1,700+
apps by most popular

HTTP / Webhook
HTTP / Webhook
Get a unique URL where you can send HTTP or webhook requests
Notion
Notion
Notion is a new tool that blends your everyday work apps into one. It's the all-in-one workspace for you and your team.
OpenAI (ChatGPT)
OpenAI (ChatGPT)
OpenAI is an AI research and deployment company with the mission to ensure that artificial general intelligence benefits all of humanity. They are the makers of popular models like ChatGPT, DALL-E, and Whisper.
Schedule
Schedule
Trigger workflows on an interval or cron schedule.
Google Drive
Google Drive
Google Drive is a file storage and synchronization service which allows you to create and share your work online, and access your documents from anywhere.
Google Sheets
Google Sheets
Use Google Sheets to create and edit online spreadsheets. Get insights together with secure sharing in real-time and from any device.
Filter
Filter
Specify a condition that your workflow must meet and whether you'd like to proceed or end workflow execution.
Python
Python
Anything you can do in Python can be done in a Pipedream Workflow. This includes using any of the 350,000+ PyPi packages available in your Python powered workflows.
Slack
Slack
Slack is a channel-based messaging platform. With Slack, people can work together more effectively, connect all their software tools and services, and find the information they need to do their best work — all within a secure, enterprise-grade environment.
Data Stores
Data Stores
Use Pipedream Data Stores to manage state throughout your workflows.
GitHub
GitHub
Where the world builds software. Millions of developers and companies build, ship, and maintain their software on GitHub—the largest and most advanced development platform in the world.
Formatting
Formatting
Pre-built actions to make formatting and manipulating data within your workflows easier.
Node
Node
Anything you can do with Node.js, you can do in a Pipedream workflow. This includes using most of npm's 400,000+ packages.
Airtable (OAuth)
Airtable (OAuth)
Airtable is a low-code platform to build next-gen apps. Move beyond rigid tools, operationalize your critical data, and reimagine workflows with AI.
Zoom
Zoom
Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars.
Google Calendar
Google Calendar
With Google Calendar, you can quickly schedule meetings and events and get reminders about upcoming activities, so you always know what’s next.
Gmail
Gmail
Gmail offers private and secure email by Google at no cost, for business and consumer accounts.
Gmail (Developer App)
Gmail (Developer App)
Private and secure email by Google at no cost, for business and consumer accounts. Use this app to connect your own developer account credentials.
Email
Email
Trigger workflows on new emails, and send emails to yourself as part of a Pipedream workflow.
Delay
Delay
Delay, pause, suspend, or have the execution of your workflow wait for as little as one millisecond, or as long as one year.
Go
Go
Anything you can do in Go, you can do in a Pipedream Workflow. You can use any of Go packages available with a simple import.
Premium
Zoom Admin
Zoom Admin
Video conferencing (includes account-level scopes) for Zoom Admins.
Twilio
Twilio
Twilio is a cloud communications platform for building SMS, Voice & Messaging applications on an API built for global scale.
Bash
Bash
Run any Bash in a Pipedream step within your workflow, including making curl requests.

Getting Started

The Google Developer App in Pipedream can integrate with either a personal Gmail account or a Google workspace email account. Either option involves creating a custom Google App in the Google Cloud Console. This process does not involve any code or special approval by Google. The steps are outlined below:

Creating a Gmail app

In order to connect your personal or workspace Gmail account to Pipedream, you'll need to create a custom OAuth app in Google Cloud.

  1. Sign in to the Google Cloud Console
  2. Select an existing project or create a new one

Select an exisiting project or create a a new one in the Google Cloud Console

  1. Select APIs & Services
  2. Click Enable APIs & Services

Select "Enable APIs & Services to open a menu to enable the Gmail API for Pipedream to connect to

  1. Search for and select Gmail API
  2. Click Enable

Search for an select the Gmail Enterprise API

  1. Click OAuth consent screen on the left side

Click "OAuth consent screen" in the left navigation menu

  1. Select External User Type and click “Create”

Select "External" in the OAuth Consent Screen

  1. Fill in the required fields and click Save and Continue
  2. Click Add or remove scopes and select the https://mail.google.com/ scope and then click "Update"
  3. Click Save and Continue to finish the Scopes step
  4. Add your own email as a Test User by clicking *Add Users& then typing in your email in the prompt then clicking Add again. Then finally click Save and Continue to finish the Test Users portion.
  5. You should be prompted with a Summary page.

Now you've created an unlisted Gmail App that you can integrate with Pipedream.

Create OAuth Credentials

You will need to generate a set of OAuth credentials to connect your new Gmail app to Pipedream properly.

  1. Navigate to the Credentials section on the left side.

    Open the Credentials menu in the left hand nav bar

  2. Click Create Credentials at the top and select “*OAuth client ID

Click create credentials to start the process

Select the OAuth Client ID option

  1. Select Web application for Application type

Web application is the type of OAuth credential we're generating

  1. Name the app “Pipedream”
  2. Click Add URI and enter https://api.pipedream.com/connect/oauth/oa_G7Ain6/callback

Add the Pipedream URL to the Callback Redirect URL option

  1. Click Create to create your new OAuth keys
  2. Note the client ID and client Secret, but keep these private and secure

Store the Client ID and Client Secret keys

Connect your Gmail app Pipedream with your Gmail app OAuth crendentials

At this point, you should have a Gmail App under your Google Project, and a set of OAuth keys.

  1. Now when prompted in Pipedream after trying to connect a Gmail Developer App, copy and paste your OAuth credentials.

  2. Also select the scopes you chose when defining the app. We recommend using https://mail.google.com/

  3. Then click Connect

  4. If you did not publish your Gmail App in the Google Cloud Console, just click Continue to ignore the warning.

    Click continue if presented with a warning about an unpublished app

  5. Check all of the necessary scopes you'll need for your workflows

    Check all scopes to include grant your integration permission

  6. Click the final Connect and your custom Gmail app should be integrated into Pipedream!

Publish your custom Gmail app

Google has a 7 day expiration window on refresh tokens for applications with a publishing status of "Testing", so you will need to Publish your application in order to maintain your account connection.

  1. Navigate to your application, and click OAuth Consent Screen on the lefthand sidebar.
  2. Under Publishing status, click Publish App. If you included any sensitive or restricted scopes in your app, there will be a disclosure stating that you will need to go through the process of verification. Click Confirm.
  3. Your application will not be available externally unless you share your client_id with others, and you will not have to go through the verification process unless you intend to onboard over 100 users.
  4. The publishing status should be set to In production, and your account should maintain its connection without an expiration window.

Publish your application

Confirmation of changes

Add Label to Email with Gmail (Developer App) API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Gmail (Developer App)
 
Try it
Add Label to Email with Gmail (Developer App) API on New Message in Channel from Discord Bot API
Discord Bot + Gmail (Developer App)
 
Try it
Add Label to Email with Gmail (Developer App) API on New Submission from Typeform API
Typeform + Gmail (Developer App)
 
Try it
Get Film with SWAPI - Star Wars API on New Attachment Received from Gmail (Developer App) API
Gmail (Developer App) + SWAPI - Star Wars
 
Try it
Add Label to Email with Gmail (Developer App) API on New Submission (Instant) from Jotform API
Jotform + Gmail (Developer App)
 
Try it
New Attachment Received from the Gmail (Developer App) API

Emit new event for each attachment in a message received. This source is capped at 100 max new messages per run.

 
Try it
New Email Received from the Gmail (Developer App) API

Emit new event when an email is received. This source is capped at 100 max new messages per run.

 
Try it
New Labeled Email from the Gmail (Developer App) API

Emit new event when a new email is labeled.

 
Try it
New Sent Email from the Gmail (Developer App) API

Emit new event for each new email sent. (Maximum of 300 events emited per execution)

 
Try it
Add Label to Email with the Gmail (Developer App) API

Add a label to an email message. See the docs

 
Try it
Create Draft with the Gmail (Developer App) API

Create a draft from your Google Workspace email account

 
Try it
Download Attachement with the Gmail (Developer App) API

Download an attachment by attachmentId to the /tmp directory. See the docs

 
Try it
Find Email with the Gmail (Developer App) API

Find an email using Google's Search Engine. See the docs

 
Try it
Send Email with the Gmail (Developer App) API

Send an email from your Google Workspace email account

 
Try it

Troubleshooting

Application disconnects after 7 days
If your developer application disconnects after 7 days, you need to follow the steps above to Publish your custom Gmail app in order to keep your account connected.

Authentication

Gmail (Developer App) uses OAuth authentication. When you connect your Gmail (Developer App) account, Pipedream will open a popup window where you can sign into Gmail (Developer App) and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Gmail (Developer App) API.

Pipedream requests the following authorization scopes when you connect your account:

do not use
OAuth Request Configurations:
  1. authorization
    GEThttps://accounts.google.com/o/oauth2/auth?client_id={{custom_fields.client_id}}&state={{oauth.state}}&redirect_uri={{oauth.redirect_uri}}&response_type=code&scope=email profile {{custom_fields.space_separated_scopes}}&access_type=offline&prompt=consent
  2. accessToken
    POSThttps://oauth2.googleapis.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=authorization_code&code={{oauth.code}}&redirect_uri={{oauth.redirect_uri}}
  3. refreshToken
    POSThttps://oauth2.googleapis.com/tokencontent-type: application/x-www-form-urlencodedaccept: application/json
    client_id={{custom_fields.client_id}}&client_secret={{custom_fields.client_secret}}&grant_type=refresh_token&refresh_token={{oauth.refresh_token}}