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 / Using AI to read docum...
Power Automate
Unanswered

Using AI to read documents & then output data to a specific table in excel

(0) ShareShare
ReportReport
Posted on by 17
I am trying to create a flow that runs when a number of pdf's are added to a file in one drive, then passes the pdf's through an AI agent, and then depending on if the AI has outputed any data, paste that info into a table. If the AI dosent output any data, it should add the name of the file into another table.
 
The problem i am having is that the condition i have made after the Process Documents (see picture) seems like it is treating all of the document that have gone through the AI as a whole, and hence isnt inputing data into the correct tables based on the returned value of each individual PDF.
 
I have made a dummy excel sheet as an example, i want the flow to recognise that the AI has returned no data for coloum 1, and instead of filling in the rest of the coloums, it should put the name of the file into Table 2, and it should do it for each individual document. (each individual document is pasted on a new row).
 
Currently, I am getting what is shown in the dummy excel sheet, and even though specified in the condition it is still putting data into the wrong table.
 
Also i have tried using an 'apply to each function' after the workflow action, however as the file dosent conatin the documents as they havent been uploaded there is no dynamic content to enter into the 'apply to each function'. 
 
Has anyone got any solutions / tips ?
Screenshot 2026-02-16 160553.png
Screenshot 2026-02-16 160606.png
Screenshot 2026-02-16 160622.png
Categories:
I have the same question (0)
  • David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    I am only posting a response since this has open in the forum since February. I don't have an answer for you, but looking at your post and the image of your flow, I see some potential issues. This may be why nobody has replied as they need more information.
    • First, you state that you want to create a flow that runs when a number of pdf files are added to a file in OneDrive. I assume that is a typo and you meant when files are added to a folder, or you meant when files are created in OneDrive.
    • In either case, why are you using the trigger when a file is modified instead of when a file is created?
    • What is the expression on the right side of the condition?
      • It looks like you might be trying to check if the body of the AI Builder action contains data. If so, you would want to set up the condition like this and use the empty() expression on the body Process Documents action to see if it returns false (meaning it contains data). This is not the exact expression since it is from a different action, but this is the type of expression you would use on the left: 
        empty(outputs('Analyze_sentiment')?['body/responsev2/predictionOutput/result/documentScores'])
    • Since I have not used the Process Documents AI builder action, I don't know what it returns. You also don't show how you have the two Excel actions configured to add a row with the data that is returned from the AI action. I suggest you add a screen shot of how these actions are configured.
    If you have since figured out the issue, please post what you did to resolve the issue, and I will mark your response as answering the post to close it out.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard