cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ea1409
Frequent Visitor

How to upload multiple attachments to the attachment column of a sharepoint list

Hello, how are you? I wanted to tell you about something I have been trying for days, what happens is that, I have a list that is not connected to any editable form control, so I planned to take all the data from the list with the path function and that it will return the ID to me and then send that ID to a flow but to avoid so much repetition I decided better to do this process with a flow button and I ask for the data in power apps and I run it when the user clicks on upload information.

 

completa interfaz.PNG

 

I have a control to attach a single file without any connection to a form that I use so that the user uploads the amount of files he needs, after this I pass this information to a gallery where in a text label I show the name of the file and in a hidden image I get the value of said file, I create a collection and the items I have are the name of the file and the value of the gallery file

 

coleccion.PNG

I have a flow to which I pass all the information that should go in the list
In the flow I initialize the variables

 

flujo.PNG

 

but when I receive the attached data I follow the steps that I found in the excellent Razza tutorial

 

https://www.youtube.com/watch?v=r3UC3TMXhlI 

 

I know that to bring this to power automate I must parse all these values ​​to JSON and include the binary data.

 

I receive the attached data as a string and then I convert it to JSON

 

flujo comversion jon.PNG

 

What happens is that I don't know how to separate the JSON traversal so that the File Name is taken to the required field and the content of the file, as well as it appears in the video, I don't know if he uses a function something to traverse the Json and just get the element where the name is found and split it and get where the value is, does anyone know how it is possible to do this to upload multiple files to the sharepoint attachment columns?

 

problema del flujo.PNG

As I mentioned, I base myself on the video of Razza but it cannot work so that several attachments are taken to a single item in the sharepoint list

 

https://www.youtube.com/watch?v=r3UC3TMXhlI 

 

Any information that you can give me, I will be eternally grateful, thank you very much 🙂 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
ChristianAbata
Super User
Super User

hi @Ea1409  I made a video related to multiple attachments, I hope this can helps you

 

Aprende a usar múltiples archivos adjuntos en español 2021 - YouTube



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

2 REPLIES 2
ChristianAbata
Super User
Super User

hi @Ea1409  I made a video related to multiple attachments, I hope this can helps you

 

Aprende a usar múltiples archivos adjuntos en español 2021 - YouTube



Did I answer your question? Please consider to Mark
my post as a solution! to guide others :winking_face:

Proud to be a Flownaut!


If you want you can follow me at www.christianabata.com Quieres contenido en español? Síguenos en Power Automate LA

View solution in original post

 

@ChristianAbata  Thank you very, very much, thanks to you I was able to find the solution to the step that was missing ovy to complement it so that more people can know:
what I was missing was what you explained in the video of minute 20:47
We need the json structure to be able to, so to speak, start and be able to obtain the properties that we define from power apps, then I am going to name step by step what I did, my native language is Spanish, sorry if some words are not called that way when the flow is created:

 

1. I followed all the steps of the Razza video until minute 8:50, I took control of the file attachment, I made the necessary changes in the gallery (because in my case I do not need the title or the date field because these fields are I ask from the power apps instance), and the only thing that I take to the collection is the name of the file and the content and I convert this to binary

 

2.I create a separate flow which will be triggered from power apps

1.PNG

 


2.1 I receive the collection with the name of each file and its value in a string variable

2.2 Here I follow the steps of @ChristianAbata where in the video of her from minute 20:47 https://youtu.be/hhm3hR3HnFo?t=1244 

3. I create a step to which I assign a data operation in my step in Spanish it is called redact but in English this step is called Compose.

* This is very necessary to be able to obtain the structure of the JSON and to be able to start entering its properties.

 

Note: the properties in this case will be the names that we put to the items in the collection from power apps exmaple; collect (attachment_data; {first_property_name: value; Second_property_name: value; .......}

2.PNG

 


4. We assign the flow we have just created to a button and we recommend that we attach a single file, preferably an image that does not have so much binary data, in order to continue with the next step.

5. We verify that the flow is executed correctly and we go to the section where the executions of our flow are shown, we find the last execution and access it

 


6.Here power automate shows us how the data was entered in the Write or COmpose step, we go there and copy the structure that the step threw us

 

3.PNG

 

7. After this we only have now if we build our Official flow, in my case send all the data from the list as parameters but the section that interests us is the attachments, then here, I received the attachments

 

8. I received all the parameters and when I got to the attached data I received them as we did in the previous test flow, I received them as a String:
a) Then in the next step I made a COmpose or Write to which I pass this variable String where the entire collection is contained
b) then I do a data operation step that in Spanish is called JSON file analysis, as input I pass what came out of the Drafting step or the COmpose and as structure I paste what I got from step 6

 

4.PNG

 

9.After (in my case) I create the element of the list but there they can be done in several ways, bring the Id that a Patch function gives us, of the last element entered or, create the element with the names contained in the collection. .. etc.

10. I create a step that in Spanish in power automate is Ambito, and then I tell it to create an instance for me to apply to each of the elements, this intermediate step asks me for an exit and what we are going to pass is the whole body of what came out of step 8. b)

 

5.PNG

 

11. Here what I do is take these attachments to a Sharepoint list where I am asked for the name of the files, the content and the ID of the element to which we are going to enter the attachments,

 

12. Now in the name of the file I could be able to name what had been placed in the collection (I took this data from the step in which the data was analyzed to JSON step 8. b), but the content was It was in JSON format and in order for the content of the file to be regenerated and we could see it correctly in sharepoint it was necessary to process it with the formula shown by Razza dataUriToBinary () the problem is that it only accepts a string as parameters

 

13. to solve the above I selected the variable that received the collection data at the beginning, but you can create it above in the initial steps but the important thing is that they are of type string and the content that we are going to put is the property of the JSON that have the content of the data attached

 

14. After putting this data in the stirng variable, now we can put it in the DataUritoBinary formula

 

6.PNG

 

And ready with this was that I was able to solve to bring the data to the sharepoint attachment column, I hope that it works for someone, thank you again for everything @ChristianAbata 

 

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (1,645)