Power Automate: Perform An AI Prompt On A PDF Document

Power Automate can be used to run an AI Prompt on a PDF document. It’s surprisingly easy to do. Just create an AI Prompt and add a document or file as an input. Then connect the AI Prompt to a Power Automate flow. It is excellent at extracting values from a PDF and returning them in a simple to work with JSON format.
Table of Contents
• Introduction: The Extract Skills From A Resume Automation
• Write An AI Prompt To Extract Technical Skills
• Input A PDF Document Into The AI Prompt
• Setup The SharePoint Document Library
• Analyze The PDF Document Using An AI Prompt
• Run The Power Automate Flow To Use GPT On A File
• View The Completed Power Automate Flow
Introduction: The Extract Skills From A Resume Automation
A human resources department uses a Power Automate flow and AI Prompts to extract skills from a job candidate’s resume.

Skills found on the resume are saved alongside the file in a SharePoint document library.

Write An AI Prompt To Extract Technical Skills
We will begin by writing the AI Prompt. Go to the AI Prompts menu in Power Automate and select Build your own prompt.

Name the AI Prompt Get Technical Skills From A Resume.

Then copy and paste this prompt into the prompt editor.
Extract the technical skills from the attached employee resume PDF. Focus on sections labeled “Skills”, “Technical Skills”, “Core Competencies”, or similar. Also, scan the entire resume for any additional mentions of technical skills in job descriptions or project details. Summarize the technical skills in an unordered list format with a line break after each skill. Do not include any text other than the skill names. |
Input A PDF Document Into The AI Prompt
We want to examine a pdf resume using the instructions in our prompt. Open the Input menu and add a new input variable. Select document or file input type. Name the input variable Resume PDF. Then upload a sample file for the prompt to operate on.
Insert the the Resume PDF input variable at the bottom of the AI Prompt.

Press the Test Prompt button and review the prompt response. Continue to refine the prompt until you get the desired output.

Press the save custom prompt button once you are satisfied with the results.

Setup The SharePoint Document Library
We want use the AI Prompt on a PDF resume stored in SharePoint. Create a new SharePoint document library named Candidate Resumes. Add a multiline text column to the library named Skills. This is where we will save the list of technical skills output by the prompt.

Get The PDF Document From SharePoint
Open Power Automate and create a new instant flow named Get Resume Skills Using AI Prompt.

Add a SharePoint – Get Files (properties only) action as the first step of the flow. Select the Candidate Resumes library we setup earlier.

Insert a SharePoint – Get File Content action after the Get Files action and use the value Identifier for File Identifier. It will make the Get File Content action appear inside of an Apply To Each loop. This is OK because it allows us loop over all of the files in the SharePoint library in one flow run.

Analyze The PDF Document Using An AI Prompt
Now that we have the file content all that’s left is to pass it into the AI Prompt. Insert an AI Builder – Crete Text With GPT Using A Prompt action into the flow. Select the prompt named Get Technical Skills From A Resume and use the value File Content in the Resume PDF field.

Then write the output of the AI Prompt to the document metadata using the SharePoint – Update File Properties action. Pass the ID value from the Get Files action and use the AI Prompt output Text in the Skills column.

Run The Power Automate Flow To Use GPT On A File
We’re done. Test the Power Automate flow to ensure it’s working.

The list of skills found in the resume are saved to the skills column in the SharePoint list.

View The Completed Power Automate Flow
Here is a screenshot of the completed Power Automate flow.

Did You Enjoy This Article? 😺
Subscribe to get new Power Apps & Power Automate articles sent to your inbox each week for FREE
Questions?
If you have any questions or feedback about Power Automate: Perform An AI Prompt On A PDF Document please leave a message in the comments section below. You can post using your email address and are not required to create an account to join the discussion.
Great work, Matthew.
I did a test on my tenant.
Temidayo,
I am glad it worked for you 🙂
The output