Configure layer in ArcGIS Enterprise to allow editing
To begin, you must enable the feature layer to allow editing. If the layer does not have these options enabled, the webhook and updates will not work.
- Log into your ArcGIS Enterprise portal
- Navigate to the location of your feature layer and select it
![AnthonyLatini_0-1695090413822.png AnthonyLatini_0-1695090413822.png](https://community.esri.com/t5/image/serverpage/image-id/81021i9B37243AFA202324/image-size/medium?v=v2&px=400)
- Select the layer that you want to enable editing on
![AnthonyLatini_1-1695090413830.png AnthonyLatini_1-1695090413830.png](https://community.esri.com/t5/image/serverpage/image-id/81022iE6C060D85E298C7A/image-size/medium?v=v2&px=400)
- Click Settings from the ribbon
![AnthonyLatini_2-1695090413843.png AnthonyLatini_2-1695090413843.png](https://community.esri.com/t5/image/serverpage/image-id/81023i652DA9B6B8B832CA/image-size/medium?v=v2&px=400)
- Scroll down to the Feature layer (hosted) section and enable the following options under Editing:
- Enable editing
- Keep track of changes to the data
- Under the What kind of editing is allowed section, enable the options applicable to your flow
- The settings will save automatically
![AnthonyLatini_3-1695090413873.png AnthonyLatini_3-1695090413873.png](https://community.esri.com/t5/image/serverpage/image-id/81025i176FD8BA9014551D/image-size/medium?v=v2&px=400)
Configure trigger (automated cloud flow) in Power Automate
Next, we need to configure the trigger in Power Automate to obtain the HTTP POST URL. In these steps, a flow will be configured to listen for changes to the feature layer.
- Create a new automated flow
- Name your flow and then select Skip
- The following trigger is not in the auto-generated list when creating a flow
- In the Flow editor, search for the following trigger and select it:
- When an HTTP request is received
![AnthonyLatini_4-1695090413923.png AnthonyLatini_4-1695090413923.png](https://community.esri.com/t5/image/serverpage/image-id/81024i16C7BE55C179347E/image-size/medium?v=v2&px=400)
- In the Request Body JSON Schema, paste the following JSON into the field:
{
"type": "object",
"properties": {
"serviceType": {
"type": "string"
},
"changesUrl": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
},
"folderName": {
"type": "string"
},
"serviceName": {
"type": "string"
},
"events": {
"type": "array",
"items": {
"type": "object",
"properties": {
"eventType": {
"type": "string"
},
"when": {
"type": "integer"
}
},
"required": [
"eventType",
"when"
]
}
}
}
}
- Add a new action and search for the ArcGIS Enterprise connector
- Under the list of actions, select Fetch updates, changes, or deletions from feature layer (Preview)
![AnthonyLatini_5-1695090413967.png AnthonyLatini_5-1695090413967.png](https://community.esri.com/t5/image/serverpage/image-id/81026i1E804B298E83A648/image-size/medium?v=v2&px=400)
- In the Get changes from field, select the chnagesUrl from the dynamic content list
![AnthonyLatini_6-1695090413996.png AnthonyLatini_6-1695090413996.png](https://community.esri.com/t5/image/serverpage/image-id/81029i0F9D4CA41A45054C/image-size/medium?v=v2&px=400)
- Select the layer that is needed for the webhook flow. This should be the same layer you edited in the first section of this walkthrough.
![AnthonyLatini_7-1695090414012.png AnthonyLatini_7-1695090414012.png](https://community.esri.com/t5/image/serverpage/image-id/81027i01C986AB6E30510E/image-size/medium?v=v2&px=400)
- By default, all the options that can be used as trigger are set to true. You can change these options based on the type of flow you are creating.
![AnthonyLatini_8-1695090414021.png AnthonyLatini_8-1695090414021.png](https://community.esri.com/t5/image/serverpage/image-id/81028iEB93152B87167FAE/image-size/medium?v=v2&px=400)
- Save the flow. After saving, the trigger will autogenerate a URL. This URL is needed for the next steps and configuring the webhook in ArcGIS Enterprise.
![AnthonyLatini_9-1695090414042.png AnthonyLatini_9-1695090414042.png](https://community.esri.com/t5/image/serverpage/image-id/81030iEF47FC1A61B3E900/image-size/medium?v=v2&px=400)
- After saving, you should have a flow that looks like this:
![AnthonyLatini_10-1695090414110.png AnthonyLatini_10-1695090414110.png](https://community.esri.com/t5/image/serverpage/image-id/81032i1C235F5A078CA03F/image-size/medium?v=v2&px=400)
- Keep this tab open as the HTTP POST URL will be needed for configuration steps in the Enterprise organization
Configure feature layer with webhook URL
This section will go over the steps necessary to create a webhook on the feature layer you are using for your flow.
Prerequisite: You must be signed in as an administrator on the Enterprise organization to process the next steps.
- Navigate to the following URL:
- https://organization.domain.com/server/admin/login
- When the page loads, you should see the following screen:
![AnthonyLatini_11-1695090414134.png AnthonyLatini_11-1695090414134.png](https://community.esri.com/t5/image/serverpage/image-id/81031iA4FBE74DEAA629C3/image-size/medium?v=v2&px=400)
- In a new tab, open the following page:
- https://organization.domain.com/portal/sharing/rest/generateToken
- The following page appears:
![AnthonyLatini_12-1695090414148.png AnthonyLatini_12-1695090414148.png](https://community.esri.com/t5/image/serverpage/image-id/81035i1285BFAF8524B113/image-size/medium?v=v2&px=400)
- Type in the administrator’s username and password
- Under the Client section, ensure that Wepapp URL is selected and type in the following URL format:
- https://organization.domain.com:443/server/admin
- Set the expiration to any of the options in the dropdown. The default is one hour.
- Once all the fields are filled in, press Generate Token
- Copy the Generated Token from the new field that appears
![AnthonyLatini_13-1695090414150.png AnthonyLatini_13-1695090414150.png](https://community.esri.com/t5/image/serverpage/image-id/81033iFA076219336BE7FF/image-size/medium?v=v2&px=400)
- On the previous page/tab, paste in the newly generated token to the Portal token field
- Press Login
![AnthonyLatini_14-1695090414151.png AnthonyLatini_14-1695090414151.png](https://community.esri.com/t5/image/serverpage/image-id/81034i76F75DB7502F030D/image-size/medium?v=v2&px=400)
- Once logged in, select Services from the list of resources
![AnthonyLatini_15-1695090414157.png AnthonyLatini_15-1695090414157.png](https://community.esri.com/t5/image/serverpage/image-id/81036i8DA896D08AC61EC9/image-size/medium?v=v2&px=400)
- Select the appropriate folder where the feature layer is stored. By default, this should be under the Hosted category
![AnthonyLatini_16-1695090414161.png AnthonyLatini_16-1695090414161.png](https://community.esri.com/t5/image/serverpage/image-id/81037i53C161BFAE4355DF/image-size/medium?v=v2&px=400)
- Select the service you want to add the webhook to
![AnthonyLatini_17-1695090414164.png AnthonyLatini_17-1695090414164.png](https://community.esri.com/t5/image/serverpage/image-id/81038i1F7928B04276D9C5/image-size/medium?v=v2&px=400)
- When the new page loads, scroll to the bottom of the page
- Select webhooks
![AnthonyLatini_18-1695090414167.png AnthonyLatini_18-1695090414167.png](https://community.esri.com/t5/image/serverpage/image-id/81039i5DD4C233102B22DD/image-size/medium?v=v2&px=400)
- From the Supported Operations section, select create
![AnthonyLatini_19-1695090414170.png AnthonyLatini_19-1695090414170.png](https://community.esri.com/t5/image/serverpage/image-id/81040i6CDB93D3DA58F6E5/image-size/medium?v=v2&px=400)
- On the Create Webhook page, fill in the appropriate information to create the webhook
- Name: Name the webhook. It is recommended to name this something meaningful to keep track of the webhooks
- Changes type: By default, a “*” (wildcard) should be entered to retrieve all the changes on the layer. You can specify which changes you’d like if you do not want to capture every action made against the layer.
-
![AnthonyLatini_20-1695090414172.png AnthonyLatini_20-1695090414172.png](https://community.esri.com/t5/image/serverpage/image-id/81041i545686F5DB82800C/image-size/medium?v=v2&px=400)
- HookURL: This is the URL that was generated from the Power Automate automated flow. Paste the value from the trigger into this field.
![AnthonyLatini_21-1695090414180.png AnthonyLatini_21-1695090414180.png](https://community.esri.com/t5/image/serverpage/image-id/81044i0848A381BF18941F/image-size/medium?v=v2&px=400)
![AnthonyLatini_22-1695090414182.png AnthonyLatini_22-1695090414182.png](https://community.esri.com/t5/image/serverpage/image-id/81042i6BFB87DA33769002/image-size/medium?v=v2&px=400)
- After pasting the URL, click Create
- The webhook has been successfully created
![AnthonyLatini_23-1695090414185.png AnthonyLatini_23-1695090414185.png](https://community.esri.com/t5/image/serverpage/image-id/81043i03BB859FEA930D98/image-size/medium?v=v2&px=400)
Create a flow to test the webhook on the feature layer
Now that the webhook has been created, we can run a simple test to see if the webhook is listening and capturing changes as expected. A simple test for this is to add a new attachment to a feature layer.
- Create a new Instant Cloud flow from your Power Automate landing page
- You can name the new action; however, it is not necessary. This action is meant as a test to see if the webhook is working and can be deleted after the test.
![AnthonyLatini_24-1695090414223.png AnthonyLatini_24-1695090414223.png](https://community.esri.com/t5/image/serverpage/image-id/81046i5297326E10E67757/image-size/medium?v=v2&px=400)
- Add a new step and search for the ArcGIS Enterprise connector
- Select Add attachment from the list of actions
![AnthonyLatini_25-1695090414249.png AnthonyLatini_25-1695090414249.png](https://community.esri.com/t5/image/serverpage/image-id/81045i9A5A1CF8CE05D72B/image-size/medium?v=v2&px=400)
- In the action window, select the layer that contains the webhook
- For Record ID, type in an ObjectID or unique identifier from your feature layer. You may need to show this column in your data table
![AnthonyLatini_26-1695090414268.png AnthonyLatini_26-1695090414268.png](https://community.esri.com/t5/image/serverpage/image-id/81047i6EBA6C0040D8FC19/image-size/medium?v=v2&px=400)
- For Attachment name, type in:
- webhooktest.txt
![AnthonyLatini_27-1695090414270.png AnthonyLatini_27-1695090414270.png](https://community.esri.com/t5/image/serverpage/image-id/81049iF245C13D4C3033D0/image-size/medium?v=v2&px=400)
- For File content, type in:
- This is a test.
![AnthonyLatini_28-1695090414271.png AnthonyLatini_28-1695090414271.png](https://community.esri.com/t5/image/serverpage/image-id/81048i70DCCE97EE5FB75A/image-size/medium?v=v2&px=400)
- Save and test the flow
- After the flow runs, the Run History should show that it succeeded
![AnthonyLatini_29-1695090414273.png AnthonyLatini_29-1695090414273.png](https://community.esri.com/t5/image/serverpage/image-id/81050i96B211B807C42EF7/image-size/medium?v=v2&px=400)
- Open the Webhook flow to see if the webhook was trigger correctly
- The Run History should also show a new entry and the webhook process should be successful
![AnthonyLatini_30-1695090414275.png AnthonyLatini_30-1695090414275.png](https://community.esri.com/t5/image/serverpage/image-id/81051i4280D600298348C7/image-size/medium?v=v2&px=400)