Skip to main content

Send email

Ability to send an email to an specific email or user.

PropertyTypeDefault ValueOptionsDescription
toEmailstring(empty)N/AA static email receiver.
toNamestring(empty)N/AA static name receiver.
toUserstring(empty)N/AA dynamic user to receive the email.
fromNamestring(empty)N/AA static email sender.
fromEmailstring(empty)N/AA static name sender.
fromUserstring(empty)N/AA dynamic user who is the sender of the email.
replyToNamestringFrom name.N/AThe name of the one to receive any replies (static field).
replyToEmailstringFrom email.N/AThe email of the one to receive any replies (static field).
subjectLinestring(empty)N/ASubject line just like in a regular email.
previewTextstring(empty)N/AA short recap of what the email is about.
templateTitlestring(empty)N/AIf using template, this is the title inside the email body.
templateBodystring(empty)N/AIf using template, this is the text inside the email body.
templateHasButtonboolfalsetrue or falseIf using template, this decides if a button should be shown.
templateButtonTextstring(empty)N/AIf using templates that has a button, this is the text of the button.
templateButtonUrlstring(empty)N/AIf using templates that has a button, this is the url of the button.
documentKeyNamestring(empty)N/AIf using documents (and not template), this is the keyname of the document.

Examples

Example 1: Send email to a static email

{
"toEmail": "info@flowagent.nu",
"toName": "FlowAgent",
"fromName": "FlowAgent",
"fromEmail": "contact@flowagent.nu",
"subjectLine": "This is my subject line",
"previewText": "This is my preview text",
"templateTitle": "This is my body title",
"templateBody": "Hello world, this is my body!",
"templateHasButton": true,
"templateButtonText": "Hi, click me!",
"templateButtonUrl": "https://flowagent.nu/"
}

Example 2: Send email to a dynamic user

{
"toUser": "[user]",
"fromUser": "[user]",
"replyToName": "FlowAgent",
"replyToEmail": "contact@flowagent.nu",
"subjectLine": "This is my subject line",
"previewText": "This is my preview text",
"templateTitle": "This is my body title",
"templateBody": "Hello world, this is my body!",
"templateHasButton": true,
"templateButtonText": "Hi, click me!",
"templateButtonUrl": "https://flowagent.nu/"
}

Example 3: Send email using a document

{
"documentKeyName": "mltiderdoc_dette-er-min-document-email",
"toName": "[user.name]",
"toEmail": "[user.email]"
}