Notifications
Sending email messages from the Stubber platform.
Stubber makes it trivial to send emails to users or systems from the platform. Simply add an email notification with the desired parameters to an action and the email will be sent to the recipient. Conditions can be used to control when the email is sent.
By default, the email will be sent from an email address associated with the stub where the action ran (eg. 2024-11-11-ABCD@stubber.email
),
however, it is possible to configure custom mailboxes, such as orders@my_org.stubber.emails
or support@my_org.stubber.emails
.
A custom email layout can also be created on Stubber Editor to send emails with a custom design. The custom layout can be selected in the relevant parameter.
Setup
- no setup required
Create send action
- Setup a notification in an action as seen below
Parameters
required string
subject The subject of the email.
required string
message The body of the email.
optional object
custom_email_settings This parameter is used to specify custom email settings such as the reply_to
address, the format
settings, and the org_mailbox
settings to use.
Show child attributes
optional object
reply_to Override the default reply-to address for the email.
optional object
format Parameters related to the formatting of the email, such as the email layout to use. See Create Email Layout for more information.
Show child attributes
optional string
layoutuuid The globally unique identifier of the email layout to use.
optional object
mailbox Parameters related to the mailbox to use. See Create Email Mailbox for more information.
Show child attributes
optional string
mailboxuuid The globally unique identifier of the mailbox to use.
optional boolean
enable_lids This parameter can be set to true
to enable the lids feature for the outgoing email message.
optional array
attachments An array of objects containing file meta data. This should include fileuuid
as a minimum.
Show child attributes
required string
fileuuid The globally unique identifier of the file in the Stubber platform.
required string
filename A descriptive name for the file
Example
See Attachments for related info
Result
Examples
In all these examples, standard substitution techniques to pull in values from stub
or stubpost
data can be deployed.
Attach Single File (full JSON Structure)
When attaching a file building out the full JSON Structure:
Attaching using File structure
When attaching a file / files using the existing files JSON structure from stub.data
Consider data structure of a file field in the stub.
You can attach the file as follows:
This works as the substitution brings in the entire array
at the path of ~~stub.data.files
resulting in the same JSON structure.
If the ~~stub.data.files
array contains multiple object referring to multiple files, each file will be attached.
Custom reply to address
Send emails with a different reply address than the sending address
In the notification library add Email with custom reply to address
The reply email is specified in email_out_contactuuid.platforms.email.custom_email_settings.reply_to