Skip to main content

SendGrid Component

Send emails through SendGrid

Component key: sendgrid

Description

SendGrid is an email delivery service. This component allows you to send of emails through the SendGrid platform.

Connections

SendGrid API Key

Information about getting started and creating API keys with SendGrid can be found on their developer documentation site.

Triggers

Webhook

Receive and validate webhook requests from SendGrid for webhooks you configure. | key: webhook

You can configure a SendGrid event webhook to send information to a Prismatic webhook URL when an email is received.

Output Example Payload

{
"payload": {
"headers": {
"accept": "*/*",
"Content-Type": "application/json; charset=UTF-8",
"User-Agent": "SendGrid Event API",
"Host": "hooks.example.prismatic.io"
},
"body": {
"data": [
{
"email": "someone@prismatic-example.com",
"timestamp": "1635784924",
"smtp-id": "<example.dfd.64b469@ismtpd-555>",
"event": "processed",
"category": ["Example Email Category"],
"sg_event_id": "WoOMEuhb-Mj_LEKrp8bC4g==",
"sg_message_id": "14c5d75ce93.dfd.64b469.filter0001.16648.5515E0B88.0"
}
]
},
"rawBody": {
"data": {
"type": "Buffer",
"data": [69, 120, 97, 109, 112, 108, 101]
}
},
"queryParameters": null,
"webhookUrls": {
"Flow 1": "https://hooks.example.prismatic.io/trigger/EXAMPLEGbG93Q29uZmlnOmRlNmNmNDMyLTliNWMtN0005NDMxLTRmYzA4ZjViODgxOA=="
},
"webhookApiKeys": {
"Flow 1": ["abc-123"]
},
"customer": {
"externalId": "customer-example-external-id",
"name": "John Doe"
}
}
}

Actions

Raw Request

Send raw HTTP request to SendGrid | key: rawRequest


Send Email

Send a single email to one or more recipients | key: sendEmail

Output Example Payload

{
"data": [
{
"body": {
"message": "Example"
},
"statusCode": 200,
"headers": {}
},
{}
]
}

Send Multiple Emails

Send a separate email to each recipient | key: sendMultipleEmails

Output Example Payload

{
"data": [
{
"body": {
"message": "Example"
},
"statusCode": 200,
"headers": {}
},
{}
]
}