Select to view content in your preferred language

ArcGIS Connector for Power Automate - Getting Started with Webhooks

13602
52
07-05-2022 07:01 AM
SeanKMcGinnis
Esri Contributor
8 52 13.6K

If you have heard people reference webhooks, but weren’t sure of what they are - webhooks allow web services to provide other services with near real-time information using HTTP POST requests.

Feature layer web hooks are triggered by an event, such as creating, updating, or deleting records in a hosted feature layer. The ArcGIS Connector for Power Automate has triggers that can create and configure webhooks to allow Power Automate flows to use the response payload and data to be used by the other actions.

Webhook Triggers

ArcGIS for Power Automate Connector - TriggersArcGIS for Power Automate Connector - Triggers

The ArcGIS Connector for Power Automate has three triggers that listen for different types of changes within ArcGIS Online feature layers (links will take you to the trigger documentation)

Before creating the trigger, review the feature layer's Editing settings an confirm the following options are checked:

  • Enable editing
  • Keep track of changes to the data (add, update, delete features)
  • Keep track of who edited the data (editor name, date and time)

Screen Shot 2022-07-05 at 9.25.40 AM.png

 

Back in Power Automate, select the appropriate trigger and choose the feature layer from the dropdown.

Select the desired feature layer from the dropdownSelect the desired feature layer from the dropdown

 

The next step is to select the 'Fetch updates, changes, or deletions from feature layer' action to handle the payload from the webhook.

Choose the Fetch Updates actionChoose the Fetch Updates action

When the action is added to the flow, it will appear as a single action in the flow.

Original state of the action when adding it to the flowOriginal state of the action when adding it to the flow

 

When populating the 'Get changes from' with the 'Changes URL' Dynamic content, you will notice the interface changes and gets wrapped inside an 'Apply to each' because the webhook payload may have multiple records included depending on how actively edited the feature layer is and what the webhook's interval is set to.

After completing this step, the flow can now work with the data returned as the feature layer changes.

I hope this helps you get started creating triggers on your feature layers. If you have any questions, please do not hesitate to reach out.

52 Comments
Contributors