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 / AI prompt using wrong ...
Power Automate
Suggested Answer

AI prompt using wrong input

(1) ShareShare
ReportReport
Posted on by 6
Hi,
 
When the following flow runs, it is supposed to  do the following:

- get files from a sharepoint folder
 
for each of those files
      - get file content
       - put content through an AI prompt to extract data
 
 
However, when I run the flow, the prompt returns the same output for every file which is wrong
  "get file content" outputs the correct information and the prompt is set to use the output from "get file content" but it doesn't, for some reason it keeps using the same file over and over.
Screenshot 2026-0...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (0)
  • trice602 Profile Picture
    16,294 Super User 2026 Season 1 on at
    can you please share your flow?  Paste in here.  Attachments rarely show up/
     

    ------------------------------------------------

     

     

    ⭐ If this was helpful, please like and check the box below "Does this answer your question" to help others find this too!

     

     

    Always glad to help! 💯💯💯💯💯

     

    Tom

     

    Follow me on LinkedIn - Thomas Rice, PMP | LinkedIn

  • David_MA Profile Picture
    14,840 Super User 2026 Season 1 on at
    In addition to sharing the flow within the post as @trice602 requested, please also share the AI prompt especially if you configured a custom prompt. Below is an example of a custom prompt I have. It is doing what I believe you have described you are going. Going through a document and extracting content. You'll see in my prompt I explicitly tell the AI how I want the response formatted when it replies. This has worked out very well so far.
     

    You are an AI system that extracts structured data from legal contracts. Analyze the provided contract text [text input] and return ONLY valid JSON. Do NOT include any explanation, formatting, or extra text.

    Return this exact JSON structure:

    {

    "Summary": string,

    "ContractingParty": string,

    "CounterParty": string,

    "StartDate": string,

    "EndDate": string,

    "ContractType": string

    }

    Rules:

    - Summary must be less than 150 words and written in clear business language

    - Dates must be in ISO format: YYYY-MM-DD

    - If a value cannot be found, return null

    - ContractingParty = the external entity (not your company)

    - ContractType = e.g., MSA, NDA, Service Agreement, Supply Agreement, etc.

    - Output MUST be valid JSON that can be parsed programmatically

    I also have a question. The title of your post says it is using the wrong input, yet in the body of your post you says the issue is with the output. How do you know it is using the wrong input? 

  • MM-05061025-0 Profile Picture
    6 on at
  • MM-05061025-0 Profile Picture
    6 on at
     
  • David_MA Profile Picture
    14,840 Super User 2026 Season 1 on at
    In my experience, you need to use the recognize text in image or document before you use the Run a prompt action. Withtout that, you are probably passing binary data to the run a prompt action. For your text input in the Run a prompt action, use the Full text output from the recognize text action. If the files include images or image-based pdfs, the recognize text action will perform OCR on the file in order to extract the text.
     
  • Suggested answer
    chiaraalina Profile Picture
    2,348 Super User 2026 Season 1 on at
     
    Can you please verify the dynamic content binding in the Run a Prompt is correct. Maybe also add a screenshot of the binding here. 
     
    Also, if Concurrency Control is enabled, please disable and try again.
     
    Is the repeated output correct for one specific file (always the same file)?
    Or is it generic/incorrect for all files (no file-specific content)?
     
    Let me know!
     
     

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 462

#2
Vish WR Profile Picture

Vish WR 256

#3
David_MA Profile Picture

David_MA 242 Super User 2026 Season 1

Last 30 days Overall leaderboard