Mar 29 2020 11:49 PM
Hi,
I have a list of over 300 items and I would like to transform it into a library or at least switch the attachments. How can I do it ?
Thans for your help
Mar 30 2020 01:53 AM
Mar 30 2020 02:49 AM
I tried with Power Automate but I cannot recover the contents of the file.
Thanks
Mar 30 2020 04:40 AM
@Ben423 hopefully this will help. In this example we will copy the bell-pepper3.jpg attachment from a list to the Documents Library.
I've started with a manual trigger but you could use a recurrence schedule if you wanted it to copy items every day for example. The first action is a SharePoint Get items to get all the items from the list. Next, add an Apply to each control and select value from the dynamic content box.
Then add a condition of Has attachments is equal to true. Leave the red If no channel empty. In the
green If Yes channel add a SharePoint Get attachments action, selecting ID from the dynamic content. Next add a SharePoint Get attachment content action, selecting ID and Identifier from the dynamic content.
Add a SharePoint Create file action. It will wrap itself in an Apply to each control. Make sure for the File Name field that you select DisplayName from the Get attachments section of the dynamic content. For the File Content field select Attachment Content from the Get attachments section of the dynamic content.
When you run the flow each attachment will be created in the documents library:
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Mar 30 2020 05:35 AM
Thanks @RobElliott
I did as requested but I have the impression that it cannot find the attachments saved in the list...
The flow does not indicate an error.
Thanks
Mar 30 2020 05:37 AM
@Ben423 can you post screenshots of your flow?
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Mar 30 2020 05:51 AM
@Ben423 your condition has Oui as the criteria which I think is incorrect. In English it is Has Attachments is equal to true so in French that would be vrai.
I'll look at the rest of it but that was the first thing I saw,
Rob
Los Gallardos
Microsoft Power Automate Community Super User
Mar 30 2020 07:06 AM