pjdohertygis / SARCOP

This is a GitHub page for recording and resolving issues related to SARCOP.
https://nsargc.napsgfoundation.org/
GNU General Public License v3.0
10 stars 0 forks source link

QuickCapture and Survey123 Web Hooks for notifications #110

Closed pjdohertygis closed 9 months ago

pjdohertygis commented 3 years ago

We are doing some R&D on the use of Web Hooks for notifications.

Real-world Problem: The ICP/BoB wants to know if anything in the field needs follow-up as soon as possible. Technical Solution: If a field user marks something as "Needs Follow-up", ideally this sends a notification.

Ideally FEMA would be able to use ArcGIS Survey123 & QuickCapture - MS Power Automate - MS Teams & Outlook. Not all US&R Teams are on MS Teams yet and FEMA US&R does not have access to MS Power Automate (yet) but this is worth prototyping.

For now, we can test a few other use web hooks.

ArcGIS - Power Automate - Slack (NAPSG SARWG) ArcGIS - Power Automate - Teams (NAPSG Guest) ArcGIS - Power Automate - E-Mail (probably don't want to spam anyone's personal inbox) ArcGIS - Power Automate - Telegram https://www.linkedin.com/pulse/custom-ms-flow-connector-telegram-example-elizabeth-akinfieva/ ArcGIS - Power Automate - Text? (I might be able to work with CATF6 on a proof of concept, via MyDB Solutions)

Let's use this thread for documentation, R&D so we can set this up once the systems are ready.

Web-hooks Documentation Survey123 https://doc.arcgis.com/en/survey123/browser/create-surveys/webhooks.htm QuickCapture https://doc.arcgis.com/en/quickcapture/help/editproject.htm#ESRI_SECTION1_F58D640588814E2CB3069B77A1CC2899 ArcGIS REST API https://developers.arcgis.com/rest/services-reference/web-hooks-feature-service-.htm

afackler commented 3 years ago

Doing some initial testing, Power Automate works fine for Survey123 to slack and teams. However, Power Automate does not have an out-of-the-box QuickCapture trigger as it does for Surey123. The QC documentation suggests using a program called Integromat which I have had success creating a QC trigger (and filter to only show specific records). Email triggers work fine and can be set up the same way as you would set up a message to Slack of Teams. Up next is testing an E-mail and text functions in Power Automate and taking a look at the REST API.

afackler commented 3 years ago

Looks like Power Automate will work with Quick capture. If you make a webhook for Survey123, you can go to the backend and copy the payload URL from the Webhook and paste it into the Webhook URL in Quick capture. Copy link here: image Paste Here: image

t-mahon commented 3 years ago

That's a nice find with QuickCapture webhook.

Just a note for how we're using the webhooks for the SOCTF and FDNY IMT. Using Power Automate we're feeding spreadsheets so our PLANS or Sit Unit Personnel don't need to export from AGOL. They have all the data collected in a more familiar format and they just filter by what they need. With a little formatting we're hoping to evolve this to mostly automated 209 Report.

pjdohertygis commented 2 years ago

We have now implemented this with Survey123. We still need to test with QuickCapture.

We are also interested investigating web hooks directly on the REST service.

Also, if Task Forces are using Telegram, then perhaps we need to explore that option next.

pjdohertygis commented 2 years ago

@afackler It looks like we might be able to use the Custom MS Flow Connector send messages to Telegram https://www.linkedin.com/pulse/custom-ms-flow-connector-telegram-example-elizabeth-akinfieva/

We'd need a solid strategy for this - like "When a Survey123 / QuickCapture comes in that is both Needs Follow-up and Critical to Life Safety - send a message to Telegram with a link to open the waypoint on a map". Does anyone else have any thoughts?