Use Postmaster Tools to analyze your email performance, and help Gmail route your messages to the right place
Go to siteThe Google Postmaster Tools API offers insights into the performance and deliverability of emails sent to Gmail users. It provides data on spam rates, feedback loops, delivery errors, and more, allowing senders to optimize email campaigns and enhance inbox placement. In Pipedream, you can harness this data to automate monitoring, analyze sending patterns, and integrate email performance metrics with other services for comprehensive analysis and action.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
google_postmaster_tools_api: {
type: "app",
app: "google_postmaster_tools_api",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://www.googleapis.com/oauth2/v1/userinfo`,
headers: {
Authorization: `Bearer ${this.google_postmaster_tools_api.$auth.oauth_access_token}`,
},
})
},
})
Monitor Domain Reputation: Set up a Pipedream workflow to regularly check your domain's reputation score via the Google Postmaster Tools API. When the reputation falls below a certain threshold, automatically trigger an alert via email or Slack, prompting you to investigate and address potential issues.
Aggregate Deliverability Stats: Create a Pipedream workflow that fetches deliverability data from the API at the end of each day. Combine this with a data visualization tool like Google Sheets or Tableau to generate daily reports, offering clear insights into email performance trends over time.
Automated Feedback Loop Response: Set up a Pipedream workflow that listens for feedback loop notifications from the Google Postmaster Tools API. Use this data to automatically unsubscribe users or adjust email strategies in your Customer Relationship Management (CRM) system, such as Salesforce or HubSpot, to maintain a healthy sender reputation.
Emits a new event when traffic stats match certain criteria. See the documentation
Google Postmaster Tools uses OAuth authentication. When you connect your Google Postmaster Tools account, Pipedream will open a popup window where you can sign into Google Postmaster Tools 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 Postmaster Tools API.
Pipedream requests the following authorization scopes when you connect your account:
email
profile
https://www.googleapis.com/auth/postmaster.readonly
GET
https://accounts.google.com/o/oauth2/auth
?
client_id={{oauth.client_id}}
&
redirect_uri={{oauth.redirect_uri}}
&
state={{oauth.state}}
&
response_type=code
&
scope={{oauth.space_separated_scopes}}
&
prompt=consent
&
access_type=offline
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}}
&
redirect_uri={{oauth.redirect_uri}}
&
grant_type=authorization_code
&
code={{oauth.code}}
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}}