Survey123 Summary Feature Report in Integromat

351
4
01-06-2022 01:48 PM
Charlie_Kaufman
New Contributor

So I'm looking for some help with the Survey123 / Intergromat integration.  I'm fairly comfortable creating Survey123 forms, and generating reports.  Our current work process is that at the end of the day, a user takes the day's survey entries, and uses the Summary Report (which I have a template for) and generates a report for all the data/photos collected in a nice Word doc.  

I've been tasked with coming up with a way that at the end of each day, the field team will get an e-mail with that Summary Report attached and ready to go.   After reading up and watching some of the online videos it seemed that Survey123 / Intergromat was the way forward.   I was even happy to see a pre-made template that seemed to do exactly what I needed.   

And this is where the trouble started:

I've got all the connections, and even got a successful run of a zipped Word doc to my inbox.  But that was for only 1 entry.  When I try to do multiple entries, the scenario only sends out the last one I create.  Not the few I created that day for the test. 

Does this have anything to do with picking the ObjectID number?  If so, how do you tell it to pick the most recent entries?  

Again, simply selecting the new entries and using the template I created in the Survey123 webpage everything outputs like it should.  

Any help would be appriciated.

 

Tags (2)
4 Replies
JansenLyons
Occasional Contributor III

Is your survey webhook set to listen for new/edit new or is it just wait for response? I know there are differences in these and it can be very particular which field and indicator button you choose. For example, there may be three or four OID fields present that you can pull from under watch for response rather than the same ones under listen for new/watch for edits and it is difficult to discern which one is which as their purposes can vary. What may be best is to review the scenario as it runs, perhaps run some test reports versus the different variables available, and reach out to Integromat support with the scenario and context to see what they think. I've never had a re-run of existing reports without re-sending the same one through a watch for edits webhook, but it could simply be a refresh bug, artifact, or miscalculation on the scenario's side. This is a common workflow and integromat has been super helpful in defining fields and how to resolve issues like these. usually takes a day or two for a response, they will be working in Czech time and not USA, etc.

Hope this helps, best wishes on your project!

God bless,

 

Jansen Lyons - Records and GIS Section - Public Works - City of Rio Rancho, NM
0 Kudos
Charlie_Kaufman
New Contributor

Thanks for the reply.  My webhook is set up to listen for a new/edit to the Survey, and it does seem to do that.

My issue seems to be in the fact that the summary report only takes the last entry and not the ones for the day.   I've tried changing the OID fields with no luck.  I only get a single report output.  

DerrickWestoby
Occasional Contributor III

Each OID will reference a single survey submission, so it makes sense that you only get the single report output.  You're trying to generate a summary report where OID=* and something like where=date_collected=today. 

 

I have no idea how to do that via integromat with the built-in modules and configurations, but I assume you might be able to do it in integromat with a custom HTTP module.  If  you're comfortable using your browser's developer tools (F12) to view network traffic, you could probably go to the Survey123 website and manually generate your summary report of the day's activities just so that you can view the REST API call that it makes.   If you can find that, you should be able to fill it in the HTTP module and replace a few things with what's in the webhook payload (token, today's date, report template to use, etc).   

Ismael posted a blog about setting up those HTTP modules to generate feature reports a few years ago, before Integromat had a ready-to-use module.  

Actually,  I guess you wouldn't want to have it trigger off a webhook because you'll end up with duplicates if it's running per-submission.  Assuming you can even have an integromat scenario without having a webhook initiate it, it would probably be better to just set it up to run at the end of every day and handle the token generation and API call for report generation with HTTP modules.  

Since it can be time consuming to try to set all of this up just to see if it works in the first place, I'd try constructing that summary report REST call and test it out in Postman before even messing with bringing it in to Integromat. 

0 Kudos
ManuelCustodio
New Contributor II
0 Kudos