Adding Survey123 Feature Report as Output File to Integromat Workflow

8269
43
Jump to solution
05-23-2019 07:45 PM
BenVan_Kesteren1
Occasional Contributor III

Hey, 

So I have Integromat successfully detecting when a survey is submitted, it then sends the data to create a report, which works great, this setup looks like this:

An email is sent which is fine, but what I am having trouble with is working out how to get the outputted report from the Create Feature Report module, and insert this into the attachment field for the GMAIL Send an Email module...

These are the settings I think are working in Create Feature Report:

Then in the GMAIL Send Email module, I am unsure about this, what do I put in the Data field, within the Attachment section?:

Cheers

CC Henry Clark

43 Replies
Jim-Moore
Esri Regular Contributor

Hi Joel

Thank you for the screenshots. Please try removing 4. Data from the Content-ID in the Gmail attachment settings. Content-ID is used when embedding inline images into the body of your email. In this case, we're attaching a DOCX file so this parameter is not applicable.

Hope this helps,

Jim

JoelBrea_Rasquin
New Contributor II

Thanks Jim, now it's working. I am waiting for the update to send the report in PDF

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Joel, good to hear it's working! PDF feature reports is a work in progress at the moment but please stay tuned to GeoNet for updates.

Best,

Jim

0 Kudos
AprilChipman
Occasional Contributor III

I get the same error, but only when a Survey123 feature is *edited* rather than submitted.

When I try removing the Data field, I get an error.

But the whole flow seems to work just fine when a new survey is submitted.?

Jim-Moore
Esri Regular Contributor

Hi April

Are you still experiencing this issue? If so, is the edit being submitted from the web app or the field app?

Note that the Data field for the attachment should be mapped to the Data output from the HTTP get a file module.

Best,

Jim

0 Kudos
AprilChipman
Occasional Contributor III

Thanks for asking, Jim! I had stopped trying and testing, but this afternoon I took an old test Survey123 Connect and added a scenario in Integromat. This survey was created and published in 3.2, but I updated it today to "always use the latest version". When published, the survey already had the Inbox enabled.

First submission worked great - I submitted a survey and got an email with the appropriate attributes in the appropriate places. (wow! It's like I know what I'm doing or something!) 

So, I then tried editing a survey from the Inbox in the app. Again, it all worked. I received an email with all of the attributes in the right places, including the updated information I edited. WooHoo!

So, I then tried editing a survey from the Data tab on the Survey123 website. Although I still got an email (and no Integromat errors, which I had been getting), the only information in the email was the attribute that I edited. I did not get any of the existing data via email through Integromat. I double checked in the Data tab on the website and, sure enough, all of the unedited data still exists in the attribute table.

Is that how the 'watch survey edits' webhook is supposed to work? Or should it still send all of the attributes through Integromat with the edited attribute?

Thanks again! This app and tools are improving our workflows so much - it's amazing!

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi April

Thanks for the additional info and great to hear about your experience with Survey123!

The editData webhook event currently only includes in the payload the attributes that were updated. You could query the feature via the ArcGIS REST API to retrieve the other attributes using Integromat's HTTP "Make a request" module.

You might find some handy info in this blog post: https://community.esri.com/groups/survey123/blog/2019/06/04/survey123-tricks-of-the-trade-integromat 

Cheers,

Jim

0 Kudos
GlenGardner1
New Contributor III

Is this Create Report Action going to be added to Microsoft flow?

Alison_Gou_
New Contributor III
0 Kudos
GlenGardner1
New Contributor III

Is this Create Report Action going to be added to Microsoft flow?