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 siteBy 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.
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}`,
},
})
},
})
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:
In order to connect your personal or workspace Gmail account to Pipedream, you'll need to create a custom OAuth app in Google Cloud.
https://mail.google.com/
scope and then click "Update"Now you've created an unlisted Gmail App that you can integrate with Pipedream.
You will need to generate a set of OAuth credentials to connect your new Gmail app to Pipedream properly.
Navigate to the Credentials section on the left side.
Click Create Credentials at the top and select “*OAuth client ID
https://api.pipedream.com/connect/oauth/oa_G7Ain6/callback
At this point, you should have a Gmail App under your Google Project, and a set of OAuth keys.
Now when prompted in Pipedream after trying to connect a Gmail Developer App, copy and paste your OAuth credentials.
Also select the scopes you chose when defining the app. We recommend using https://mail.google.com/
Then click Connect
If you did not publish your Gmail App in the Google Cloud Console, just click Continue to ignore the warning.
Check all of the necessary scopes you'll need for your workflows
Click the final Connect and your custom Gmail app should be integrated into Pipedream!
Emit new event for each attachment in a message received. This source is capped at 100 max new messages per run.
Emit new event when an email is received. This source is capped at 100 max new messages per run.
Emit new event for each new email sent. (Maximum of 300 events emited per execution)
Create a draft from your Google Workspace email account
Download an attachment by attachmentId to the /tmp directory. See the docs
Find an email using Google's Search Engine. See the docs
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
GET
https://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
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: 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}}
POST
https://oauth2.googleapis.com/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.client_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}