Push Data from ArcGIS Survey123 to an Application in Real-time with Webhooks

Matt Meeboer
Matt Meeboer
  • Updated

Introduction

By combining the power of FME Flow Automations with Esri ArcGIS Survey123 Webhooks, you can extend your field data collection workflows! Inside an automation, a webhook trigger can receive and process Survey123 submissions in real-time. This tutorial configures a webhook in Survey123, builds an automation in FME Flow, and, finally, processes the webhook response. 

This tutorial was created using FME 2026.1. There may be some differences in the UI and terminology if you are using a different version, but the fundamentals are the same. Screenshots from Survey123 are also included, but may change without notice. 

Requirements

Step-By-Step Instructions

The completed workspace, InvasiveSpecies-Complete.fmw, and the InvasiveSpecies2023.fsproject that contains the automation, can be downloaded from the Files section of this article. Note that both the workspace and automation will need to be configured according to your environment's parameters before they work.

Part 1: Connect the Survey123 Webhook to FME Flow

The first step of creating an automation is setting up the Survey123 form and a webhook trigger to relay the submitted data. For more information on webhooks, please read our Webhooks and FME Flow article.

1. Create an Automation in FME Flow

Go to FME Flow. In the side menu, click Automations and then Create.


Double-click the Trigger. In the drop-down menu, select Webhook (triggered). To get a Webhook URL, you will need to save the automation first. Click Apply and save the automation as "Survey123 Invasive Species".

Double-click once again on the Webhook trigger, and you should now see the Webhook URL. This URL contains a unique token to give our Survey123 webhook the ability to access FME Flow and run the automation. Leave the parameters open; we will need to copy the Webhook URL in a moment. 

2. Create a Survey123 Form

In a new browser tab, open ArcGIS Survey123. Sign in and create a Survey123 form named "Invasive Species Reporting" with:

  1. A single-line text field for the field worker’s name
  2. A drop-down menu of species options (For example: Garlic Mustard, Goutweed, Norway Maple) 
  3. A point map
  4. An image attachment. 

Save and publish the survey.


3. Create a Survey123 Webhook

In the FME Flow automation, copy the Webhook URL from the Webhook trigger by clicking the clipboard button. 


In Survey123, go to the survey settings and click Webhooks in the side menu. Click Add webhook and then Add Survey123 webhook.

Esri provides two types of Webhooks: Feature Layer and Survey123. As explained on Survey123's Webhooks page, a Survey123 webhook is stored with the survey form. From a networking perspective, a Survey123 webhook request is sent directly from the client (Survey123 mobile app or web app), instead of from the Feature Layer in ArcGIS Online. Please see Networking Considerations for FME Flow Webhook Integrations to learn more. Survey123 webhooks contain the form data in a simple payload. To learn more, please see Esri's Webhooks documentation. 

Give the webhook a descriptive name so you can remember what it’s being used for in the future. Paste the FME Flow Automation Webhook URL into the Payload URL field. Make sure the New record submitted trigger event and Submitted record event data checkboxes are selected. Click Save to finish.



The Survey123 webhook is connected to FME Flow now, and the automation is ready to receive incoming data! However, a few more steps are required for the automation to handle survey responses properly.
 

Part 2: Set Up the Webhook Output Attributes

In this section, we will be creating the webhook output attributes. An output attribute is a message that can be passed through the automation as JSON. Please read Working with Automation Parameters and Custom Attributes in an Automation | User and Global Keys to learn more about output attributes.

So, why do we need output attributes in our automation? The Survey123 webhook sends the submitted form’s attributes, coordinates, and other data as JSON key-value pairs. These parameters can be referenced in the webhook trigger’s output attributes and passed into our data processing workspace. However, at the moment, we don’t know the structure of the JSON result. We’ll need to log the message to see it.

1. Add a Log Action

In the automation, add an Action, connect it to the Webhook trigger Succeeded port, and then set it to Log a message.


Open the drop-down menu next to Formatted Message, expand Webhook, select Message Content, and then click Apply. This will log the entire webhook result message.



2. Submit a Test Form from Survey123

Start the automation in Debug mode. 

 

Fill and submit a test form in Survey123.

In the automation, open the Menu and click View Debug Log. In the log, you should see a result similar to the image below (it may take a minute to appear).
7_FMEServerMessage.png

This is the entire webhook response as JSON; however, we are only interested in the contents of the feature attribute (highlighted). To make the message easier to read, you can paste the message into a text editor or a JSON formatter

If FME Flow did not receive the message, verify:

  1. The automation is running in Debug mode.
  2. If you submitted the Survey from the Survey123 mobile app, redownload the survey from the app and try again. The survey must be re-downloaded whenever a webhook is added or changed.
  3. Your FME Flow server is publicly visible. For FME Flow Hosted, no action is needed. For FME Flow, see the article Enabling FME Flow for Public Access for guidance.

3. Create Webhook Output Attributes

From the log, copy the whole JSON message from the opening curly brace before “applyEdits” to the closing curly brace - do not include the timestamp from the log. 

Stop the automation.

Open the Webhook Details, and in Output Attributes, click Import Parameters from JSON.

 

Paste the JSON into the text box and click Parse

This will parse through the message and generate output attributes for the top-level JSON parameters.

Click Apply.

In the Log action's Formatted Message, you should now be able to select the attribute webhook.feature under Webhook. Select it and click Apply.


Click Debug to start the automation in Debug mode again. Submit another test form. The automation log message will be filtered to just the feature attribute value. Copy this new JSON from the log because we will need it in an upcoming step. Your feature attribute contents should look similar to the code snippet below. The webhook.feature attribute is the only output attribute we’re interested in, since it contains the necessary geometry, attribute, and attachment data.

{
  "attributes": {
    "what_is_your_name": "Astrid Bennet",
    "select_which_invasive_species_y": "norway_maple",
    "globalid": "{74F974B3-C2AD-4AF6-8ACB-EA32B992949D}",
    "objectid": 188
  },
  "geometry": {
    "geometryType": "esriGeometryPoint",
    "x": -122.97788142645621,
    "y": 49.286419591602495,
    "spatialReference": {
      "wkid": 4326
    }
  },
  "layerInfo": {
    "id": 0,
    "name": "survey",
    "type": "Feature Layer",
    "globalIdField": "globalid",
    "objectIdField": "objectid",
    "relationships": []
  },
  "result": {
    "globalId": "{74F974B3-C2AD-4AF6-8ACB-EA32B992949D}",
    "objectId": 188,
    "uniqueId": 188,
    "success": true
  },
  "attachments": {
    "please_take_a_picture_of_the_sp": [
      {
        "id": 163,
        "url": "https://services1.arcgis.com/nhT990CtK0zABCDE/arcgis/rest/services/survey123_752764383a374be0b35ae8d14e12345a_fieldworker/FeatureServer/0/188/attachments/163",
        "name": "norway_maple.jpg",
        "size": 10519,
        "contentType": "image/jpeg",
        "keywords": "please_take_a_picture_of_the_sp",
        "globalId": "{F846F2E7-D6D6-4530-8298-FC988116A22D}",
        "parentGlobalId": "{74F974B3-C2AD-4AF6-8ACB-EA32B992949D}"
      }
    ]
  }
}

The webhook output attributes are dependent on the structure of the Survey123 webhook response. Esri could change the webhook structure at any time, and your automation output attributes may become invalid.

Part 3: Process the Webhook Response JSON in FME Workbench

With the raw data captured and ready to process, we want to connect a workspace as the next action in our automation to convert the webhook JSON into geometry with attributes. In order to pass the webhook.feature output attribute into our workspace, we will need to set up a user parameter in FME Workbench.

1. Create a New Workspace and User Parameters

Create a new workspace in FME Workbench. Save the workspace as InvasiveSpecies.fmw. In the Navigator, right-click User Parameters and select Manage User Parameters. Click the Insert button and choose Text.
12_FMEFlowParams.png
 
On the right-hand side of the Parameter Manager, enter the following parameter properties:

  1. Parameter Identifier: feature
  2. Prompt: Webhook Feature
  3. Required: Enabled
  4. Show Label: Enabled
  5. Visibility: Always Show
  6. Editor Syntax: Json
  7. Default Value: Paste the JSON from the feature attribute response (from the end of Part 2, Step 3). This will be used for testing our workspace. 

Click OK

2. Add a Creator and ParameterFetcher

Search for the Creator transformer and place it on the canvas. This will kickstart the workspace in the automation when the webhook is triggered.

We can grab the webhook feature output attribute using the ParameterFetcher transformer. Attach a ParameterFetcher transformer to the Creator.

Open the ParameterFetcher parameters. For the Parameter Name, open the drop-down menu and select the feature user parameter that we just created. Name the Target Attribute webhook_feature. Click OK



Run the workspace with Data Caching enabled. 

Inspect the ParameterFetcher output. A new attribute webhook_feature has been created with the JSON text we pasted into the feature parameter's default value.



3. Add a JSONFragmenter

In its current state, the webhook_feature attribute is just text and not functional geometry with attributes. We need to extract the location data and survey attributes and then create a point geometry feature.

Connect a JSONFragmenter to the ParameterFetcher. This transformer will create separate features for each attribute (result, attachments, attributes, geometry, layerinfo).

Set the JSON Attribute to webhook_feature. In the Flattening Parameters, set Flatten Query Result into Attributes to Yes.

 

4. Filter the JSON Keys
There are three keys we need from the webhook_feature JSON: attributes, attachments, and geometry. 

  • Attributes contain the attributes needed for the point geometry feature
  • Attachments contain the image content type and URL needed to download the file
  • Geometry contains the information needed, including coordinates, to create the point geometry feature

Add a TestFilter to the canvas and connect it to the JSONFragmenter. Open the TestFilter parameters and add a set of test conditions to filter each of the three keys to different output ports based on the json_index value.


5. Expose and Rename the JSON Attributes

Instead of manually typing the attributes to expose in the JSONFragmenter, we can use the AttributeExposer to import features from the data cache. Add an AttributeExposer to the workspace and connect the TestFilter’s Attributes and Attachments output ports to it.

To use the Import from Data Cache option, first run the workspace to the TestFilter. 

In the AttributeExposer, click Import > From Data Cache.

Select the Attachments and Attributes data caches and click Next.

Select:

  • objectId
  • globalid
  • please_take_a_picture_of_the_sp{}.id
  • please_take_a_picture_of_the_sp{}.url
  • what_is_your_name
  • select_which_invasive_species_y

The list attributes (containing {}) need a list element specified. Since we’re working with only one image attachment in Survey123, we can specify the first list element: 0.

In the list of Attributes To Expose, enter an index of 0 in the curly braces of please_take_a_picture_of_the_sp{}.id and please_take_a_picture_of_the_sp{}.url attribute, so that they become please_take_a_picture_of_the_sp{0}.id and please_take_a_picture_of_the_sp{0}.url.

Your attributes may be different depending on how you labeled them in Survey123. 


The attribute names are not user-friendly, especially those exposed from the attachments list JSON. Add an AttributeRenamer to the canvas and connect it to the AttributeExposer. Rename the attributes to the following:

  • select_which_invasive_species_y: invasive_species_type
  • what_is_your_name: name
  • please_take_a_picture_of_the_sp{0}.id: attachment_id
  • please_take_a_picture_of_the_sp{0}.url: attachment_url



6. Aggregate the Attribute Features
We only want one feature with all the attributes we need, so add an Aggregator to the canvas and connect it to the AttributeRenamer.

Open the Aggregator parameters. Expand the Attribute Accumulation section and set the Accumulation Mode to Merge Incoming Attributes.


Click OK.

Run the workspace and check the Aggregator data cache. In the Data Preview, verify that all attributes are present.



The workspace should now look like this:


7. Create a Point Geometry

Now we need to capture the geometry from the JSON and merge it with the attributes from the previous step so that we have one point feature with all the survey information. Add a GeometryReplacer to the TestFilter’s Geometry output port.


In the GeometryReplacer parameters, set the Geometry Encoding to Esri JSON. Enter webhook_feature for the Geometry Source. 



Add a FeatureMerger to the canvas. Connect the GeometryReplacer output to the FeatureMerger Requestor input port. Connect the Aggregator to the Supplier input port. By default, the Requestor port is above the Supplier port. Right-click the Requestor port and choose Move Down to avoid crossing lines.

 

Open the FeatureMerger parameters. Since we want to merge all attributes from the Aggregator to the new point geometry feature, but we don’t have a common key to join on, we can simply create a join between the Requestor and Supplier where 1 = 1.


 
Run the workspace and inspect the FeatureMerger’s Merged output in Data Preview. Turn Graphics View on. There is now a point geometry feature with all attributes from the submitted survey, plus the attachment id and URL we’ll need to download the image in the next part.



8. Organize the Workspace

Let’s spend some time organizing our workspace now. Create a bookmark around all of the transformers added so far, except for the Creator and ParameterFetcher. Name it "Create feature geometry from JSON". At this point, your workspace should look like this: 


 

Part 4: Get Image Attachment from ArcGIS Online

We have created point geometry with all attributes included, but we are still missing the image attachment. You may have noticed the image is not included in the webhook response. The image is stored in the ArcGIS Online feature service. We need to download the image and add it to the point as a binary attribute so that it can be written into the database.

To do this, we'll use the Esri ArcGIS Connector package from the FME Hub, which contains web services, readers, writers, and transformers for working with ArcGIS Online and Enterprise. Make sure you have upgraded to the latest version of the package. You can check for updates in FME Options > FME Packages.

1. Create an ArcGIS Online Web Connection

If you don't already have one, create an ArcGIS Online Web Connection using the instructions found here: How to Create an ArcGIS Online Web Connection (OAuth 2.0). The connection needs to be configured for both FME Form and FME Flow.

2. Download the Image from ArcGIS Online

Add an ArcGISAttachmentConnector to the canvas and connect it to the Merged output port of the FeatureMerger. The ArcGISAttachmentConnector will download the image from the URL we obtained from the Attachments key in the feature JSON. Configure the AttachmentConnector parameters as follows:

  • Connection: the name of the ArcGIS Online web connection created in the last step
  • Action: Download
  • Feature URL: attachment_url
  • Attachment ID: attachment_id
  • Download as: Attribute
  • Download to Attribute: attachment


Run the workspace up to the ArcGISAttachmentConnector and inspect the results in Data Preview. The image has been downloaded as a binary object, which can be stored in the database downstream.


3. Add the Image to the Point Feature

The image needs to be added to the point geometry created in Part 3. We could use another FeatureMerger to do this, but since we now have a common attribute, objectid, on both features, we can use a FeatureJoiner.

Add a FeatureJoiner to the canvas. Connect the ArcGISAttachmentConnector's output to the FeatureJoiner’s Left input port. Connect the FeatureMerger Merged output port to the Right input port. If the line connecting the transformers is hard to see on the canvas, you can double-click it to add a vertex where you want to reposition the line and then click and drag to move.


Configure the parameters of the FeatureJoiner to join both features on objectid. For Geometry Handling, choose Prefer Right, since the right feature contains the point geometry.



4. Remove and Rename Attributes

All that’s left is to clean up the schema before writing to the database.

Add an AttributeManager transformer and connect it to the Joined output port of the FeatureJoiner. Remove all attributes except the ones listed below and modify where indicated:

  • objectid
  • globalid
  • name: change the Type to varchar(200)
  • invasive_species_type: change the Type to varchar(200)
  • content_type: rename to attachment_type
  • attachment

Click OK.

5. Write to a SpatiaLite Database

Add a new writer and set the following parameters:

  • Format: SpatiaLite
  • Dataset: InvasiveSpeciesRecords.sqlite
  • Table Definition: Automatic

Click OK.

For the Feature Type, set the following parameters:

  • Table Name: survey_results
  • Feature Operation: Insert
  • Table Handling: Create If Needed

Click OK. 

Connect the AttributeManager to the SpatiaLite writer. Since the writer's Table Definition is Automatic, the schema and geometry is set by the incoming features.

Note that a new published parameter was automatically generated, named "DestDataset_SpatiaLite". This will be used in our automation to set the output destination in the FME Flow shared resources.

Run the workspace. View the output data to verify that it was written as expected.


You can test the workspace by submitting additional surveys in Survey123 and copying the request JSON from the FME Flow log into the feature parameter, as we did in Part 2, Step 3. You can set the writer’s Overwrite Existing Database parameter to Yes while you test (as shown below), but make sure to set it back to No before publishing to FME Flow.



6. Publish to FME Flow

Now that our workspace is complete, we need to publish the workspace and the SpatiaLite database to FME Flow. If this is your first time doing this, please read our guide on publishing workspaces to FME Flow before proceeding. It is a good idea to save your workspace before publishing. 

Connect to your FME Flow instance and choose a repository to upload the workspace to (or create a new repository).

We also need to upload the SpatiaLite database. 

  1. Click Select Files
  2. Click Add Files. Navigate to your SpatiaLite database and select it
  3. Click Select Location
  4. Choose Upload to a shared resource folder
  5. Choose the folder where you want the database to reside. Creating a new folder within Data is advisable. 
41_PublishingFilestoFlow.png

Click OK and Continue.

When prompted to upload connections, your ArcGIS Online web connection should already exist on FME Flow (see Requirements). If it doesn't, choose your ArcGIS Online web connection to upload it to FME Flow. Click Continue

For services, select Job Submitter and click Publish. Check the Translation Log to make sure everything was published to FME Flow successfully.
 

Part 5: Complete the Automation

With our workspace and database in FME Flow, we can add them to our automation now.

1. Confirm the Web Connection is Authorized

Your ArcGIS Online web connection should already be authorized on FME Flow. If not, please see Part 2 of How to Create an ArcGIS Online Web Connection (OAuth 2.0)


2. Create an Automation Workspace Action
Open the Survey123 Invasive Species automation. Stop the automation if it is still running.

Connect a Log action to the Webhook trigger failed port, instead of the succeeded port. Add a new Action to the canvas and connect the Webhook trigger succeeded port to it. 


Open the Action and set it to Run a workspace. Choose the repository where the InvasiveSpecies.fmw workspace was published. You will notice that the Webhook Feature field is already filled in. This is the test JSON that we used in our workspace’s user parameter default value, but we want the webhook.feature output key instead. 

  1. Uncheck Use Default Value, open the drop-down menu, expand the Webhook Attributes, and select webhook.feature.
  2. For the SpatiaLite Database parameter, uncheck Use Default Value, click the ellipses, and navigate to the database file that you uploaded to FME Flow. Select it and click OK.

Click Apply.

Save and start the automation.



The Survey123 webhook automation is complete and ready to receive form submissions! With this setup, you will be automatically updating your invasive species database whenever a form is submitted, which saves time and effort and streamlines the process. While this workflow writes to a database file that needs to be downloaded to view, you can write to an external database such as PostGIS or SQL Server instead.

This automation is relatively simple, but you can extend your workflow with additional FME Flow and FME Workbench functionality, such as email notifications and report generation. If you would like to extend this automation, please see the Emailing a Survey123 Report Using FME Flow tutorial.

Remember to remove the test records from your database and ArcGIS Online feature service before you deploy the automation!

Additional Resources

 

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.