Twilio SendGrid binding spec

Detailed documentation on the Twilio SendGrid binding component

Setup Dapr component

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: sendgrid
  5. namespace: default
  6. spec:
  7. type: bindings.twilio.sendgrid
  8. version: v1
  9. metadata:
  10. - name: emailFrom
  11. value: "testapp@dapr.io" # optional
  12. - name: emailTo
  13. value: "dave@dapr.io" # optional
  14. - name: subject
  15. value: "Hello!" # optional
  16. - name: apiKey
  17. value: "YOUR_API_KEY" # required, this is your SendGrid key
  • emailFrom If set this specifies the ‘from’ email address of the email message. Optional field, see below.
  • emailTo If set this specifies the ‘to’ email address of the email message. Optional field, see below.
  • emailCc If set this specifies the ‘cc’ email address of the email message. Optional field, see below.
  • emailBcc If set this specifies the ‘bcc’ email address of the email message. Optional field, see below.
  • subject If set this specifies the subject of the email message. Optional field, see below.
  • apiKey is your SendGrid API key, this should be considered a secret value. Required.

You can specify any of the optional metadata properties on the output binding request too (e.g. emailFrom, emailTo, subject, etc.)

Example request payload

  1. {
  2. "metadata": {
  3. "emailTo": "changeme@example.net",
  4. "subject": "An email from Dapr SendGrid binding"
  5. },
  6. "data": "<h1>Testing Dapr Bindings</h1>This is a test.<br>Bye!"
  7. }

Warning

The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described here.

Output Binding Supported Operations

  • create

Related links

Last modified February 16, 2021: Merge pull request #1235 from dapr/update-v0.11 (b4e9fbb)