When a Survey123 form is submitted, a gmail module is triggered to send an email with the form data filled and all uploaded files (.pdf, .png, .jpg, etc) are added as attachments.
Current scenario: Watch Survey123 → HTTP download → Gmail
What is the problem & what have you tried?
Originally the files emailed fine, but after this past Monday (January 26) the form data is emailed fine and the attachments now only come through as .json error files. See screenshot below
I have tried:
chaning the size of allowable attachments on Survey123
deleting and re-adding the modules
deleting and recreating the webhook
deleting and recreating the connection
deleting and recreating the scenario
changing the owner of the Survey123 form
Error messages or input/output bundles
{"error":{"code":400,"message":"","details":["This operation is not supported."]}}
This code is attached in each test email as a .json file, one for every HTTP module I add in the scenario. The screenshot below shows one .json attachment because that version of the scenario had one HTTP module.
I can’t see how you’re mapping the results of the Survey123 app to the HTTP request, but I would guess that maybe you are using the wrong URL.
First of all, you don’t need a HTTP module for each file. The “Survey123 Watch Survey” module outputs an array named attachmentInfos[] that contains an object for each file. Just iterate that array and get the files via HTTP download. Then aggregate and map the aggregated array as Gmail attachment.
Thanks for the advice. I appreciate the feedback; unfortunately it only half-solved the problem. With your changes the email successfully sends with a single attachment, but not multiple including the customer signature which is necessary. Do you have any ideas on how to get this to send all attachments?
Now I see a completely different set of sample data in your scenario.
Unfortunately, I don’t have access to Survey123 to send dummy data to my Make workflow.
To suggest a better solution, please let me know:
Are all attachment fields single-item, or can users send multiple files in one field?
Could you please send me sample output data from the Watch Survey module (use dummy data for submission)?
Why I’m asking - if the attachmentInfo array adds new arrays for each field used, your mapping was correct and the only error I see now is incorrect mapping in the Send an email module.
But if attachmentInfo stores only some fields and the rest is stored in {{2.attachmentInfo.attachments}}, it will require a completely different approach.
What else you can do right away
Change the mapping in the iterator back to:
{{2.attachmentInfos}}
and in the Send an email module, toggle on the Map switch for Attachments and map it to Array output:
{{6.array}}
If each field stores only one file and all attachment fields are listed under attachmentInfos array it should solve your issue.
The first one is a Collection of Arrays containing a single Collection each (complex).
The second one is an Array of Collections (one collection for each attachment).
I’d stick with the latter.
I just used your scenario, set my connections to Survey123 and Gmail, and it worked perfectly.
What is the output of the Survey123 module?
What is the result of the Aggregator? Can you see the file name?
You were right to ask about the HTTP module; the url is not working like you describe. I’m not sure what else to do there because someone else that that was the correct item to have.
can you show a screenshot of what the Survey123 module returns as output? Cause that error suggest you cant download files using the link you mapped in the Get a File module. Maybe the links are temporary and expire after some time?