I am using Power Automate to automate a few different actions. The trigger is an ArcGIS survey 123 submission. Each flow that I have created should create a report from a survey, save the report to OneDrive, retrieve the report, send the report as an attachment in an email, and finally attach the attachment to a feature layer. I am trying to attach the attachment to a different feature layer than the original survey layer. I can successfully attach things to this new layer, but it attaches to all of the result dots. I need it to attach to a specific result dot. The object that I want to attach to would have a different object ID than the object ID of the survey from which the report data is pulled. How do I get the object ID from a different survey response to be dynamic content on Power Automate? Is this possible?
I have attached one of my flows below.
The trick to automate this is that you are going to need a unique ID for the features between the feature layers or be able to query enough fields so that you get the only the relevant record to attach the attachment to.
I would look at the "Get data from feature layer" action and using it on your survey layer to set a variable. Then you would use "Get data from feature layer" again, but this time on the layer you are trying to upload the attachment to Set up a query or comparison in the get data from feature layer action to find the right record and then use it output the Object ID as a variable that you can then call in the "Add attachment" action.