Survey123 and Make | Error Sending Email with Image Attachment

990
3
Jump to solution
04-29-2022 02:38 PM
StevenDel_Castillo
New Contributor III

Hello Everyone.

A couple of years ago I had several scenarios working properly on Integromat for Survey123 to send an email with attachment but now, none work. I have even tried upgrading to Make and recreating the scenario but no luck. 

I have followed previous blog posts and checked replies on different threads and I am not seeing a similar issue to the one we are having - hopefully someone can help us.

Setup of scenario...
Module 1: Survey123 Watch Survey
Module 2: HTTP Get File (using this to grab image)

Then it splits to a a path if no image found to one where there is one present.

[w/ image path]
Module 3: Tools - Sleep (recommendation from Make support). Delays for few seconds.
Module 4: Microsoft 365. Send email with attachment. 

Some notes:
- I tried checking image questions that support one image or many (multiline appearance)
- Webhooks and Connections are good
- I suspect it's the HTTP Get File module causing the problem
- Different errors on Make and Integromat (attached)

I have ongoing support with Make but it's slow due to the time difference. Any support from the community is greatly appreciated it!

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi Steven and Esri Community!

Steven and I worked together to try to resolve this issue and I wanted to document some of our trouble shooting and resources used.

Steven was correct in his post that we were running into problems with the HTTP GET FILE module in Make (formerly Integromat). We also found that Make Support was correct in that the issue was the survey not being public. When using the GET FILE module, the web-hook could not access the attached image from the survey as the web-hook does not receive a valid token to an organization's ArcGIS Online. That being said, we tested the following as workarounds:

  1. https://community.esri.com/t5/arcgis-survey123-questions/survey123-email-attachments-using-gmail-in/...
    1. This solution worked for me, but unfortunately it did not work with Steven's Microsoft email
  2. Using the GET FILE module to attach a link to a web map in the email. The web map then displayed the images that were submitted in the survey

There are many other Esri Community posts that provide solutions to this issue (or similar issues), but I would like to note that if you have a non-public survey and work around this by generating a token from web traffic or other generation methods, this could potentially open the same vulnerabilities as having the survey public.

Happy Survey123-ing!

View solution in original post

0 Kudos
3 Replies
StevenDel_Castillo
New Contributor III

Latest reply from Make support below. I will be contacting Esri support since its is not an option to set our Surveys public.

"As I suspected, your response confirms that the file is not publicly available for direct download:

1. The URL can only be accessed with authentication to your Survey123 instance, so the HTTP module is unable to even access it.

2. The fact that the image does not automatically download after using a browser means that the HTTP module only downloads the web page and not the image itself

The only solution would be to find a way to make files publicly accessible and downloadable from Servey123. I would suggest reaching out to Survey123 support for assistance on this."

0 Kudos
by Anonymous User
Not applicable

Hi Steven and Esri Community!

Steven and I worked together to try to resolve this issue and I wanted to document some of our trouble shooting and resources used.

Steven was correct in his post that we were running into problems with the HTTP GET FILE module in Make (formerly Integromat). We also found that Make Support was correct in that the issue was the survey not being public. When using the GET FILE module, the web-hook could not access the attached image from the survey as the web-hook does not receive a valid token to an organization's ArcGIS Online. That being said, we tested the following as workarounds:

  1. https://community.esri.com/t5/arcgis-survey123-questions/survey123-email-attachments-using-gmail-in/...
    1. This solution worked for me, but unfortunately it did not work with Steven's Microsoft email
  2. Using the GET FILE module to attach a link to a web map in the email. The web map then displayed the images that were submitted in the survey

There are many other Esri Community posts that provide solutions to this issue (or similar issues), but I would like to note that if you have a non-public survey and work around this by generating a token from web traffic or other generation methods, this could potentially open the same vulnerabilities as having the survey public.

Happy Survey123-ing!

0 Kudos
cdevault_pickett
New Contributor III

Thank you for this information. I'm using Enterprise and everything seems to be working, getting a valid URL with a token. However when the HTTP Get File module is outputting an HTML file with the following. I'm guessing it's the same issue because this survey is not public. The email is sent correctly, just with this HTML file attached. 

*I also switched the survey to public and I am getting the same result.

 

<!DOCTYPE html>
<html>
<head>
  <script src="login/config/dojo.js"></script>
  <script src="jsapi/dojo/dojo.js"></script>
  <script>
    require(["login", "dojo/domReady!"], function(login) {
      login.run();
    });
  </script>
</head>
<body>
</body>
</html>

 

 

0 Kudos