Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Convert SharePoint List Attachments to PDF

(0) ShareShare
ReportReport
Posted on by 13

Hi, I'm completely new to Power Automate and don't really know where to start.

 

I have a SharePoint list and each item will have one jpeg file attached to it.  I'm trying to create a flow so that every time a new list item is created, the jpeg attachment is converted to a pdf file and the pdf file is added to the list item as a second attachment.

 

I have signed up for Adobe PDF Services but after hours of trying different things I'm getting nowhere.

 

Can anyone point me to any example flows so that I can learn?

 

Thanks you.

 

  • AlexEncodian Profile Picture
    4,409 Super User 2025 Season 1 on at
    Re: Convert SharePoint List Attachments to PDF

    @Supertension 

     

    Hi David, apologies I dont see messages unless i am tagged in them.

     

    This is about data structure. The Get attachments action can return multiple attachments. In order for that to work, it has to return an array of attachments....because it is designed that way, it returns an array even if you have only a single attachment (like you suggested in your case).

     

    Since you are then passing the array to the next action, Power Automate will automatically put a for each loop around it i.e. it will loop through the array even if the array has only a single item in it.

     

    To avoid this, you can use the first() function which returns the first item in the array. In your get attachment content action, instead of inserting the dynamic data straight from get attachments, insert an expression. The expression would be first() and within the brackets you insert the dynamic value of the previous action.

  • Supertension Profile Picture
    13 on at
    Re: Convert SharePoint List Attachments to PDF

    Hi Alex,

     

    Thank you so much.  I managed to get everything to work first time using Encodian's convert to PDF.

     

    You said I could use a first() expression.  Could you please so me how to do this?  I have a attached a copy of my flow so you can see what it look like just now but I's like to simplify it to just deal with one attachement per list item if possible.

     

    Thank you again.

     

    David 

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1