
Twilio SendGridMailExecution
CertifiedEmail execution summary via SendGrid
Twilio SendGridMailExecution
Email execution summary via SendGrid
Uses bundled HTML and text templates to email execution status, flow metadata, and a UI link through SendGrid. Intended for Flow-triggered alerts; for errors handlers, use SendGridMailSend instead.
type: io.kestra.plugin.twilio.sendgrid.SendGridMailExecutionExamples
Send an SendGrid email notification on a failed flow execution.
id: failure_alert
namespace: company.team
tasks:
- id: send_alert
type: io.kestra.plugin.twilio.sendgrid.SendGridMailExecution
to:
- hello@kestra.io
from: hello@kestra.io
subject: "The workflow execution {{trigger.executionId}} failed for the flow {{trigger.flowId}} in the namespace {{trigger.namespace}}"
sendgridApiKey: "{{ secret('SENDGRID_API_KEY') }}"
executionId: "{{ trigger.executionId }}"
triggers:
- id: failed_prod_workflows
type: io.kestra.plugin.core.trigger.Flow
conditions:
- type: io.kestra.plugin.core.condition.ExecutionStatus
in:
- FAILED
- WARNING
- type: io.kestra.plugin.core.condition.ExecutionNamespace
namespace: prod
prefix: true
Properties
from *Requiredstring
1Sender email address
Must comply with RFC 2822 formatting
sendgridApiKey *Requiredstring
1SendGrid API key
API key used to authenticate SendGrid requests; store as a secret
to *Requiredarray
1Recipient email addresses
Each address must comply with RFC 2822 format
attachments Non-dynamicarray
File attachments
List of files loaded from Kestra storage and attached to the email; delivered as downloadable attachments
io.kestra.plugin.twilio.sendgrid.SendGridMailSend-Attachment
Attachment filename
Filename presented to recipients, e.g., 'report.pdf'
Attachment URI
URI in Kestra internal storage that supplies the file content
application/octet-streamAttachment content type
MIME type for the attachment; defaults to application/octet-stream
cc array
Cc recipients
Optional carbon-copy recipients in RFC 2822 format
customFields object
Custom fields
Additional key-value pairs merged into the template context
customMessage string
Custom message
Optional message rendered into the template alongside execution details
embeddedImages Non-dynamicarray
Inline embedded images
Images loaded from storage and attached with inline disposition for HTML content
io.kestra.plugin.twilio.sendgrid.SendGridMailSend-Attachment
Attachment filename
Filename presented to recipients, e.g., 'report.pdf'
Attachment URI
URI in Kestra internal storage that supplies the file content
application/octet-streamAttachment content type
MIME type for the attachment; defaults to application/octet-stream
executionId string
{{ execution.id }}Execution ID
Defaults to the current execution ID using an expression
htmlContent string
HTML body
Optional HTML content. When both HTML and text are provided, email clients treat them as alternatives and typically favor HTML.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
subject string
Email subject
Optional subject line rendered from flow variables
templateRenderMap object
Map of variables to use for the message template
textContent string
Plain text body
Optional text content. When both HTML and text are provided, clients choose based on capability.
Outputs
body string
Response body returned by the SendGrid API
headers object
Response headers returned by the SendGrid API
statusCode integer
0HTTP status code returned by the SendGrid API