
Announcements
Hello Community,
I'm hoping someone can help me out here please.
I'm going to create a form that will have multiple questions where a file upload is needed and this will then generate a message in teams.
I've figured out how to post a link to the image in a teams chat but I'm stuck now when it comes to multiple:
This is the current flow I have setup:
Any help would be appreciated.
Hi @19Flash92,
Instead of a parse json you could also use expressions to retrieve the link each of the question. With this approach you don't need multiple parse json actions and an apply to each loop.
With a json function you can convert the answer of an upload question to an array. With an [0] you can retrieve the first item of that array. With the ['link'] reference you can get the link of that item.
An example expression would be:
json(outputs('Get_response_details')?['body/r2ad95efbfdfc4c7eae3a9d4ea69f20a1'])[0]['link']
Below is a example with HTML for the Teams channel message
Replace my question ids by your question ids.
<a href="@{json(outputs('Get_response_details')?['body/r2ad95efbfdfc4c7eae3a9d4ea69f20a1'])[0]['link']}">Click here to view the first upload</a><br>
<a href="@{json(outputs('Get_response_details')?['body/r437acd6a72e84184b203c34fc015dc38'])[0]['link']}">Click here to view the second upload</a><br>