You can automate ArcGIS Field Maps to streamline how you prepare maps and deploy them to the field. You can use webhooks and scripting to automate a variety of tasks, such as copying a form between maps and automatically generating an email notification whenever an asset is inspected. The following are two ways you can automate tasks for Field Maps:
- Set up a webhook in Make (formerly known as Integromat)—Automatically receive notifications in near real time when mobile workers create, edit, or delete features in the field.
- Use ArcGIS API for Python—Use Python scripts and notebooks to configure and deploy maps and manage and analyze data collected in Field Maps.
Set up a webhook in Make
A webhook allows an application to provide other applications with event-driven information. Common uses for webhooks include sending notifications by email or SMS, posting messages to social media, automatically writing records to a spreadsheet, and updating enterprise databases. Field Maps supports webhooks through Make (formerly known as Integromat), a third-party workflow automation service. Make has a built-in Field Maps app that allows you to integrate Field Maps into a webhook workflow. You can integrate the Field Maps app in the following ways:
- Trigger a webhook—The Watch Features trigger watches for features that are added, edited, or deleted in the Field Maps mobile app.
- Make an API Call—The Make an API Call action allows you to make API requests to ArcGIS web services.
Note:
The Field Maps app in Make only supports hosted feature services and is not currently supported on ArcGIS Enterprise.
Add the Field Maps app
To add the Field Maps app to a webhook in Make, complete the following steps:
- Browse to https://www.make.com/ and sign in.
If you don't have an account, sign up for free to get started.
- Click Create a new scenario.
- Search for ArcGIS Field Maps, select it, and click Continue.
The ArcGIS Field Maps app is listed as a favorite in your scenario.
- Click the module button in the middle of the screen and select ArcGIS Field Maps from the menu.
The ArcGIS Field Maps app is added. You can use the app to trigger a webhook or make an API call to ArcGIS web services.
Connect to your ArcGIS organization
If this is your first time using the Field Maps app in Make, set up a connection to your ArcGIS organization. How you connect to your organization depends on which module you use and the services you're accessing.
Connect the Watch Features trigger to your ArcGIS organization
To connect the Watch Features trigger to your ArcGIS organization, complete the following steps:
- Add the Field Maps app to a webhook in Make.
- Select the Watch Features trigger.
- Under Webhook, click Add.
- Under Connection, click Add and name the connection ArcGIS.
To connect to ArcGIS Online, click Continue to sign in to your ArcGIS organization.
You can view and edit the connections you make on the Connections tab in Make. To connect to multiple web services in ArcGIS, you may need to create multiple connections. For example, if you use a Make an API Call module to query a feature layer and another Make an API Call module to access the Sharing API, you'll need a separate connection to each service.
Note:
If you don't use a connection for 90 days, the refresh token expires and you must reconnect to your ArcGIS organization. If maxTokenExpirationMinutes is configured for your organization and is less than 90 days, the refresh token expires based on that value.
Connect the Make an API Call action to your ArcGIS organization
To connect the Make an API Call action to your ArcGIS organization, complete the following steps:
- Add the Field Maps app to a webhook in Make.
- Select the Make an API Call action.
- Under Connection, click Add and provide the following:
- Connection name—Provide a name for the connection, such as ArcGIS.
Note:
If you're accessing the Sharing API, click Continue to sign in to your ArcGIS organization instead of completing the substeps below.
- Sub-domain—Specify the services to connect to. For example, if you're connecting to feature services, type services.
Note:
If you're connecting to feature services, review the item page of your feature layer for the subdomain to use. Under URL, the displayed link begins https://<services>.arcgis.com. Use the text in <services> as the subdomain to connect the module to feature services.
- ArcGIS Online URL—Click Show advanced settings and provide the URL to your ArcGIS organization.
To connect to ArcGIS Online, click Continue to sign in to your ArcGIS organization.
- Connection name—Provide a name for the connection, such as ArcGIS.
You can view and edit the connections you make on the Connections tab in Make. To connect to multiple web services in ArcGIS, you may need to create multiple connections. For example, if you use a Make an API Call module to query a feature layer and another Make an API Call module to access the Sharing API, you'll need a separate connection to each service.
Note:
If you don't use a connection for 90 days, the refresh token expires and you must reconnect to your ArcGIS organization. If maxTokenExpirationMinutes is configured for your organization and is less than 90 days, the refresh token expires based on that value.
Trigger a webhook with the Field Maps app
Webhooks can be set up and activated when a feature is created, updated, or deleted in Field Maps or other applications, such as Map Viewer. For example, after a new feature is collected in Field Maps, a webhook can trigger another action, such as sending an email notification. Complete the following steps in Make to create a webhook that sends an email notification every time a feature is created, updated, or deleted in the Field Maps mobile app:
Note:
For a step-by-step tutorial, see the Automate email notifications for field updates blog post and the Automate Email Notifications using Make video.
- Add the Field Maps app to a webhook in Make.
- Select the Watch Features trigger module.
This module runs the scenario each time a feature is created, updated, or deleted.
The scenario icon changes color, and a window appears to help you configure the Field Maps module.
- Click Add and provide a name for the webhook.The name must be unique to the project or map that will use the webhook.
- If this is your first time using this module in Make, set up a connection to your ArcGIS organization.
Note:
If you created a connection for the Make an API Call module, you can reuse that connection for the Watch Features module.
- Under Feature Layer, choose an editable feature layer from your ArcGIS organization to connect to.
- Select one or more of the following Trigger events to include in the webhook:
- Features Created—Triggers the scenario when a feature is created.
- Features Updated—Triggers the scenario when a feature is updated.
- Features Deleted—Triggers the scenario when a feature is deleted.
- Click Save.
- Click OK.
The Field Maps module is configured.
- In the Tools section, click Flow Control.
- From the list of options, select Iterator.
The Iterator module is automatically connected to the Field Maps module. It allows the webhook to iterate over an array of features if multiple features are returned at the same time.
- Select the Iterator module and click the Array text box.
- From the drop-down menu under ArcGIS Field Maps - Watch Feature Service, find and select one of the following arrays:
- Adds []—For features being created
- Updates []—For features being updated
- Delete IDs [] —For features being deleted
- Click OK.
- Click the Add another module button next to the Iterator module.
- Search for an email service to use, such as Microsoft 365 Email, and select the app.
- Select the Create and Send a Message action.
- If this is your first time using the module in Make, click Add to set up a connection to your email account. Select a connection type and sign in to your account.
You only need to do this once. Make saves the connection for future use.
- Add Subject and Body Content text to the email.
You can use mapping to include attributes from your layer to format the text boxes. If you use mapping, add the layer attributes from the Iterator module.
- Add a recipient email address.
This is the email address where the triggered email will be sent.
- Click OK.
- Click Save to save your scenario.
Optionally, click Run once to test the webhook. After clicking Run once, open Field Maps and collect, update, or delete a feature. Confirm that the recipient receives the email.
- Use the Scheduling toggle button to activate your scenario. Set the schedule to Immediately to ensure that the scenario runs each time a feature is updated.
Note:
For Make support, see the Make documentation.
Make an API call with the Field Maps app
The Field Maps app can be used to make API requests to ArcGIS web services. For example, if a user collects a new feature in Field Maps, you can use the Make an API Call module to retrieve that user's email address and send them an email. You can also use the module to query a feature layer and create features, such as a Workforce assignment. The following are examples of how you can use the Field Maps app to make API requests:
- Make a request to the Sharing API
- Make a request to query a feature layer
- Make a request to create a feature
Make a request to the Sharing API
The Sharing API allows you to request information about users, groups, and content in an organization. You can use it to look up user information, search maps, view content, and more. You can use the Field Maps app in a webhook to retrieve information from the Sharing API. For example, to send an email to a user who just completed an inspection, you can use the Field Maps app to retrieve their email address. To configure the Field Maps app to retrieve a user's information from the Sharing API, complete the following steps:
- Add the Field Maps app to a webhook in Make.
- Select the Make an API Call action module.
The scenario icon changes color, and a window appears to help you configure the Field Maps module.
- If this is your first time using this module in Make, set up a connection to your ArcGIS organization.
Note:
If you created a connection for the Watch Features module, you can reuse that connection to connect to the Sharing API in the Make an API Call module.
- Under URL, provide the path to the Sharing API.
For this example, use the following path to access a user's information:
For more information, see Introduction to the Sharing API./sharing/rest/community/<username>
- Under Method, select Get.
- Under Query String, click Add item.
- Provide the following inputs:
- Key—f
- Value—json
- Click OK.
- Click Save to save your scenario.
When triggered, the Field Maps module will retrieve the user's information from the Sharing API.
Note:
For Make support, see the Make documentation.
Make a request to query a feature layer
You can make an API request to query a feature layer. For example, you want an end of day summary sent to you by email. You can set up the Field Maps app to query statistics for a day's inspections and include them in an email. To configure the Field Maps app to query a feature layer, complete the following steps:
- Add the Field Maps app to a webhook in Make.
- Select the Make an API Call action module.
The scenario icon changes color, and a window appears to help you configure the Field Maps module.
- If this is your first time using this module in Make, set up a connection to your ArcGIS organization.
- Under URL, provide the path to the feature service you want to query:
For more information, see Query (Feature Service/Layer)./<org-id>/arcgis/rest/services/<layer-name>/FeatureServer/<layer-id>/query
- Under Method, select Get.
- Add the Query String items.
- Under Query String, click Add item and provide the following inputs:
- Key—f
- Value—json
- Click Add.
- Click Add item and provide the following inputs:
- Key—where
- Value—1=1
- Click Add.
- Click Add item and provide the following inputs:
- Key—outFields
- Value—*
- Click Add.
- Under Query String, click Add item and provide the following inputs:
- Click OK.
- Click Save to save your scenario.
When triggered, the Field Maps module will query the feature layer based on the parameters you provided.
Note:
For Make support, see the Make documentation.
Make a request to create a feature
You can make an API request to create a feature. For example, if a fire hydrant inspection is completed in Field Maps, that can trigger the creation of an assignment feature in ArcGIS Workforce. To configure the Field Maps app to add a feature to a layer, complete the following steps:
- Add the Field Maps app to a webhook in Make.
- Select the Make an API Call action module.
The scenario icon changes color, and a window appears to help you configure the Field Maps module.
- If this is your first time using this module in Make, set up a connection to your ArcGIS organization.
- Under URL, provide the path to the feature service you want to add features to:
For more information, see Apply Edits (Feature Service/Layer)./<org-id>/arcgis/rest/services/<layer-name>/FeatureServer/<layer-id>/applyEdits
- Under Method, select Post.
- Under Headers, click Edit.
- Change Value to application/x-www-form-urlencoded.
- Click Save.
- Under Body, type f=json&adds=[<json-object>].
The value for <json-object> must be a JSON string representing a feature. The exact specification to use depends on your layer. For more information, see Feature object.
- Click OK.
- Click Save to save your scenario.
When triggered, the Field Maps module will add a feature to the layer.
Note:
For Make support, see the Make documentation.
Use ArcGIS API for Python
Use ArcGIS API for Python to automate and script tasks for Field Maps. You can use the Forms module to author and edit forms used for data collection, and you can access the Field Maps scripts repository on GitHub for example scripts and notebooks. The scripts and notebooks allow you to automate tasks, such as copying forms between maps and downloading attachments from a feature layer.
Note:
To use the Forms module, you must use ArcGIS API for Python 1.9.0 or later.