Skip to main content

Email Task

The Email task sends an email to a specified email address. The email can be sent to multiple recipients by separating the email addresses with a comma.

Input​

The input for the Email task is as follows:

  • to: The email address of the recipient.
  • toContactIds: The contact IDs of the recipients.
  • cc: The email address of the recipient to be copied.
  • ccContactIds: The contact IDs of the recipients to be copied.
  • bcc: The email address of the recipient to be blind copied.
  • bccContactIds: The contact IDs of the recipients to be blind copied.
  • subject: The subject of the email.
  • body: The body of the email.
  • attachments: The attachments to be sent with the email.

Attachment​

The attachments input is an array of attachments. Each attachment can be a URL to a file, a document ID, or a document workflow ID.

Attachment ID​

The attachmentId input is the ID of the attachment.

Order Document ID​

The orderDocumentId input is the ID of the order document.

Document Workflow ID​

The documentWorkflowId input is the ID of the document workflow. Workflow variables can be passed to the document workflow to get the attachment URL.

Output​

The output for the Email task is as follows:

  • emailSent: A boolean value indicating whether the email was sent successfully.

Example​

task: "Email/Send@1"
name: sendEmail
inputs:
to: [emailAddress] # Recipient email address
toContactIds: [contactId] # Recipient contact id
cc: [emailAddress] # Copied email address
ccContactIds: [contactId] # Copied contact id
bcc: [emailAddress] # Blind copied email address
bccContactIds: [contactId] # Blind copied contact id
subject: "Test Email" # Email subject
body:
html: >
<h1>Test Email</h1>
<p>This is a test email.</p>
text: >
This is a test email.
attachments:
- name: "attachment1.pdf" # Optional
attachmentId: 101 # Attachment ID
- name: "attachment2.pdf" # Optional
orderDocumentId: 102 # Order Document ID
- name: "attachment3.pdf" # Optional
documentWorkflowId: "4afb7c5f-9cf9-46a2-973f-2df763e935d1" # Document Workflow ID
documentWorkflowVariables:
contactId: 123
orderDocumentId: 1213
- name: "attachment4.txt" # Optional
content: "VGhpcyBpcyBhIHRlc3QgYXR0YWNobWVudA==" # Base64 encoded content
outputs:
- name: emailSent
mapping: "emailSent"