Select to view content in your preferred language

how to automatically download survey records

1365
4
08-21-2019 08:27 AM
CUARTA_OPORTUNIDADLOCAL
Occasional Contributor


I have an enterprise license, and to facilitate my procedures I want to automatically download the records found in my surveys in order to send the reports to the people who fill them out.

I want to know why method I can schedule the download of these files taking into account the entity report template

0 Kudos
4 Replies
ChelseaRozek
MVP Regular Contributor

The easiest method is to use Integromat to create a webhook that will automatically generate a report and send it to an email of your choosing. We gather the email as a question in the survey, which Integromat can access.

More information:

Webhooks—Survey123 for ArcGIS | ArcGIS 

Survey123 Integrations | Integromat 

0 Kudos
MarisaClaggett
Frequent Contributor

Hi Liliana,

Have you looked into using the ArcGIS Python api?  You can create a script using the api to get the item id of your survey, download the data to other formats, and generate reports.  After creating your script, you can run at scheduled times.  Let me know if this helps!

arcgis.apps.survey123 module — arcgis 1.6.2 documentation 

Thanks,

Marisa

0 Kudos
CUARTA_OPORTUNIDADLOCAL
Occasional Contributor

In this API there is any form that send those records automatic in a email?

0 Kudos
EmmaHatcher
Frequent Contributor

Hi Marisa,

I'm trying to export a survey to a file geodatabase and am running into problems with the export_format strings. The documentation doesn't have much in terms of what the strings actually need to be.  I tried using "File Geodatabase" as my export format, and I get the error below:arcgis API for Python survey123.Survey.download type error showing unexpected format for export_format argument

Here is the code that generated that error:

import arcgis
from arcgis.gis import GIS
from arcgis.apps.survey123 import Survey, SurveyManager
import os

gis = GIS("https://adfg.maps.arcgis.com", 'username', 'password')

tbl_path = r"C:\Data\SurveyDownload_" + str(today).replace("-","_")
if not os.path.exists(tbl_path):
    os.mkdir(tbl_path)

sm = SurveyManager(gis)
survey = Survey(survey123_form, sm)
survey123_form = gis.content.get("2ea1bdb67eda442eac567b15edd1181a6")
survey123_form.download(export_format = "File Geodatabase", 
                        save_folder = os.path.join(tbl_path))‍‍‍‍‍‍‍‍‍
0 Kudos