Hi,
I have a document library which stores a file only. The name of the file is the same name as the title on a SharePoint List - I need to run a flow that will assign that doc library attachment to the specific SharePoint list item where the attachment name = title.
Any help would be great - thanks!
Solved! Go to Solution.
Hi @Blurryface
Follow the steps below
1. I had used the trigger 'When a file is created or modified'
2. Add the action 'Get file content using path' to get the contents of the file. For the 'File Path' property pass the 'Full Path' from the above trigger action.
3. Use the action 'Create Item' to create the item. For title choose 'Name' property from the trigger condtion.
4. Add the action 'Add Attachment'. Choose the following properties
1. Id - Choose the ID from the 'Create Item' output.
2. File Name - Choose the 'File name with extension' from the trigger output.
3. File Content - Choose the output from the 'Get file content' action added in step 2.
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
What is the trigger are you using? When a new document is uploaded to library?
In the flow you can use Get Item and in the filter query you can write title = '<select name property from Library trigger>'
Hi @Blurryface
Follow the steps below
1. I had used the trigger 'When a file is created or modified'
2. Add the action 'Get file content using path' to get the contents of the file. For the 'File Path' property pass the 'Full Path' from the above trigger action.
3. Use the action 'Create Item' to create the item. For title choose 'Name' property from the trigger condtion.
4. Add the action 'Add Attachment'. Choose the following properties
1. Id - Choose the ID from the 'Create Item' output.
2. File Name - Choose the 'File name with extension' from the trigger output.
3. File Content - Choose the output from the 'Get file content' action added in step 2.
Hope it helps, please like it or mark it as a solution if it resolves your clarification or issue
-Sudharsan K...
I also need to copy all of the file attachments from a document library to a list that's already created (and contains the same columns). Is it possible to create a flow that will copy ALL of the attachments for several different line items?
HI @sudharsan1985 , what if the files are stored in an attachment control in a PowerApps app?
I have found really usefull your detailed reply and I would like to thank you for your assistance. Great job and thanks for your support!
User | Count |
---|---|
89 | |
37 | |
26 | |
13 | |
12 |
User | Count |
---|---|
128 | |
53 | |
38 | |
26 | |
21 |