I am very new to power Automate but this is what I'm trying to do:
I have a layer in AGOL. When one specific field is updated in that layer to be one specific value (it has a domain) I want power automate to send emails out to several specific people notifying them of the change including other attribute data to specify what changed. If possible, I'd like it to first check another field and then change who is getting the emails based on that field, but if I can figure out the first part for now, I'll be happy.
I have gotten as far as getting Power automate to send me an email when a layer is updated, but I don't know how to filter it by what attribute is updated, and I don't know how to make the email include attribute data as well. It looks like there should be a way to call specific attributes but all the guides I'm seeing seem to skim over that part. Is there something I'm missing?
Thanks for any help you can provide!
Hey @GBPTechForester
What you'll need to do is when there is a layer change, the trigger should have the layer data within, to test this, you can put the updated data within a Compose block, and see what it's outputting. From there, you can select which information to send over in terms of an email. For example, in this link, the outputs are all able to be used as variables: https://community.esri.com/t5/arcgis-connectors-for-power-automate-questions/get-data-from-feature-l...
Cody
You first set your trigger to when a record is updated in a feature layer. Next use an action to "Get data from feature layer." Within that action you can filter out only the data you want to see by using the Search Parameter, comparison type, and available fields..... or by using a complex expression in the "Where" option.
Below is just a couple examples of some of the things I've done.
Or
Edit:
If you need additional information from other feature entries that get filtered out when using this method, you can use the "Filter Array" action and build your query that way instead.
@GBPTechForester I think above comments are great and you should start there. Just letting you know that. Our latest release is now rolled out by MS so `Get Data from Feature layer` action can now do whole lot more. Also, you Can now restrict the the Fetch action by `Esri Geometry` to get information only from the geometry of interest.
For example in the screenshot below I am listening to a record is updated in the feature layer (stream quality) --> Getting the watersheds that I am responsible for --> Restricting the Fetch action by the watershed geometry. So it will only run the next actions when the changes are inside the watersheds.