Skip to content

jillix/flow-sendgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flow-sendgrid

Send emails using sendgrid from flow

Docs


send(options, data, next)

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"
    }
}

About

Send emails using sendgrid from flow

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published