Skip to main content

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:

Task parameters

Configure these parameters for the SendGrid task.

ParameterDescriptionRequired/ Optional
inputParameters.fromThe sender’s email address. This must be a verified email in SendGrid. Learn more.Required.
inputParameters.toThe recipient’s email address.Required.
inputParameters.subjectThe email subject.Required.
inputParameters.contentTypeThe type of email content. Supported values:
  • text/plain
  • text/html
Required.
inputParameters.contentThe email body.Required.
inputParameters.sendgridConfigurationThe 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:

  1. In your workflow, select the (+) icon and add a SendGrid task.
  2. In From, enter the verified SendGrid sender email.
  3. In To, enter the recipient’s email address.
  4. In Content Type, select the type of email content as text/plain or text/html.
  5. In Content, enter the email body.
  6. In SendGrid Configuration, select the SendGrid integration added to the cluster.

Adding SendGrid task