xiao8579 / QuickCapture-Testing

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

[Exercise] Webhook: capture a photo and send it as an email attachment #47

Open xiao8579 opened 3 years ago

xiao8579 commented 3 years ago

Description

In this exercise, we are going to build a webhook scenario that enables capturing a photo record and sending it as an email attachment.

Steps

Build a QuickCapture project

  1. Sign in to QuickCapture designer https://www.arcgis.com/apps/quickcapture
  2. New project from existing (point) feature service. From the Online item, make sure the point layer has attachment enabled. image
  3. In the QuickCapture project, configure a button to capture photo.
  4. Click on the button, on tab DATA > Captured mode: Single point > Enable Take photo. You can set take photo as required or optional based on your workflow. image
  5. Save the project.

Set up a webhook for the QuickCapture project

  1. Sign up for a free account in Integromat, if you already have an account, sign in to Integromat https://www.integromat.com/en/login
  2. Create a new scenario after you signed in. image
  3. Search and select QuickCapture module and click Continue. image
  4. Click on QuickCapture module and select the Watch Project action. This action is triggered each time a data record is submitted from the linked QuickCapture project. Animation
  5. Click Add to link your ArcGIS online account, name your webhook, specify an existing QuickCapture project, as well as the feature layer that is going to integrate with this webhook.
  6. When you are done, click Save to generate and save the webhook connection. Now a webhook URL that's designated for the specified QuickCapture project is generated. Click OK to confirm and close the dialog.
  7. Add another module to continue. Search and select the HTTP module. Select Get a file action. This module/action helps to grab the photo file sent to ArcGIS and pass it to the Email module later on. Animation
  8. Click on the URL input, select Photo URL from the QuickCapture payload. image
  9. Click OK to save the information.
  10. Add another module called Microsoft Outlook module > Create and send an email. Animation
  11. Connect to your email account, and specify fill out the information for the dialog. Click OK to save the information. image
  12. In the Attachments on the dialog, click Add items and select HTTP - Get a file as the source file, and click Add to confirm. image
  13. Click OK to save and close the Email module.
  14. Run your scenario and test from the QuickCapture by sending a record. image
  15. When you're happy with the testing results, in Intergromat scenario settings, you can keep the webhook scenario running/active or schedule when or how often the scenario stays active.

Collect and send records from the QuickCapture app

  1. Save and download the QuickCapture project (with webhook configuration) to your mobile device.
  2. If you already download the QuickCapture, you should see an update message on the project card. Go ahead and update the project.
  3. Capture a photo and Send the collected record.
  4. Check your email inbox and see if submission triggers a new message with an attachment successfully.