Send emails using sendgrid from flow
Send email using sendgrid API
Parameters
options: Object
, Object containig the mail options (can also be added in the data object)
template
(String): The template name (required).to
(String): The receiver information (required).from
(String): The sender information (required).subject
(String): The email subject (optional).
data: Object
, Object containig the mail data
mergeVars
(Object): The object containing template substitutions (optional).
next: function
, The next function.
Example
{
"flow": {
"event": {
"d": [
...
[":flow_sendgrid/send", {
"template": "someTemplateId",
"to": "[email protected]",
"from": "[email protected]",
"subject": "someEmailSubject"
}],
...
]
}
}
}
options
can also be added to the data object
Data object example
{
template: "someTemplateId",
to: "[email protected]",
from: "[email protected]",
subject: "someEmailSubject"
mergeVars: {
"someVar": "someValue"
}
}