@SeanKMcGinnis I’ve performed some simplistic testing and can see the following behavior:
If I set the flow up as shown below it works as intended and only sends an email when new records are created in the feature service.
- When a new record is created
- Apply to each
The issue with this is that we have no access to the attributes of the new feature/dynamic content.
However, if we set the flow up as shown below now it does provide access to the attributes of the new feature/dynamic content but does not work as intended. Instead it sends emails for both new records and edits to existing record:
- When a new record is created
- Apply to each
- Fetch updates, changes or deletions
- Apply to each 2
- Send an email
Note that there as 2 payloads under ‘Apply to each 2’. Here's the RAW JSON:
FETCH ACTIONS RAW INPUTS:
{
"host": {
"connectionReferenceName": "shared_arcgis",
"operationId": "WebhookGet"
},
"parameters": {
"changesUrl": "https%3a%2f%2fservices.arcgis.com%xxxxxxxxxxxxxxxxxx%2farcgis%2frest%2fservices%2fMSFLOWTESTING%2fFeatureServer%2fextractChanges%3fserverGens%3d%5b829542%2c829547%5d%26async%3dtrue%26returnUpdates%3dfalse%26returnDeletes%3dfalse%26returnAttachments%3dfalse",
"userLayer": "xxxxxxxxxxxxxxxxxxxxxxxxxlayerId0",
"layerId": 0
}
}
FETCH ACTIONS RAW OUTPUTS:
{
"statusCode": 200,
"headers": {
"Timing-Allow-Origin": "*",
"x-ms-apihub-cached-response": "false",
"x-ms-apihub-obo": "false",
"Date": "Wed, 04 Jan 2023 19:35:22 GMT",
"ETag": "W/\"2d5-dilcTtnGDqgzN3ciuDdCj1NYU7E\"",
"X-Powered-By": "Express",
"Content-Length": "725",
"Content-Type": "application/json; charset=utf-8"
},
"body": {
"items": [
{
"geometry": {
"x": -8597754.054998333,
"y": 4702694.790991535
},
"attributes": {
"OBJECTID": 6,
"GlobalID": "ED502BB3-4B0D-4F68-A44B-0C8FD6AB7261",
"Name": "I am the 6th point",
"Category": 1,
"Location": null,
"Date": null,
"Comments": "this is #6",
"CreationDate": 1672860824841,
"Creator": "ahargreaves_FW",
"EditDate": 1672860837702,
"Editor": "ahargreaves_FW"
}
},
{
"geometry": {
"x": -8597909.317712057,
"y": 4702799.891905442
},
"attributes": {
"OBJECTID": 5,
"GlobalID": "302643AB-8565-4629-9ED1-334812D2EE4F",
"Name": "I AM THE 5TH POINT",
"Category": 5,
"Location": null,
"Date": null,
"Comments": "I have edited #5",
"CreationDate": 1672860134937,
"Creator": "ahargreaves_FW",
"EditDate": 1672860702557,
"Editor": "ahargreaves_FW"
}
}
],
"deleteIds": [],
"attachments": []
}
}
Note that there are 2 items returned by the fetch action but no way to discern that only ‘point 6’ was the newly created record. ‘Point 5’ already existed and was merely edited.
Therefore, @SeanKMcGinnis how do I set up a flow to only send an email when a new feature is created that also provides access to attributes/dynamic content?
(For clarity I'm linking to related cross-postings here)