The Google API on Pipedream is a powerhouse for automating interactions with various Google services, like Google Sheets, Gmail, Calendar, and Drive. With it, you can read and write data, manage emails, calendar events, and files, and integrate with other APIs for enhanced workflows.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google: {
type: "app",
app: "google",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.google.$auth.oauth_access_token}`,
},
})
},
})
Automate Gmail inbox management: Create workflows that filter incoming emails, label them, or trigger actions in other apps based on the content or attachments of the emails.
Dynamic Google Sheets reporting: Set up a workflow that collects data from different sources, such as sales figures from a CRM or statistics from a marketing platform, and populates or updates a Google Sheet in real-time.
Google Calendar event coordination: Build a system that listens for new events in a Google Calendar, sends reminders via SMS or Slack, and automatically creates Zoom or Microsoft Teams meeting links.
Google uses OAuth authentication. When you connect your Google account, Pipedream will open a popup window where you can sign into Google and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Google API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/spreadsheets.readonly
https://www.googleapis.com/auth/drive.readonly
GET
https://accounts.google.com/o/oauth2/auth
?
client_id={{oauth.client_id}}
&
state={{oauth.state}}
&
redirect_uri={{oauth.redirect_uri}}
&
response_type=code
&
scope={{oauth.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={{oauth.client_id}}
&
client_secret={{oauth.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={{oauth.client_id}}
&
client_secret={{oauth.client_secret}}
&
grant_type=refresh_token
&
refresh_token={{oauth.refresh_token}}