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

1546
0
09-05-2017 10:26 AM

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

Hi,

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 run.py 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 run.py 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.

regards,

Marc

Attachments
Version history
Last update:
‎09-05-2017 10:26 AM
Updated by:
Contributors