i'm using MS Flow to grab data from a Survey in Survey123, but the survey has photos. Can i use MS Flow to grab these photos and add them to the SQL report?
Hi Jevita,
Currently, downloading an attachment in Flow is somewhat difficult. Here is an example workflow:
The steps are:
For steps 1 & 5, you will also need to provide a token of a user with the ability to query the feature service – Flow currently cannot access the token of the submitting user.
We are working to make this less cumbersome in the future.
does this work if the images question is in a repeater?
This basic technique would work for images in related records - the main difference is the URLs used in steps 1 & 5 should refer to the layer number of the repeat table in the service.
James, Can you export the flow?
Hi James,
Flow doesn't seem to be exposing the "attachmentInfos" "id" field. How do I get to the attachment id?
Thanks
Nicholas
Hi Nicholas,
It looks like you may have supplied the wrong payload to the queryAttachments step.
Today I am going to try a recreate your Flow to use attachments from a Survey. We had issues with the Survey 123 Connector but we want to use Flow for handling event escalation and email notification from filtered surveys. Do you know if there has been any progress on the MS Flow and Survey 123 issues in the past few months?
Hi Richard,
There have not been any updates regarding Survey123 Connector/Attachment interactions in Flow.
Okay thanks for the response... I was able to get a prototype flow together to grab photos an put into a template by following the steps in your flow. I was surprised how relatively user friendly Flow is. I think I will start incorporating it into more of my projects.
Hi James Tedrick,
I am trying to use MS Flow to save survey123 attachments to a OneDrive folder. To try and understand and get the process working I am trying to follow the sample json file using the same feature service as listed in the file. I am just trying to return the attachment for objectID 1 from that feature service.
When I get to the "Get Attachment" step it doesn't seem to be retrieving the attachment. The attachment appears on the e-mail with the correct image name and extension but the file size is only 1kb, it its correct file size (it is also not viewable because it has nothing in the file).
Here is what I have in the "Get Attachment"
The get attachment code view
And here is the code view of the "Send an email"
Any ideas on what I am missing to get the actual data in the attachment?
Regards
Steve
I worked out what my issue was, I was hard coding the objectID in the "Query Attachments" step but but then using "@{triggerBody()?['objectid']}" in the "Get Attachment" URI instead of the hardcoded objectID from the first step.
So now that I have the process working, hopefully I can adapt it to work with my feature layer.
サインインしたメンバーは投稿、更新のフォローなどができます。初めてですか?無料アカウントを登録してください。
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.