Summary
In ArcGIS Enterprise, Microsoft Power Automate can be used to automatically replicate edits made to a hosted Line feature layer including new records, and file attachments to a second hosted Line feature layer. This automation eliminates the need for manual duplication and ensures both layers remain in sync in real time.
Procedure
Pre-requisites:
- An externally accessible ArcGIS Enterprise environment
- Microsoft Power Automate with a premium license
Create an automated cloud flow using the ArcGIS Enterprise connector:
- Open Microsoft Power Automate and click My Flows.
- In the My flows page, click New flow. Under Build your own from blank, select Automated cloud flow.
- In the Build an automated cloud flow window specify the Flow name.
- In Build an automated cloud flow, under Choose your flow trigger, type ArcGIS Enterprise connector, and within that select the When a record is created in a feature layer action to add it to the flow.
Add a condition to the connector:
- Once added, click the When a record is created in a feature layer panel to open its pane.
- In the When a record is created in a feature layer pane, on the Parameters tab, under Feature layer, click the drop-down menu and select the primary layer in which the edits will be performed. In this example, line_1 is selected.

- Click New Step button to open the Add an action pane.
- In the Add an action pane, in the search bar, type ArcGIS Enterprise connector and select the action of Fetch updates, changes, or deletions from feature layer.
- Click the Fetch updates, changes, or deletions from feature layer pane, on the Parameters tab, configure the parameters:
- Under the Feature layer, select the same hosted layer as selected in Step 2 from the drop-down menu.
- In Get Changes from parameter, click on the dynamic content and select the Changes URL from the When a record is created in a feature layer trigger option.
- Under Advanced parameters, keep Features created, Features updated, Features deleted and Return attachments as True.

- Below Fetch updates, changes, or deletions from feature layer, click the next step button to open the action page and search for Initialize variable and add it to the flow. Click the Initialize variable action to open its Parameters tab and configure the below parameters:
- Under Name, add any unique name for the variable to initialize. In this example, testlineobjectid is added.
- Under Type, click on the drop-down menu and select Integer.

- Below Initialize variable panel, click the next step button to open the action page and search for Compose. In the Parameters tab, configure the below parameters:
- In the Inputs parameter, click on the Dynamic Content and select Geometry. available under Fetch updates, changes, or deletions from feature layer action.

- Below Compose, click the next step button to open the action page and search for Create a record in a feature layer and add it to the flow. In its Parameters tab, configure the below parameters:
- Under the Layers in parameter, My Content is automatically selected.
- Under Feature layer, click the drop-down menu and select the layer where you want to replicate the edits. In this example, line_2 is selected.
- In the Geometry, click on Dynamic Content and under Compose action, and select Outputs.
- In the Advanced properties, the “field name” of the layer 2 will be there, click on the Dynamic Content and search for the field name that has similar properties to this field from the original layer, i.e., layer 1. This will be available for selection under the Fetch updates, changes, or deletions from feature layer action. This is used to map the attribute values from the fields in layer 1 to layer 2.

- Below Create a record in a feature layer panel, click the next step button to open the action page and search for Compose. In the Parameters tab, configure the below parameters:
- In the Inputs parameter, click on the Dynamic Content and select Object ID. available under Create a record in a feature layer action. This Object ID details will be used to store the attachments in the layer 2.

- Below the Compose 1 panel, click the next step button to open the action page and search for Set variable. In the Parameters tab, configure the below parameters:
- In the Name parameter, click the drop-down menu and select the name you selected as a unique identifier in the Initialize variable panel. In this example, we selected testlineobjectid.
- In the Value parameter, click on the Dynamic Content and select the Outputs option available under the Compose 1 action.

- Below the Set variable panel, click the next step button to open the action page and search for “ArcGIS Enterprise connector” and select the Get attachment from URL action. In the Parameters tab, configure the below parameters
- In the Attachment Url parameter, click on the dynamic content and select the Attachment Url option available under the Under Fetch updates, changes, or deletions from feature layer action.

- Below the Get attachment from Url panel, click the next step button to open the action page and search for “ArcGIS Enterprise connector” and select the Add attachment action. In the Parameters tab, configure the below parameters:
- Under Layers in, My Content is automatically selected.
- Under Feature layer, click the drop-down menu and select the layer where you want to replicate the attachments. In this example, “line_2” is selected.
- In the Record ID parameter, from the dynamic content, select the testlineobjectid option available under the Set variable parameter.
- In the Attachment name, click on the Dynamic Content and select the Attachment name option available under the Fetch updates, changes, or deletions from feature layer action.
- In the File content, click on the Dynamic Content and select the Attachment content option available under the Get attachment from URL action.

- Save and run the flow to automate replication of the feature geometries, attributes and attachments from one hosted line layer to another hosted line layer.
