HOW TO

Automate email notifications with survey reports from ArcGIS Survey123 using Microsoft Power Automate

Last Published: February 28, 2025

Summary

In ArcGIS Survey123, Power Automate can be used to send automated email notifications with survey reports, ensuring users receive timely updates about submitted surveys. This automation enhances efficiency by reducing manual follow-ups and improving communication. Complete the workflows provided to configure an automated email notification with survey reports.

Procedure

These workflows use the Survey123, OneDrive for Business and Office 365 Outlook connectors in Microsoft Power Automate to automate sending a report of the survey collected from ArcGIS Survey123. A similar workflow can be performed using ArcGIS, OneDrive for Business and Office 365 Outlook connectors in Microsoft Power Automate.

Note:
The workflows must be performed consecutively. A Microsoft 365 account login is required to ensure the user's accounts are synchronized.
Note: 
Microsoft Power Automate can be accessed through My Apps. Refer to Microsoft Learn: Get started with Power Automate for more information.

Create an automated cloud flow using the Survey123 connector

  1. Open Microsoft Power Automate and click My Flows.
  2. In the My flows page, click New flow. Under Build your own from blank, select Automated cloud flow.
Creating automated cloud flow in Microsoft Power Automate.
  1. In the Build an automated cloud flow window, specify a name for Flow name.
  2. In Build an automated cloud flow, under Choose your flow's trigger, type Survey123 and select When a survey response is submitted. Click Create.
Selecting the flow's trigger in Microsoft Power Automate.

Add a condition to the connector

  1. Click the When a survey response is submitted card to open its pane.
  2. In the When a survey response is submitted pane, on the Parameters tab, under Survey, click the drop-down menu and select the survey. In this example, Marine Debris Report Form is selected.
Selecting the desired survey for the Survey123 connector
  1. Click New Step The New step button. to open the Add an action pane.
  2. In the Add an action pane, in the search bar, type Condition. Under Control, select Condition.
Adding a Condition connector in Microsoft Power Automate.
  1. In the Condition pane, on the Parameters tab, under Condition expression, configure the parameters.
    1. Click the field input box and click dynamic content The dynamic content button.. In the search bar, type Survey Info. Under When a survey response is submitted, select Survey Info.
    2. Click the operator input box to open the drop-down menu and select is not equal to.
    3. Click the value input box and select Insert expression The Insert expression button..
    4. In the expression box, type null and click Add.
Specifying null in the expression box.

Create a report of the survey

  1. In the Condition card, under the True section, click New step The New Step button. to open the Add an action pane.
  2. In the Add an action pane, in the search bar, type Create report. Under Survey123, click Create report.
Adding a 'Create report' connector in Microsoft Power Automate.
  1. In the Create report pane, under Parameters, configure the parameters as follows:
    1. For Survey, select the desired survey.
    2. For Feature layer, select the desired feature layer.
    3. For Report template, select the desired report template.
Note:
Ensure the survey includes the report template in ArcGIS Survey123. Refer to ArcGIS Survey123: Report templates for more information.
  1. For Feature object ID, click dynamic content The dynamic content button.. In the search bar, type feature result objectid and select feature result objectId under When a survey response is submitted.
Note: 
The report can be generated as a Word document or PDF file. In the Create report pane, select the desired format under Format.

Configure the survey as a file to be sent via email using OneDrive for Business

  1. Below the Create report card, click New step The New step button to open the Add an action pane.
  2. In the Add an action pane, in the search bar, type Upload file from URL. Under OneDrive for Business, select Upload file from URL.
Adding a 'Upload file from URL' connector in Microsoft Power Automate.
  1. In the Upload file from URL pane, on the Parameters tab, configure the following parameters:
    1. For Source URL, click dynamic content The dynamic content button.. In the search bar, type body/resultInfo/resultFile/url. Under Create report, select body/resultInfo/resultFile/url.
    2. For Destination File Path, specify the name of the folder and add the dynamic content body/resultInfo/resultFile/name. Under Create report select body/resultInfo/resultFile/name. Refer to the file path example below:
<Name_of_folder>/<body/resultInfo/resultFile/url>
  1. For Overwrite, click the drop-down menu and select Yes.
  1. Below the Upload file from URL card, click New step The New step button. to open the Add an action pane.
  2. In the Add an action pane, in the search bar, type Get file content using path. Under OneDrive for Business, select Get file content using path.
Adding a 'Get file content using path' connector in Microsoft Power Automate.
  1. In the Get file content using path pane, on the Parameters tab, configure the following:
    1. For File Path, click dynamic content The dynamic content button.. In the search bar, type Path. Under Upload file from URL, select Path.
  1. Below the Get file content using path card, click New step The New step button. to open the Add an action pane.
  2. In the Add an action pane, in the search bar, type Send an email (V2). Under Office 365 Outlook, select Send an email (V2).
  3. In the Send an email (V2) pane, on the Parameters tab, configure the parameters as follows:
    1. Click Switch to Advanced Mode.
    2. For To, specify the desired email address.
    3. For Subject, specify the desired subject of the email.
    4. For Body, specify the desired body content of the email.
    5. Under Advanced parameters, click the drop-down menu and select Attachments. In the Attachments section, configure the following:
      1. Click Add new item.
Adding new items under Attachments.
  1. For Name – 1, click dynamic content The dynamic content button.. In the search bar, type body/resultInfo/resultFile/name and select body/resultInfo/resultFile/name under Create report.
  2. For Content – 1, click dynamic content The dynamic content button.. In the search bar, type File content and select File content under Get file content using path.
  1. In the My flows page, click Save The Save button.

Configure the webhook in ArcGIS Survey123

  1. Open ArcGIS Online and navigate to ArcGIS Survey123. In ArcGIS Survey123, on My Surveys page, click the ellipsis The ellipsis button on the desired survey and select Settings.
  2. Click the Webhooks tab from the menu on the left.
  3. On the Webhooks tab, under Operations, on the desired webhook, click Edit The Edit button.
  4. In the Edit webhook page, under Trigger events, enable Existing record edited.
Enabling the Existing record edited in the Webhooks for the survey
  1. Click Save.

The image below shows the automated email notification with an attached Word document of the survey report in Office 365 Outlook.

The automated email notification with a survey report attached

Article ID: 000034101

Software:
  • ArcGIS Online
  • Third Party Product
  • ArcGIS Survey123 Website

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options