Skip to main content

Send Mail

In order to send an email, you have to provide your mail server credentials to the robot. To do this in a secure way, we created a vault system that works much like online password managers' security mechanisms. To learn more about Vaults please go to this guide.

  1. Create a new project from Flow Designer

  2. Follow the vault guide and create a new vault if you did not create a vault before.

  3. Open your vault ( in this example the previously created vault's name is Sample Vault )

Sample Vault

  1. Click "Create Item" and then "Email Account"

Create Vault Item

  1. Give a name to your Vault Item

Vault Item Naming

  1. Scroll down and fill out the SMTP credentials, then press SAVE.

SMTP Credentials

  1. After save, you will see the new vault item in your Vault

Vault Item

  1. Create the following flow by drag-and-dropping the nodes from the node palette, or by right clicking on the empty board. You can search the nodes by name.

Flow

  • Below is the list of nodes used in this flow:
  • Trigger -> Inject
  • Mail -> Send Mail
  • Flow -> Stop
  1. Now click the "Send Mail" node and change the node's properties as follows:

Properties

info

To keep this example simple, we used custom strings for the properties. These values can also be taken from the flow dynamically, either via message object or from variables.

  1. Credentials to be used for sending mail will be taken from the secure vault. Select the Vault and Vault Item for the "Send Mail" node.

Credentials

info

If you don't see the Vault or the Vault Item, please press the refresh icon.

  1. Run the flow
info

If your robot uses this Vault for the first time, it will ask the Vault Secret Key. For this please follow the guide at this page.

Gmail Usage

If you want to use a Gmail account for sending and receiving emails, you should use app password instead of your password ( you can edit vault items).

  1. Go to your Google Account.

  2. Go to Security > Signing in to Google > App Passwords.

  3. Select Mail and your device then click Generate.

App Password

  1. The App Password is the 16-character code in the yellow bar.