Select to view content in your preferred language

Send an email when a record is changed in a hosted feature layer related table

234
4
10-16-2025 06:40 AM
RyanDruyor_CSP
New Contributor

I'm looking to send an email after a new record is added to a related table within a hosted feature layer. I followed the guidance seen in this post but I changed the trigger to be 'when a record is updated in a hosted feature layer'. Just want to be sure this is the correct trigger to use and it will report back any changes to the related table. 

RyanDruyor_CSP_0-1760621325982.png

My apply to each parameter is 'body'

The fetch update parameters are set to get changes from 'changesUrl' and Feature layer ID is 'Layerid'

The apply to each 2 is set to 'body/items'

I don't get any flow checker errors or work flow failed emails with this setup.  

 

0 Kudos
4 Replies
tschrage
Emerging Contributor

That will work great as long as your feature references the related table.  This is one I use that references a related table for repairs.

tschrage_0-1760703645179.png

 

0 Kudos
AkshayHarshe
Esri Regular Contributor

@RyanDruyor_CSP Does your flow get triggered when changes happen? 

If not I will recommend you to to troubleshoot using this: Guide: Troubleshooting ArcGIS and ArcGIS Enterpris... - Esri Community

Thanks,
Akshay Harshe
0 Kudos
RyanDruyor_CSP
New Contributor

When I converted the flow to "when a new record is created" and stripped the flow back down to just the trigger and send email, it did work. 

Currently the flow is breaking on the Fetch updates function due to a "sync replica internal error". When I checked the rest endpoint it said it didn't have any replicas. 

RyanDruyor_CSP_0-1761224963516.png

 

0 Kudos
AkshayHarshe
Esri Regular Contributor

Can you try grabbing the changes url coming from the Raw Inputs of the Fetch updates action. Decode it to readable format using online URL decoder. Grab a token from Generate Token endpoint and add it to the URL above using &token=<token> and try running in a browser window. Since you are using arcgis online you can also get this by intercepting any XHR request in your dev tools.

this should give you to the changes back in an URL and try opening it in the new tab which should give you the changes where you can see if the job status is and if it will give you back the JSON file with your changes.

If you see the same error then it is not an issue with the action itself.

Do you have Sync enabled on this feature layer? 

Thanks,
Akshay Harshe
0 Kudos