Run Workflows from Survey123

Survey123 can run and pass inputs to server workflows from a survey. For more information about inputs, see Workflow Inputs.

Server workflows require on-premises Workflow. Cloud Workflow will not run server workflows.

To configure a Survey123 survey to run a workflow, you must create a workflow that can receive webhook requests. Next, you must add a webhook to the survey settings and configure it to point to the workflow.

Configure Survey123 to Run a Workflow

This procedure assumes that you already have an account with Survey123.

Configure a workflow to receive webhook requests

If you do not have a workflow configured to receive webhook requests, you can use a workflow template to get started.

  1. Open Geocortex Workflow.

  2. Click File | New.

  3. Select the Receive Webhook Request workflow from the list of suggestions.

  4. Click Create.

  5. Modify the workflow for your own environment and save your changes.

To configure a Survey123 survey to run a workflow:

  1. Sign in to Survey123.

  2. Edit the survey Settings.

  3. From the menu on the left side of the window, select Webhooks.

  4. Click Add webhook.

  5. Set the Name of the Webhook to a name of your choice, for example: Run workflow on submit.

  6. In the Payload URL property, use the example below as an guide for your entry.

    https://<server>/geocortex/workflow/service/webhook/survey123/<workflow-id>?<query-string>

    In the example, <server> is the machine where Geocortex Workflow is installed, and<workflow-id> is the id of the server workflow. <query-string> is optional and can be used to provide any additional inputs to the server workflow.

    Query string inputs must use the following format: a=1&b=2 etc.

    Content of the record is sent automatically, regardless of a query string being specified.

  7. Set the type of Trigger event you wish to use.

    You must select at least one type of event.

  8. Select the types of Event data you wish to be sent to your server workflow.

    If your workflow is secured, you must:
    • Enable Portal info
    • Share your workflow with the end users of the Survey123 app
  9. Set Status to On if you want the webhook to be active immediately. Set the Status to Off to set the webhook to be inactive.

  10. Confirm your changes and click Save.