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 / Create PDF in Sharepoi...
Power Automate
Answered

Create PDF in Sharepoint from SQL Server

(1) ShareShare
ReportReport
Posted on by 170
Hello everyone,
 
I am trying to create a PDF file in a Sharepoint folder using the content that is stored in my SQL Server on a column with varbinary(MAX) has its type and looks like this with the ID and PdfContent columns.
 
 
Then I am using a Get Row (V2) to fetch it like this

 
And it is giving me this output

 
Here I think it might be where the errors start because what is in the PdfContent here does not start the same way as the one in the database, so maybe they are different types I don't really know.
 
But still I move on and try and create the PDF in the Sharepoint with the PdfContent like this

 
I'm not sure if using 'base64ToBinary' is the correct expression to use and even if the value is being passed correctly to it, but it is not working like this.
 
In the Sharepoint folder the PDF is being created but it only has 50 bytes and when I try to open it, it gives this error so it is really not working.

 
I just want to get the PDF to be able to attach it to an email, so if anyone has already done this and could help I would really appreciate it.
 
Thanks in advance everyone
 
 
Telmo Ferreira
Categories:
I have the same question (0)
  • Verified answer
    SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at
    Firstly, if PdfContent from SQL is already in Base64 format, use, you need to use base64tobinary as an expression like this. Currently (as per your screenshot) it has been used as a text.
     
    If the PdfContent is in binary format, pass it directly to the Create file action without using base64ToBinary.
     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard