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.

InputDefaultDescription
email_toRequiredN/AThe destination email address.
email_fromOptional[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_subjectOptional"Message from GoFormz Integration Hub"The email's subject line.
email_bodyOptional"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_messageOptionalJSON 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.

InputDefaultDescription
fileUrl#RequiredThe URL of the file to be attached to the email.
fileName#RequiredThe 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#Optionalapplication/pdfThe HTTP content type of the attached file.
fileExtension#Optional.pdfThe 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.

InputDescriptionExample: Gmail
smtp_hostThe SMTP host server domain.smtp.gmail.com
smtp_portThe SMTP port.587
smtp_usernameThe username for logging into your smtp_host. This is often just your email address.Your Gmail email address, e.g. [email protected]
smtp_passwordThe password associated with the smtp_username.Your Gmail password.
smtp_enablessltrue 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.

1029

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.