xiao8579 / QuickCapture-Testing

Repo for feedback and issues during QuickCapture testing events.
0 stars 0 forks source link

[Exercise] Task automation with custom webhook #11

Open xiao8579 opened 4 years ago

xiao8579 commented 4 years ago

Description

Starting with ArcGIS QuickCapture 1.5, webhooks can be set up and activated when a record is submitted. For example, after successful submission of a record to the feature layer, the webhook could be called and trigger another action, such as sending a notification email, appending the survey content to a spreadsheet, and sending an alert.

Test Areas

Create a QuickCapture project

To add a webhook, you will need to create a project or have an existing QuickCapture project in your ArcGIS account.

Set up a custom webhook

Any application that is connected to the Internet and allows the sending of HTTP requests can send webhooks to Integromat. To connect such an app to Integromat, you can add a custom Webhook instant trigger module to your scenario, and manually specify the webhook URL that QuickCapture will send payload to.

  1. Sign up for a free account in Integromat https://www.integromat.com/en/login

  2. Sign in to Integromat with your account

  3. Click on Create a new scenario and click Continue to build a new scenario. image

  4. Click on the question mark, search and select Webhooks.

  5. Choose Custom webhook. image

  6. Add and enter a name for the webhook. Close the dialog and you will see the webhook URL is generated. image

  7. Click Run to keep this webhook listening for payload. At this point, Integromat does not know which app is going to consume this webhook, so you will need to add a webhook in QuickCapture designer manually. image

  8. Open a QuickCapture project. Click Settings -> Webhooks -> New webhook.

  9. Configure webhook properties. Copy and paste the webhook URL generated in Integromat to Webhook URL input box.

    • Name—The name of the webhook (unique within the project).
    • Target feature layer—Select a single feature layer. The payload will be sent to the configured webhook URL each time a record is submitted to this layer.
    • Webhook URL—Where the project information will be sent.
    • Event data—Choose what information will be included in the payload, including project details, information of the user, portal and submitted record, and response from the server.
    • Status—Turn the status button on or off determines whether this webhook will be enabled when the project is saved.
  10. Turn on the webhook status and save the project. image

  11. Download the project on your mobile app.

  12. Collect and Send the collected records.

  13. In Integromat, you will notice a payload has been received successfully. image

  14. Now that you have all the payload info, you can continue the workflow by add another module. 14. Search for and select Office 365 Email. Select the Create and send a message action. image

  15. Connect to your account, and specify the payload information to include in the email. image