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

如何在Power Automate中获取当前URL并读取URL参数值?

在Power Automate中获取带参数的URL并提取参数值

第一步:在Power Apps中传递URL到Power Automate流

  • 给提交按钮的OnSelect属性设置如下公式(假设下拉框控件名为Dropdown_Server):
    // 构造带参数的跳转URL
    Set(varTargetURL, "https://myformpath.example&serverName=" & Dropdown_Server.Selected.Value);
    // 跳转到目标URL
    Launch(varTargetURL);
    // 调用Power Automate流,传递完整URL
    YourFlowName.Run(varTargetURL);
    
    注:替换YourFlowName为你实际的流名称,Dropdown_Server为你的下拉框控件名。

第二步:在Power Automate中处理URL并提取参数

  1. 创建以Power Apps为触发源的流,添加一个文本类型的输入参数(比如命名为ReceivedURL),用来接收Power Apps传递的URL。
  2. 添加Parse URL动作,在“URL”输入框中选择触发源的ReceivedURL参数。
  3. 动作执行后,可直接通过表达式引用解析后的参数值,比如提取serverName的值:
    body('Parse_URL')?['queryParameters']?['serverName']
    
    你可以把这个值保存到变量,或者直接用于后续的流操作。

替代方案:直接在Power Apps中传递参数(更高效)

如果不需要传递完整URL,也可以直接把下拉框的选中值传给流,省去URL解析步骤:

  • Power Apps按钮公式:
    Set(varTargetURL, "https://myformpath.example&serverName=" & Dropdown_Server.Selected.Value);
    Launch(varTargetURL);
    YourFlowName.Run(Dropdown_Server.Selected.Value);
    
  • Power Automate流直接接收serverName参数,无需解析URL,直接使用即可。

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

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.07.17 06:20:00