Survey123 Monitor Python script to send out notifications when users have submitted or changed a survey

File uploaded by maho on Sep 5, 2017
Version 1Show Document
  • View in full screen mode



Just wanted to post a quick & dirty solution for a question I asked some time ago: Enable notifications for submitted surveys and changes

Today I got to play around with Azure serverless functions and whipped up this script, building on top of this post by Prashanth Madi.


As outlined in the Running Python Code on Azure Functions App post, follow these steps:

1. Create a function app (and replacing the .js1 file with a file)

2. Upgrade Python 2.7.x to 3.6.x

3. Install a third party Python module (in my case requests)


4. Paste in the attached code into the file, make the changes for your ArcGIS and email environment (I'm using O365 for email) and update other <your stuff here> comments in the code

5. Configure the app: Adjust the function.json to set the function type to TimeTrigger and set the time interval, set connection strings in the application settings for the passwords

On my wishlist?

- Get the ArcGIS Python API working (will require some way to get Anaconda installed first)

- Have this notification functionality provided by Survey123   


Happy notifications.