Send marketing and transactional email through the Twilio SendGrid platform with the Email API, proprietary mail transfer agent, and infrastructure for scalable delivery.
Go to siteThe Twilio SendGrid API opens up a world of possibilities for email automation, enabling you to send emails efficiently and track their performance. With this API, you can programmatically create and send personalized email campaigns, manage contacts, and parse inbound emails for data extraction. When you harness the power of Pipedream, you can connect SendGrid to hundreds of other apps to automate workflows, such as triggering email notifications based on specific actions, syncing email stats with your analytics, or handling incoming emails to create tasks or tickets.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
sendgrid: {
type: "app",
app: "sendgrid",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.sendgrid.com/v3/user/account`,
headers: {
Authorization: `Bearer ${this.sendgrid.$auth.api_key}`,
},
})
},
})
Automated Customer Support Tickets: When a customer sends an email to your support address, SendGrid's Inbound Parse Webhook can catch it. Pipedream can then take that email, extract the relevant info, and automatically create a ticket in your customer support platform, such as Zendesk.
Email Campaign Stats to Google Sheets: After sending an email campaign through SendGrid, you may want to analyze the performance data. Pipedream can automatically fetch the stats, like opens, clicks, and bounces, and log them into a Google Sheet for easy tracking and visualization.
E-commerce Order Confirmation and Follow-up: When a new order is received in an e-commerce platform like Shopify, you can use Pipedream to trigger an order confirmation email via SendGrid. After a set period, you can follow up with another email asking for feedback or offering a discount on future purchases.
First, open the SendGrid console and log in.
Then open the Integration Guide and select the Web API option.
Then choose any language from the next menu. Choose any programming language; this selection only affects the example code shown. The key step is obtaining the API key.
After picking a language, you'll be prompted to generate an API key, we recommend naming it Pipedream
for easy identification.
After creating the API key, copy it and paste it into the appropriate configuration field in a Pipedream SendGrid connected account, either through a Pipedream action/trigger or through the Connected Accounts section of the dashboard.
You can skip the remaining steps of the Integration guide that test your API key, as these are not necessary for the integration with Pipedream.
Allows you to add one or more email addresses to the global suppressions group. See the docs here
Allows you to create a new contact list. See the docs here
Allows you to delete all email addresses on your blocks list. See the docs here
Allows you to delete all emails on your bounces list. See the docs here
SendGrid uses standard HTTP status codes to help troubleshoot issues.
If a SendGrid API call fails, Pipedream will show the error code which you can match with below:
This error is shown when the request is missing data or is malformed. An example is a malformed email address; SendGrid won't accept invalid email addresses to deliver mail.
This means that your SendGrid API key connected to Pipedream is invalid or is missing from the request.
Ensure the API key is copied correctly from your SendGrid console and included properly as an Authorization
header in the format Bearer ${your token here}
.
This error occurs when you attempt to use an unverified sender email address under your account. To resolve this error, use the correct email address or verify the email address. See the verification requirements here.
Make sure to pass Accept: application/json
in the headers of your HTTP request in order for SendGrid to process your request correctly.
This error is thrown when you're sending too many API requests in a short window. The X-RateLimit-Remaining
and X-RateLimit-Reset
headers in the response give you the amount of requests remaining in the current rate limit window.
You can use Concurrency and Throttling in your workflow to throttle how quickly your workflow processes new events.
This means that SendGrid is having issues processing requests; check their status page for updates on the service. For these issues, contact SendGrid directly.
Twilio SendGrid uses API keys for authentication. When you connect your Twilio SendGrid account, Pipedream securely stores the keys so you can easily authenticate to Twilio SendGrid APIs in both code and no-code steps.