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 / Copilot Studio / Agent Erroring When Ca...
Copilot Studio
Suggested Answer

Agent Erroring When Calling Basic File Input Flow

(0) ShareShare
ReportReport
Posted on by
I have a very basic agent flow setup. There are two actions, to get a file from the agent, then return that same file. This is simply a test to troubleshoot what's wrong. The agent call the flow, then asks for the file saying "Please provide the file details including the file name and the file content bytes." Then the agent errors saying something basic "Sorry, something went wrong. Error code: SystemError. Conversation ID: <ID>. Time <Time>." This flow works when using the test button in the designer, but not when my copilot agent calls it. Why? I feel like this should be a super basic flow. I do not see any runs besides the tests within the Power Automate logs.
1. "When an agent calls the flow" action
{
  "type": "Request",
  "kind": "Skills",
  "inputs": {
    "schema": {
      "type": "object",
      "properties": {
        "file": {
          "description": "Please select file or image",
          "title": "File content",
          "type": "object",
          "properties": {
            "contentBytes": {
              "type": "string",
              "format": "byte"
            },
            "name": {
              "type": "string"
            }
          },
          "x-ms-content-hint": "FILE",
          "x-ms-dynamically-added": true
        }
      },
      "required": [
        "file"
      ]
    }
  }
}
2. "Respond to agent" action
{
  "type": "Response",
  "kind": "Skills",
  "inputs": {
    "schema": {
      "type": "object",
      "properties": {
        "file_output": {
          "title": "File output",
          "description": "",
          "type": "string",
          "format": "byte",
          "x-ms-content-hint": "FILE",
          "x-ms-dynamically-added": true
        }
      },
      "additionalProperties": {}
    },
    "statusCode": 200,
    "body": {
      "file_output": "@{triggerBody()?['file']?['name']}"
    }
  },
  "runAfter": {}
}
I have the same question (0)
  • Suggested answer
    chiaraalina Profile Picture
    2,489 Super User 2026 Season 1 on at
     
    I believe the issue is occurring before the flow is actually triggered, which would explain why you don't see any runs in Power Automate./Agent Flow
     
    The message:
    "Please provide the file details including the file name and the file content bytes."
     
    Usually means Copilot Studio isn't able to populate the required file object automatically. Instead of receiving a valid file payload, the orchestrator is treating contentBytes and name as missing inputs and asking the user for them. 
    Since those values can't realistically be provided in chat, the tool call fails and the agent returns a generic SystemError.
     
    If you're using this flow as an Agent Flow/Tool, verify that the file input is explicitly mapped from the uploaded attachment rather than relying on AI filling the values.
     
    Could you share how the flow input is configured in the Copilot Studio Tool/Agent Flow configuration?
     
    Maybe also try a minimal validation test:
    Before attempting to return a file, create another simple flow:
    Input: File
    Output: Text
    Return: File received: @{triggerBody()?['file']?['name']}

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Copilot Studio

#1
11manish Profile Picture

11manish 130

#2
Valantis Profile Picture

Valantis 119

#3
Haque Profile Picture

Haque 107

Last 30 days Overall leaderboard