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 / How can I extract text...
Power Automate
Unanswered

How can I extract text from PDF files stored in SharePoint using Microsoft Power Automate without relying on third-party OCR services, and directly provide the file to either ChatGPT or AI Builder for text extraction and summarization?

(1) ShareShare
ReportReport
Posted on by 8

I'm working on a project to extract text from PDF files uploaded to a SharePoint document library using Microsoft Power Automate. However, I don't have access to third-party OCR services. Is there a way to directly upload the PDF file or its URL to either ChatGPT or AI Builder in Power Automate for text extraction and provide a summary? I know AI builder is costly so i want to use chatGPT for it. Any suggestions or guidance on achieving this using built-in actions or connectors in Power Automate would be greatly appreciated. Thank you.

Categories:
I have the same question (0)
  • hammadyounas007 Profile Picture
    8 on at

    I'm working on a project where I need to extract text from PDF files uploaded to a SharePoint document library using Microsoft Power Automate. However, I don't have access to third-party OCR services. Is there a way to directly upload the PDF file or its URL to ChatGPT in Power Automate to extract text and provide a summary? Any suggestions or guidance on how to achieve this using built-in actions or connectors in Power Automate would be greatly appreciated. Thank you.

  • takolota1 Profile Picture
    4,980 Moderator on at

    @hammadyounas007 

    This template OCRs a chosen PDF file, creates a replica text layer output & then passes that text to a GPT prompt.

    https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Extract-Data-From-PDFs-and-Images-With-GPT/td-p/2201345

    The OCR & GPT actions do consume AI Builder credits, but you should be able to atleast get a couple hundred PDFs through it with only the 5,000 AI Builder credits provided with the Power Automate premium license.

  • hammadyounas007 Profile Picture
    8 on at

    @takolota  I have the pdf in attachments, How can I give it AI Builder?

    I have tried to make the following flow. Can you guide me How can i pass the attachment  to ChatGPT?

    image.png
  • takolota1 Profile Picture
    4,980 Moderator on at

    @hammadyounas007 

    If you are trying to pass it to GPT4 Vision or GPT4o then it can only accept images. So you would need to use the Adobe connectors to convert the PDF to an array of images base64 or use a custom Azure Function to do the same. Then you could feed those images base64 to the HTTP call to GPT.

     

    Or you could use my previous template that only pulls the PDF text with an OCR action.

  • hammadyounas007 Profile Picture
    8 on at

    @takolota  Can you modify your previous template to get attachment from the sharepoint not outlook? i am facing that issue on that. But I have the document which have more information not invoice

  • takolota1 Profile Picture
    4,980 Moderator on at

    @hammadyounas007 

    There is a SharePoint Get file content action you can switch out the OneDrive action for. Then just add the dynamic content for the file content output to the OCR action.

    As for setting up for a different type of document, you can change the prompt to request different data from a different document.

     

     

    Also if you want to use Azure GPT4o, I just released a new template for that: https://powerusers.microsoft.com/t5/Power-Automate-Cookbook/Extract-PDF-Data-With-GPT4o/m-p/2805514#M2882

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard