Select to view content in your preferred language

Trigger Slack notification when 'Submission Status' count in a Survey123 form is less than 30

489
4
Jump to solution
08-05-2024 05:54 AM
AryamanBhattacharya_BeansAI
Occasional Contributor

Hello ESRI Community,

I am trying to build a Make (formerly Integromat) scenario to watch a Survey123 and  trigger a notification status count is less than a fixed number. 

To elaborate, our Survey has a 'Status' question/field with a list of choices (domains) assigned to it, one of them being 'Work in progress'. Now, we want that a notification is triggered only when the count for 'Work in progress' is less than 10, lets say. 

Suggestions or guidance on how to achieve this will be helpful. 

 

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
jcarlson
MVP Esteemed Contributor

All right, so what I would do in a situation like this is to take the survey webhook in Make and use its token to query the feature service.

Screenshot_20240805_084834.png

The other fields in your POST would be:

  • query, with a value of status='work in progress' (but make sure to match the domain code, not the description)
  • returnCountOnly with a value of true
  • f with a value of json

Then have your flow parse the JSON of the response, find the count value in the JSON, and then set up a filter on the rest of your flow based on that value.

- Josh Carlson
Kendall County GIS

View solution in original post

4 Replies
jcarlson
MVP Esteemed Contributor

Are you looking to sum values across multiple surveys, then? Or would your users be answering "work in progress" to 10 different questions in the same survey?

- Josh Carlson
Kendall County GIS
0 Kudos
AryamanBhattacharya_BeansAI
Occasional Contributor

Thank you for responding @jcarlson

I'm looking to sum values across multiple surveys. Example screen shot : 

AryamanBhattacharya_BeansAI_0-1722864147345.png

 

0 Kudos
jcarlson
MVP Esteemed Contributor

All right, so what I would do in a situation like this is to take the survey webhook in Make and use its token to query the feature service.

Screenshot_20240805_084834.png

The other fields in your POST would be:

  • query, with a value of status='work in progress' (but make sure to match the domain code, not the description)
  • returnCountOnly with a value of true
  • f with a value of json

Then have your flow parse the JSON of the response, find the count value in the JSON, and then set up a filter on the rest of your flow based on that value.

- Josh Carlson
Kendall County GIS
AryamanBhattacharya_BeansAI
Occasional Contributor

Thank you for your suggestions @jcarlson ! Your suggestions helped us setup the desired Make scenario. Based on our chat internally, adding the JSON parser to the flow helped set up the alert based on count. 

Thanks again! 

0 Kudos