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

Community site session details

Session Id :
Power Automate - Building Flows
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

I have the same question (0)
  • ScottShearer Profile Picture
    25,240 Most Valuable Professional on at
    Re: Creating an item in a document library

    @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
    Re: Creating an item in a document library

    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,240 Most Valuable Professional on at
    Re: Creating an item in a document library

    @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
    Re: Creating an item in a document library

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 788 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 452 Moderator

#3
developerAJ Profile Picture

developerAJ 302

Last 30 days Overall leaderboard