Skip to main content
Limited Release
Forms are in limited release and are not generally available. Contact your account manager to request access.

Run a Workflow When the Form Opens

A Pre-Submission Workflow with the Form load trigger runs once, as soon as a visitor opens the form, before they type anything. Use it to prepare a value the form needs, fetch context to show the visitor, or notify someone that a request has started.

A Form load workflow watches no fields, so it does not need any dependencies.


Overview​

This tutorial builds one form that does three things on load:

WorkflowTriggerResult
Create reference numberForm loadA unique reference shown to the visitor and stored with the submission.
Find last ticketField changeThe visitor's most recent ticket, looked up from a prefilled link.
Notify the teamForm loadAn email telling the team someone opened the form.

Build only the parts you need. Each workflow is independent.

Related pages:


Part 1: Generate a Reference Number​

Create the workflow​

Select the Pre-Submission Workflows tab, then select Add Workflow.

FieldValue
NameCreate reference number
Run this workflow onForm load

Select Add Action and add Generate a Random String.

SettingValue
Store the results in variablereference
Length8
Include numbersEnabled
Include uppercase lettersEnabled
Include lowercase lettersDisabled
Exclude ambiguous charactersEnabled

Select Save Workflow. The workflow now produces custom.reference.String.

Show it to the visitor​

Select the Input tab and add a field.

FieldValue
Namereference_number
LabelYour reference number
TypeString
Populate this field with a Pre-Submission Workflow outputChecked
Pre-Submission WorkflowCreate reference number
Propertycustom.reference.String

The visitor sees the reference as soon as the page finishes loading, and your actions read it as {{input.reference_number}}. Include it in the ticket title or the confirmation email so the visitor and the technician are talking about the same request.

A new reference on every visit

A Form load workflow runs each time someone opens the form, including a page refresh. Each visit produces a different reference number. The reference identifies the submission, not the person.


Part 2: Prefill the Visitor's Most Recent Ticket​

This part needs something to look the visitor up by, which means the workflow needs a field value.

A Form load workflow receives no field values

A Form load workflow watches no fields, so {{input.fieldName}} is empty inside it. To read a field, give the workflow the Field change trigger and watch that field. A watched field that already has a value when the page opens starts its workflow immediately, so the visitor still sees the result without typing anything.

Add the lookup field​

Select the Input tab and add a field.

FieldValue
Nameaccount_id
LabelAccount number
TypeString
RequiredChecked
Allow Query PopulationChecked

Send the visitor a link such as https://example.com/forms/abc123?account_id=12345. The field arrives prefilled. See Generate Public Form URL for building those links from another automation.

Create the workflow​

Select the Pre-Submission Workflows tab, then select Add Workflow.

FieldValue
NameFind last ticket
Run this workflow onField change
Recalculate when these fields changeaccount_id

Select Add Action and add API: Query for One Object.

SettingValue
Store the results in variablelastTicket
Autotask Entity Type to QueryTicket
Query conditionAccountID equals {{input.account_id}}
Sort ResultsCreateDate descending

Select Save Workflow.

Show the result​

Add a calculated field mapped to custom.lastTicket.Title from the Find last ticket workflow, labelled Your most recent ticket. The visitor can see whether their new request relates to it.

Because the link prefilled account_id, the lookup runs as the page opens. If the visitor edits the account number, the lookup runs again.


Part 3: Send a Notification on Open​

Select the Pre-Submission Workflows tab, then select Add Workflow.

FieldValue
NameNotify the team
Run this workflow onForm load

Select Add Action and add Send an Email with the recipients and message you want. Keep the message generic, because a Form load workflow cannot read the visitor's field values.

Form load runs on every visit

This workflow sends an email each time anyone opens the form, including refreshes and repeat visits. Use it for low-traffic internal forms only. For notifications that should correspond to a real request, put the email in the form's Actions tab, where it runs once per accepted submission.


Test It​

  1. Save the form and open its public URL.
  2. The reference number and the recent ticket title appear without any typing.
  3. Refresh the page. The reference number changes.
  4. Open the saved form and click View History. Set Submission to All, then open the attempt. Expand each Pre-Submission Workflow entry in Execution Logs to inspect its action steps.

Next Steps​

  • Combine a load workflow with a submission condition so the form only accepts submissions from visitors whose account lookup succeeded.
  • Use Generate Public Form URL in another automation to send each customer a personalized link.