SendGrid
The SendGrid task is used to send emails through the SendGrid platform. Use this task in workflows when you need to programmatically deliver emails such as alerts, confirmations, or updates.
The task uses a pre-configured SendGrid integration for authentication and delivery. Upon execution, it connects to the SendGrid API and sends the email as defined in the task configuration, which includes the sender and recipient email addresses, email subject, and message body.
Prerequisites:
- Integrate SendGrid with Orkes Conductor.
Task parameters
Configure these parameters for the SendGrid task.
Parameter | Description | Required/ Optional |
---|---|---|
inputParameters.from | The sender’s email address. This must be a verified email in SendGrid. Learn more. | Required. |
inputParameters.to | The recipient’s email address. | Required. |
inputParameters.subject | The email subject. | Required. |
inputParameters.contentType | The type of email content. Supported values:
| Required. |
inputParameters.content | The email body. | Required. |
inputParameters.sendgridConfiguration | The SendGrid integration that is configured in your cluster. | Required. |
Task configuration
This is the task configuration for a SendGrid task.
{
"name": "sendgrid",
"taskReferenceName": "sendgrid_ref",
"inputParameters": {
"from": "john.doe@acme.com",
"to": "jane.doe@acme.com",
"subject": "Email Subject",
"contentType": "text/plain",
"content": "Email Body",
"sendgridConfiguration": "<INTEGRATION-NAME>"
},
"type": "SENDGRID"
}
Adding a SendGrid task in UI
To add a SendGrid task:
- In your workflow, select the (+) icon and add a SendGrid task.
- In From, enter the verified SendGrid sender email.
- In To, enter the recipient’s email address.
- In Content Type, select the type of email content as text/plain or text/html.
- In Content, enter the email body.
- In SendGrid Configuration, select the SendGrid integration added to the cluster.