Action: Send Email
Send an email, optionally with attachments. The email can be sent using the GoFormz email server, or using a GoFormz SMTP client to connect to a third-party server.
Inputs
Since this action has so many inputs, we split them into three categories: common inputs, attachment inputs, and SMTP inputs.
Common Inputs
Note that while `email_to` is the only required input, you will typically want to specify `email_subject` and `email_body` as well.
Input | Default | Description | |
---|---|---|---|
email_to | Required | N/A | The destination email address. |
email_from | Optional | [email protected] | The source email address. This can be any email address in the goformz.com domain. If you wish to send from a different domain, you must specify the SMTP inputs (see below). |
email_subject | Optional | "Message from GoFormz Integration Hub" | The email's subject line. |
email_body | Optional | "This is a default body message for this email..." | The email body. No text formatting (e.g. newlines, bold text) is available at this time. |
email_message | Optional | JSON serialization of an EmailMessage object. |
Attachment Inputs
These inputs are for file attachments. The "#" at the end of each input name indicates that it must end with a number, starting with 1 — `fileUrl1` for your first attachment, `fileUrl2` for your second, etc. The `fileUrl#` and `fileName#` inputs are required for an attachment to be successful, while the other two inputs are optional.
Input | Default | Description | |
---|---|---|---|
fileUrl# | Required | The URL of the file to be attached to the email. | |
fileName# | Required | The desired name of the file to be attached to the email. Note that this is just the name, do not include the extension here. | |
fileContentType# | Optional | application/pdf | The HTTP content type of the attached file. |
fileExtension# | Optional | The desired file extension of the attached file. |
SMTP Inputs
These inputs configure the GoFormz SMTP client to connect to a third-party SMTP server. This is only necessary if you want to send your email from a non-GoFormz domain — i.e. if your `email_from` input ends in anything other than `goformz.com`. This includes sending emails from popular email providers like Google, Hotmail and Yahoo, as well as your company's internal email servers. Please refer to the SMTP server's documentation to find the correct values for these inputs. In the table below, we include an example with the appropriate input values for Gmail.
Input | Description | Example: Gmail |
---|---|---|
smtp_host | The SMTP host server domain. | smtp.gmail.com |
smtp_port | The SMTP port. | 587 |
smtp_username | The username for logging into your smtp_host . This is often just your email address. | Your Gmail email address, e.g. [email protected] |
smtp_password | The password associated with the smtp_username . | Your Gmail password. |
smtp_enablessl | true if you wish your email to be sent securely, false otherwise. Most modern email servers require this to be true . Note that this input is not SSL-specific — depending on the service you use, different security protocols may be used (e.g. TLS). | true |
Outputs
None
Usage
Emails sent from the GoFormz server are typically used as notifications to a stakeholder (e.g. employee, partner or customer) that an action has taken place. For instance, you may want to email an employee that they received a form assignment, or email a customer that their work order form has been completed.
In the example above, we email a customer using the email address they entered in the completed form. The email subject line and body text are customized based on the contact name and date in the form. Finally, we generate a PDF from the completed form and include it as an attachment to the email. The PDF name — #{trigger.[Customer Name]} Work Order #{trigger.[Date]}
— is customized based on the customer name and date found in the completed form.
Updated over 6 years ago