Skip to content

[Bug] edit_flow / update_flow crash with "Cannot use 'in' operator to search for 'authentication'" when a Compose action's inputs is a string #441

Description

@mightydadape

Plugin

power-automate

Plugin Version

2.3.1

Skill / Command

flowagent MCP tools edit_flow and update_flow (also reproduces via preview_updateupdate_flow)

Bug Description

Any write to a flow that contains a Compose action whose inputs is a plain string expression (e.g. "inputs": "@body('Some_Http_Action')") fails with a TypeError before anything is written. Read tools (get_flow, preview_update, edit_flow with dryRun: true) work fine on the same flow — only the write path throws. The flow was created in the Power Automate designer; string-valued Compose inputs are the designer's normal output, so this blocks writing to a large class of existing flows.

Steps to Reproduce

  1. Have an unmanaged solution cloud flow with a Compose action like:
    "My_Compose": { "type": "Compose", "inputs": "@body('Get_Data')" }
  2. Call edit_flow on that flow with any operation — dryRun: true succeeds and returns a diff + previewToken.
  3. Re-call edit_flow with the previewToken (or call update_flow with the full definition).

Expected Behavior

The edit is applied (with the usual auto-backup), or a validation error specific to my change.

Actual Behavior

{"code":"tool-error","message":"Cannot use 'in' operator to search for 'authentication' in @body('Get_Data')","errorName":"TypeError"}

Nothing is written. It looks like a pre-write pass iterates actions and does 'authentication' in action.inputs without first checking that inputs is an object — for Compose actions inputs is commonly a string.

Relevant Logs / Screenshots

  • edit_flow (apply): {"code":"tool-error","message":"Cannot use 'in' operator to search for 'authentication' in @body('Get_Data')","errorName":"TypeError"}
  • update_flow (with previewToken from preview_update): same error.
  • Workaround used: updated the flow definition via the Dataverse Web API (workflow.clientdata).

Environment

  • OS: macOS 15 (Darwin 25.5.0)
  • Plugin: power-automate 2.3.1 (flowagent MCP server bundled with the plugin)

🤖 This issue was created using the /report-issue skill.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions