I'm trying to set up a webhook in ArcGIS Online that will send an email when a feature has been created in a hosted feature service. I do not have portal/enterprise, so the only example that I have found is setting the webhook up with Integromat. We have o365 and I would like to use Power Automate (MS Flow) to send the email. I've been trying to follow the MS Flow steps in this example, but without success. I copied and pasted this sample into my JSON payload:
{ "layerId":0, "serviceName": "myService", "changeType": "FeaturesUpdated", "orgId": "myorgId" "changesUrl": "https://olserver/services/myService/FeatureService/extractChanges?serverGens=[1122, 1124]" }
Which creates the following in 'When a HTTP request is received' (code view):
{
"kind": "Http",
"inputs": {
"schema": {
"type": "object",
"properties": {
"layerId": {
"type": "integer"
},
"serviceName": {
"type": "string"
},
"changeType": {
"type": "string"
},
"orgId": {
"type": "string"
},
"changesUrl": {
"type": "string"
}
}
}
}
}
I then have the next step to send an email to my email account.
I added the hookurl to my webhook with "ChangeTypes" = FeaturesCreated. The webhook created successfully, but no email is sent when the hosted feature layer has a feature added to it.
If you have done something similar to this workflow, any guidance would be much appreciated!!
Mostly experienced with Survey123 and Power Automate. You said the email never gets sent, but does the actual flow get called? If so can you show the error being produced on the trigger event?
I get zero runs logged and zero errors. I've added three features to the hosted feature service as a test. I've tried hitting the test manually button in Power Automate and it just spins for a long time, no action. Without an error message, I don't know if I've not set up my webhook in the Rest Service incorrectly, or if I have not set up the "When an HTTP request is received" trigger in Power Automate correctly?
@Danielle_Journey Were you able to get this webhook on feature service to work with Power Automate?
@JulieK No I ended up using python scripts to generate the email notifications.
aah okay, it doesn't seem to work for me in Power automate.
Once I decided to go the python route with Windows Task Scheduler I was up and running and have had no issues. I can share my scripts if you're interested, just let me know.
Thanks so much @Danielle_Journey I got it to work finally 🙂
Hi Danielle, I am trying to do something similar and am not having any luck with Power Automate. Would you mind sharing your scripts? Thank you!
@JulieK - I would like to know how you went about getting this resolved through Power Automate. Do you mind sharing?
@Danielle_Journey - Do you mind sharing those Python scripts you mentioned? I am trying to determine which way is going to be better for me.