You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在Power Apps中向Power Automate流发送上传图片时遇Run函数参数类型错误

解决Power Apps向Power Automate发送图片时的"Run function has some invalid argument type (image)"错误

问题原因

Power Apps中上传图片控件返回的是图像对象,而Power Automate流接收的参数需要二进制数据或Base64编码字符串,类型不匹配导致触发该报错。

解决方法

方法1:将图片转为Base64字符串传递

这是最通用的适配方式,适用于大多数场景:

  • 在Power Apps中修改调用流的Run函数,使用JSON()函数将图片对象转为包含二进制数据的Base64字符串:
    YourFlowName.Run(JSON(UploadedImage1.Image, IncludeBinaryData))
    
    (替换YourFlowName为你的流名称,UploadedImage1为你的图片控件名称)
  • 在Power Automate流中,添加「Compose」动作,用以下表达式将接收到的Base64字符串转为二进制数据:
    base64ToBinary(triggerBody()['text'])
    
    转换后的二进制数据可直接用于后续操作(如保存到SharePoint、嵌入邮件等)。

方法2:直接传递二进制数据(适用于Attachment控件上传场景)

如果使用的是Attachment控件上传图片,可直接传递二进制值:

  • Power Apps中调用流的代码改为:
    YourFlowName.Run(First(UploadedImage1.Attachments).Value)
    
  • 确保Power Automate流的输入参数类型设置为「二进制」,这样就能直接接收并使用该数据。

注意事项

  • 提前确认Power Automate流的输入参数类型:文本类型对应Base64字符串,二进制类型对应二进制数据。
  • 可在Power Apps中用Text(JSON(UploadedImage1.Image, IncludeBinaryData))预览转换后的内容,验证格式是否正确。

内容的提问来源于stack exchange,提问作者user12964760

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.29 12:14:55