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 / Type Mismatch Error: '...
Power Automate
Unanswered

Type Mismatch Error: 'StringDataType' expected 'FileDataType' in Copilot Studio (Flow Succeeded)

(0) ShareShare
ReportReport
Posted on by 4

Environment:

  • Platform: Microsoft Copilot Studio

  • Action: Power Automate Flow (Resume Builder Flow)

  • Trigger: "When Copilot Studio calls a flow"

  • Key Components: "Run a prompt" (AI Builder) within the flow.

The Issue:
I am experiencing a critical mismatch between Copilot Studio and Power Automate. When my agent triggers a flow to process a resume, the flow executes successfully in Power Automate (Status: Succeeded), but the Agent returns an error immediately.

The Error Message:

The parameter with name 'resume' on flow 'Resume Builder Flow' evaluated to type 'StringDataType', expected type 'FileDataType'. Error Code: FlowActionBadRequest.

Current Setup:

  1. Question Node: Using File Entity with "Include metadata" enabled.

  2. Power Fx Mapping: Passing the file to a flow input named Existing Resume using:
    { contentBytes: Topic.ResumeFile.Content, name: Topic.ResumeFile.Name }

  3. Flow Trigger: The input Existing Resume is correctly set to the File type.

  4. Flow Logic: I use a "Run a prompt" component. Inside this component, I pass Existing Resume.contentBytes into a prompt variable named resume.

2.png
3.png
1.png

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)
  • Sunil Kumar Pashikanti Profile Picture
    1,994 Moderator on at
     
    Your flow actually succeeds, but Copilot Studio rejects the response before it can be consumed because of a type contract violation at the Copilot --> Flow boundary.

    In short: Copilot Studio expects a FileDataType end‑to‑end, but your Power Automate flow (specifically the Run a prompt / AI Builder step) implicitly coerces the file input into a string, breaking the schema that Copilot Studio enforces. This is a known integration gap between Copilot Studio File entities and AI Builder prompts.
     
    Why this happens
    Copilot Studio File entities must remain FileDataType
    Passing ExistingResume.contentBytes into Run a prompt converts it to StringDataType
    Power Automate allows this internally --> Flow succeeds
    Copilot Studio validates output schema strictly --> Agent fails immediately
     
    Supported Fix
    Do NOT pass contentBytes directly to “Run a prompt”.
    Instead:
         Pass the File object untouched into the flow
         Use the file input directly inside AI Builder
              Set the prompt variable type to File
              Bind it to Existing Resume (not .contentBytes)
         Let AI Builder handle file parsing internally
    This preserves FileDataType and keeps Copilot Studio satisfied.
     
    What will NOT work
    Passing { contentBytes, name } manually
    Mapping .contentBytes to prompt inputs
    Using Compose between Copilot and Prompt
    Returning strings when Copilot expects File
     
     
    ✅ If this answer helped resolve your issue, please mark it as Accepted so it can help others with the same problem.
    👍 Feel free to Like the post if you found it useful.
     
     
     
     
  • VS-26030531-0 Profile Picture
    4 on at
    @Sunil Kumar Pashikanti Thank you for your assistance.

    I discovered that I had incorrectly configured the output parameter of the flow, but I have now resolved the issue.

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
Valantis Profile Picture

Valantis 641

#2
Vish WR Profile Picture

Vish WR 640

#3
Haque Profile Picture

Haque 495

Last 30 days Overall leaderboard