This article will review creating an Email Form Workflow and customizing an email using variables.

Create an Email Form Workflow

Automatically email a PDF version of your completed Form with Workflows.

Follow the steps below to set up your Workflow in the Workflows tab of the GoFormz web app.

  1. Click Create.
    You will navigate to the Workflow Recipes Library.

  2. Select the Email Completed Form recipe.
    You will navigate to the Workflow Recipe Builder.

  3. Click the pencil icon next to the default Workflow name.
    Assign a Workflow name.

    Screenshot displaying the location of the default Workflow name in the Workflow Recipe Builder of the GoFormz web app.



    Note: GoFormz recommends that you include the Template name used in the Workflow in your Workflow name.

  4. Setup your trigger by assigning your Completed By, Template, and Form completion options.

    1. Select the appropriate user-based trigger using the Completed By drop-down menu.

      Your Completed By selection indicates the user or users for whom you want this action to apply. Options include Anyone, Specific User, or Group.

    2. Select the appropriate Template from the Template drop-down menu.

    3. Check the box next to Only run after initial form completion if you want this Workflow to trigger only for the first time a Form is completed.


    Click Next.

  5. Assign your Export Form to PDF settings by selecting the pages to be exported, and naming your PDF.

    1. Select the Form pages you want exported to PDF.

      Note: If you want to export all Form pages, leave this field blank.

      Screenshot displaying the Workflow Builder trigger set up page in the GoFormz web app.


    2. Click Advanced. Here you will assign your PDF a name in Filename.

      Note: If you choose not to name your PDF, your PDF will adopt the name of the corresponding completed Form.

      Click Next.

  6. Provide the details for your Send Email action. These details include To, Subject, Body, and Attachments.

    Note: Use Workflow Variables to reference Form and metadata options in your action.

    1. To is where you provide the email address(es) of your intended recipients. Separate multiple email addresses using commas.

    2. Indicate the email subject in the Subject field.

      Note: If you leave this field blank, your subject line defaults to "Message from GoFormz".

    3. Manage the message of your email in Body.

      Toggle between Editor and Preview modes to view and apply changes.

    4. The Attachments field determines the PDF that is emailed and output in the Export Form to PDF step.

      Note: Do not change the Attachments field.

    5. Modify your From Display Name and Reply To Email can be set in the Advanced settings.


      Screenshot displaying the Send Email action setup in the Workflow Builder of the GoFormz web app.


  7. Click the Activation slider if you want your Workflow active immediately.
    The Workflow Activation status will display as Active or Inactive.

  8. Click Save.

Customize an email using Variables

Note: This article is about variables used in the Email Form Recipe. For more details regarding variables used in workflows, see here.

You can customize your Email using Variables. These can be used in the send addresses, subject of the email, and body of the email.

There are two types of variables you can reference in your Send Email step: metadata variables and form field variables.

Formatting for Using Variables

The required format for the referenced variables is as follows

#{trigger.VARIABLE_NAME}

where:

  • TRIGGER is the stage where the output is being pulled from in our Email Form Recipe.

  • VARIABLE_NAME is a variable that’s being referenced.

Metadata Variables

Form metadata variables provide information about the form itself, rather than the values of any specific fields within the form. The following metadata variables are supported in recipe workflows:

  • formName: The form name. Note that this is the name of the form rather than the template.

  • formId: The unique 32-digit hexadecimal identifier associated with the form.

  • formTemplateId: The unique 32-digit hexadecimal identifier associated with the form template.

  • formStatus: The form’s status; this can be one of the following values: “complete” or “draft”.

  • formChangeDate: The timestamp when the form's status last changed, in the following format: MM/DD/YYYY hhmmss. This includes form completions and form transfers.

  • formLastUpdateDate: The timestamp when the form was last updated (e.g. saved), in the following format: MM/DD/YYYY hhmmss.

In the example below we are referencing the metadata variables Form Name, Form ID, and Form Status. We have used the required formatting for referencing variables.

  • Subject: Form Name: #{trigger.formName}

  • Body

    • Form Name:#{trigger.formName}

    • Form ID: #{trigger.formId}

    • Form Status: #{trigger.formStatus}

Field Variables

Field variables represent the value contained in a form field. You can find your form’s field names by opening your form template in the Template Editor and looking at the “Name” property in the Field Properties pane.

In the example below we are referencing the field variables Email, Customer, Sales Rep. We have used the required formatting for referencing variables.

  • To: #{trigger.Email}

  • Body

    • Customer Name: #{trigger.Customer}

    • Sales Rep: #{trigger.Sales Rep}

For a more detailed review, watch the video below.

Did this answer your question?