Survey 123 Webhook to Moderate Content?

2804
21
04-02-2019 12:14 PM
CharlesBailey3
Occasional Contributor II

Is there any way to use MS Flow to start an approval process that pushes a public facing survey response to a private feature service until the content has been approved? Trying to figure out how to screen crowd source images and text before posting to the public facing service. Possible? Thanks, cob

Tags (2)
0 Kudos
21 Replies
JamesTedrick
Esri Esteemed Contributor

Hi Charles,

In the request, you're missing both the f (json) and token parameters (queries).  What is the message returned from the request?  

0 Kudos
ILoveMap
New Contributor III

Hi James,

Have you made a document pertaining to this process?

I'm also very interested in implementing this workflow.

0 Kudos
ILoveMap
New Contributor III

Hi Charles,

Did you ever get this workflow to work? I am also confused about the HTTP Request component. 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

Please review Update Features—ArcGIS REST API: Services Directory | ArcGIS for Developers  - I mentioned specifically that the request shown in the screenshot was missing some required parameters:

f=json - the format you want to receive the response in

token=<TOKEN> - the token that allows the request to access secured services.

0 Kudos
ILoveMap
New Contributor III

Hi James,

I'm trying to execute the following workflow described by Tom Thompson here (and very similar to what OP described)

Webhooks, Microsoft Flow and the ArcGIS Rest API – Automating Your Web GIS 

However, I keep getting the following error when performing a GET request query operation. I was hoping you could help.

{"error":{"code":400,"message":"Cannot perform query. Invalid query parameters.","details":["Unable to perform query. Please check your parameters.","No where clause specified."]}}

0 Kudos
JamesTedrick
Esri Esteemed Contributor

It appears you're prematurely percent-encoding the '=' to %3D - Power Automate will take care of that for you

0 Kudos
ILoveMap
New Contributor III

I removed the percent-encoding but the same error is persisting.... the status code in power automate is 200 when it runs but the error code can be found in the body of the http query operation. Any help would be appreciated!

 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

I would also remove all of the parameters from the URL, placing them in the queries section - if Powerr Automate isn't autofilling the URI based on the queries, you are sending the 2 f and token parameters.

0 Kudos
ILoveMap
New Contributor III

Hi James,

Thanks for the response. I removed the URL parameters but it still returns the same error code 400. The URI shown in the screenshot  is copied below as well, I believe the percent encoding may be necessary but I'm not sure.

https://services1.arcgis.com/FNjlrOFR0aGJ71Tg/arcgis/rest/services/service_2467f8239e464e73a5fac7d2e1d0b4cf/FeatureServer/0/query?where=Site_ID+@{triggerBody()?['feature']?['attributes']?['Site_ID']}

 

0 Kudos
JamesTedrick
Esri Esteemed Contributor

Hi Chris,

Again, could you move all of the parameters (including where) to the queries (and remove the ? as well)?

0 Kudos