mirror of https://github.com/dapr/docs.git
2.1 KiB
2.1 KiB
| type | title | linkTitle | description |
|---|---|---|---|
| docs | Twilio SendGrid binding spec | Twilio SendGrid | Detailed documentation on the Twilio SendGrid binding component |
Setup Dapr component
apiVersion: dapr.io/v1alpha1
kind: Component
metadata:
name: sendgrid
namespace: default
spec:
type: bindings.twilio.sendgrid
version: v1
metadata:
- name: emailFrom
value: "testapp@dapr.io" # optional
- name: emailTo
value: "dave@dapr.io" # optional
- name: subject
value: "Hello!" # optional
- name: apiKey
value: "YOUR_API_KEY" # required, this is your SendGrid key
emailFromIf set this specifies the 'from' email address of the email message. Optional field, see below.emailToIf set this specifies the 'to' email address of the email message. Optional field, see below.emailCcIf set this specifies the 'cc' email address of the email message. Optional field, see below.emailBccIf set this specifies the 'bcc' email address of the email message. Optional field, see below.subjectIf set this specifies the subject of the email message. Optional field, see below.apiKeyis 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
{
"metadata": {
"emailTo": "changeme@example.net",
"subject": "An email from Dapr SendGrid binding"
},
"data": "<h1>Testing Dapr Bindings</h1>This is a test.<br>Bye!"
}
{{% alert title="Warning" color="warning" %}} The above example uses secrets as plain strings. It is recommended to use a secret store for the secrets as described [here]({{< ref component-secrets.md >}}). {{% /alert %}}
Output Binding Supported Operations
- create
Related links
- [Bindings building block]({{< ref bindings >}})
- [How-To: Trigger application with input binding]({{< ref howto-triggers.md >}})
- [How-To: Use bindings to interface with external resources]({{< ref howto-bindings.md >}})
- [Bindings API reference]({{< ref bindings_api.md >}})