web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Creating an item in a ...
Power Automate
Answered

Creating an item in a document library

(0) ShareShare
ReportReport
Posted on by 14

Hello to all,

 

I am posting this message today to ask for your help.

Indeed, I have a problem with my flow.

 

I try to create an item in a document library. I understood that it was impossible to add an item to a document library without an attachment (SPFileCollection.Add() error). However, there is no other way around it? It is impossible to add an item with an attachment with power automate?

 

Thanks in advance.

 

Jonathan Borel-Jaquet

Categories:
  • ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Jobojatdh 

    All you need is a file name and file content.  Can you explain a little more about your requirement?  Where is the file coming from?

  • Jobojatdh Profile Picture
    14 on at

    Sorry if I wasn't clear enough.

     

    I have a first list that contains fields and an attachment.

     

    When editing one of the items (when the status becomes "pending"), I would like to create a copy of this item in a document library with different fields and a PDF conversion of the images (attachments). I have everything I need to create an item in my document library, but I don't know how to do it.

    Capture d’écran 2022-05-24 191934.png

  • Verified answer
    ScottShearer Profile Picture
    25,331 Most Valuable Professional on at

    @Jobojatdh 

    After creating the PDF, use a OneDrive for Business Get file Content action.  Use that as the input for the SharePoint Create File action.

  • Verified answer
    Jobojatdh Profile Picture
    14 on at

    Ok I just understood...
    In my case, I have to create a file and then modify it to assign the different fields. Thanks for the help !

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 423

#2
11manish Profile Picture

11manish 308 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 177

Last 30 days Overall leaderboard