Adding Survey123 Feature Report as Output File to Integromat Workflow

7963
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

1 Solution

Accepted Solutions
Jim-Moore
Esri Regular Contributor

Hi Ben

Nice work with the scenario. The trick here is to use the HTTP Get a file module between the Create feature report and Gmail modules. This module will retrieve the output DOCX file, which can then be attached to your email. The URL to the file is in the resultFiles part of the payload:

Over on our EAC there's a short video demonstrating the Create feature report action. Please see the link at the bottom of this post.

UPDATE: For more info please refer to this very useful GeoNet blog post: https://community.esri.com/groups/survey123/blog/2019/06/04/survey123-tricks-of-the-trade-integromat. The Working with Survey123 attachments section covers how to retrieve a file using the HTTP module and include it as an email attachment.

Best regards,

Jim

View solution in original post

43 Replies
Jim-Moore
Esri Regular Contributor

Hi Ben

Nice work with the scenario. The trick here is to use the HTTP Get a file module between the Create feature report and Gmail modules. This module will retrieve the output DOCX file, which can then be attached to your email. The URL to the file is in the resultFiles part of the payload:

Over on our EAC there's a short video demonstrating the Create feature report action. Please see the link at the bottom of this post.

UPDATE: For more info please refer to this very useful GeoNet blog post: https://community.esri.com/groups/survey123/blog/2019/06/04/survey123-tricks-of-the-trade-integromat. The Working with Survey123 attachments section covers how to retrieve a file using the HTTP module and include it as an email attachment.

Best regards,

Jim

BenVan_Kesteren1
Occasional Contributor III

Fantastic, thanks for that Jim.

 

I now have two follow up questions if you dont mind

  1. Can we rename the attachment that is sent to the end user?
  2. Can we convert the .docx file to be a pdf instead?

Thanks again

0 Kudos
Jim-Moore
Esri Regular Contributor

Hi Ben, great to hear this was useful. To answer your questions:

1. In the attachments settings in the Gmail module you can select "Map" for the source file, which allows you to specify a different filename. You can enter the filename manually or have it populated from parts of a payload.

2. We are currently researching methods for PDF output for feature reports and we're looking to implement this in a future release. No timeline available as yet but I'll endeavour to keep this thread updated.

Cheers,

Jim

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Thanks for that Jim. I was successfully able to rename the file. It took me a second to realise that when I map another field (survey title for example) that I had to manually tell it to end in .docx otherwise the file come through without the extension. Thats a simple mistake from my end, but hopefully this post helps someone in the future.

Also with regards to the PDF not being supported yet, that is a major bummer, our reports are actually 'certificates' to home owners, so sending a docx file is not really appropriate, so this is a major hurdle we just hit. 

We eagerly await any updates from you as to when PDF outputs will be supported.

Cheers

Jim-Moore
Esri Regular Contributor

Hi Ben

Thanks for the additional feedback, I've added your comments to our internal discussion and will certainly let you know of any progress. In the meantime, there might be other third party modules in Integromat that could covert the DOCX to PDF; I haven't investigated this so unsure of the options but could be worth checking out.

Good catch re: the .docx file extension!

Cheers,
Jim

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Ok another update... I think I have all steps required, in order to achieve what I need... You were correct, there is a CloudConvert tool in integromat which I have been able to utilise, so my final workflow looks like this:

The user submits a survey on the Survey123 app, the Create Feature Report picks up on this submission and converts the survey into a docx report, and then the HTTP tool is able to grab this attachment, and supply it to the CloudConvert Tool, which then creates a PDF for me, which is then added to an email and sent out via Gmail.... 

Very handy workflow thus far. I do not want to discourage ESRI from enabling the feature report to export as a PDF, as the CloudConvert tool is only free for your first few conversions each day, and then you have to pay... so if I can remove the converter and have the PDF created from the beginning, this will save my organisation some money.

Thanks again for your help.

BenBaker1
Occasional Contributor

This looks exactly like a workflow I just put together. I am having trouble renaming the file in CloudConvert. I've tried a static name, and tried to build the file name from attributes. Do you have any advice on how to make this work? Is it because I'm trying to go from the .docx to a .pdf and rename it in the same step?

0 Kudos
BenVan_Kesteren1
Occasional Contributor III

Hey Ben Baker‌, 

I have looked into this previously but could not work it out myself. I am unsure if a rename is possible at this point.

Hopefully someone else sees this and can help us both!

Cheers

0 Kudos
AdminAccount2
Occasional Contributor II

Hi Ben,

Would it be possible for you to post a screen shot of the working Cloud Convert function you're using in Integromat to change the filename? I have the same scenario running as you, but I cannot figure out how to rename the file that gets exported from Cloud Convert.

Thanks!

0 Kudos