微软电源自动化

Microsoft Power Automate 使您能够自动化您最喜欢的应用和服务之间的工作流,以获取通知、同步文件、收集数据等。它提供了超过 140 种服务,这些服务具有易于实施的预定义流程。

您可以使用 Postman 配置 Microsoft Power Automate 以监控运行结果、查看团队和特定于集合的活动源、备份您的 Postman 集合以及使用 Microsoft Power Automate Webhook URL。

配置 Microsoft Power 自动化集成

  1. 选择主页

    邮递员主页

  2. 选择集成

    邮递员主页

  3. 搜索并选择Microsoft Power Automate

将团队活动源添加到 Microsoft Power Automate

您可以在活动源中跟踪对收藏和团队内部所做的更改。与 Microsoft Power Automate 集成后,您可以自由连接 Outlook、Gmail 等电子邮件服务或自定义 SMTP 服务。您还可以选择将 Twilio 设置为在对您的提要进行更新时向您发送短信。

要将团队活动源添加到 Microsoft Power Automate:

  1. 选择添加集成
  2. 团队活动源页面上,输入 Webhook URL 以将团队更新发送到此特定 URL。
  3. 选择添加集成

Microsoft_team_activity

在 Microsoft Power Automate 中备份 Postman 集合

备份您的邮递员收藏以妥善保管非常重要。Microsoft Power Automate 使用 Box(一种基于云的存储解决方案)等服务帮助您做到这一点,但您也可以使用它来备份到您的自定义 DB2 实例。

要在 Microsoft Power Automate 中备份 Postman 集合:

  1. 选择添加集成
  2. 备份您的邮递员收藏页面上:
    • 选择集合。
    • 输入通知 URL。
    • 输入此集成的标识符。
  3. 选择添加集成

Microsoft_flow_backup

请参阅 Microsoft Power Automate 中的收集活动源

您可以在活动源中查看队友对您的 Postman 收藏所做的所有更改。与 Microsoft Power Automate 集成后,您可以自由连接 Outlook、Gmail 等电子邮件服务或自定义 SMTP 服务。您还可以选择将 Twilio 设置为在对您的提要进行更新时向您发送短信。

要在 Microsoft Power Automate 中查看收集活动源:

  1. 选择添加集成
  2. 团队活动源页面上,输入 Webhook URL 以将团队更新发送到此特定 URL。
  3. 选择添加集成

发送收集活动提要配置

在 Microsoft Power Automate 中发送监视器运行结果

Postman Monitors 使您能够按计划运行您的收藏,而无需任何人工干预。通过 Microsoft Power Automate 集成,您可以通过连接到其他可用服务来使用这些结果。

要将监视器运行结果发送到 Microsoft Power Automate:

  1. 选择添加集成
  2. 在“监视器运行结果”页面上,选择要发送到 Microsoft Power Automate 的监视器。
  3. 选择添加集成

Microsoft_mon_runs

您还可以配置高级选项,以在监视器运行完成或发生三个故障以及这些故障成功完成后第一个监视器运行时向您发出警报。

您的集成已成功设置。现在,无论何时运行监视器,您都应该在 Microsoft Power Automate 移动应用上收到通知。

查看通知

获取 Microsoft Power Automate Webhook URL

登录到Microsoft Power Automate,然后转到My FlowsCreate from Blank在右上角选择。

创建连接器

要添加第一步,request请在搜索栏中输入,然后Request / Response - RequestTriggers列表中选择。

选择触发器

对于不同类型的集成,JSON 架构会有所不同。下面显示了每个模式使用的模式。

监控运行结果

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {},
  "id": "http://example.com/example.json",
  "properties": {
    "collection_name": {
      "id": "/properties/collection_name",
      "type": "string"
    },
    "collection_uid": {
      "id": "/properties/collection_uid",
      "type": "string"
    },
    "environment_name": {
      "id": "/properties/environment_name",
      "type": "string"
    },
    "environment_uid": {
      "id": "/properties/environment_uid",
      "type": "string"
    },
    "metrics": {
      "id": "/properties/metrics",
      "properties": {
        "errors":
          "id": "/properties/metrics/properties/errors",
          "type": "integer"
        },
        "failedTests": {
          "id": "/properties/metrics/properties/failedTests",
          "type": "integer"
        },
        "passedTests": {
          "id": "/properties/metrics/properties/passedTests",
          "type": "integer"
        },
        "requestCount": {
          "id": "/properties/metrics/properties/requestCount",
          "type": "integer"
        },
        "totalLatency": {
          "id": "/properties/metrics/properties/totalLatency",
          "type": "integer"
        },
        "warnings": {
          "id": "/properties/metrics/properties/warnings",
          "type": "integer"
        }
      },
      "type": "object"
    },
    "monitor_name": {
      "id": "/properties/monitor_name",
      "type": "string"
    },
    "monitor_uid": {
      "id": "/properties/monitor_uid",
      "type": "string"
    },
    "user_id": {
      "id": "/properties/user_id",
      "type": "string"
    },
    "user_name": {
      "id": "/properties/user_name",
      "type": "string"
    }
  },
  "type": "object"
}

收藏和团队活动提要

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {},
  "id": "http://example.com/example.json",
  "properties": {
    "action": {
      "id": "/properties/action",
      "type": "string"
    },
    "collection_name": {
      "id": "/properties/collection_name",
      "type": "string"
    },
    "collection_uid": {
      "id": "/properties/collection_uid",
      "type": "string"
    },
    "message": {
      "id": "/properties/message",
      "type": "string"
    },
    "model": {
      "id": "/properties/model",
      "type": "string"
    },
    "model_name": {
      "id": "/properties/model_name",
      "type": "string"
    },
    "model_uid": {
      "id": "/properties/model_uid",
      "type": "string"
    },
    "user_id": {
      "id": "/properties/user_id",
      "type": "string"
    },
    "user_name": {
      "id": "/properties/user_name",
      "type": "string"
    }
  },
  "type": "object"
}

备份集合

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "definitions": {},
  "id": "http://example.com/example.json",
  "properties": {
    "collection": {
      "id": "/properties/collection",
      "properties": {},
      "type": "object"
    }
  },
  "type": "object"
}

要求

完成后,选择New Step → Add an Action并配置您的特定服务。对于此演示,让我们将您的 Postman Monitor 连接到 Microsoft Power Automate 移动应用程序。因此,在每次 Monitor 运行时,您都会在 Microsoft Power Automate 移动应用中收到应用内通知。Notifications从服务列表中选择并选择操作Send me a mobile notification

添加动作

通知

您可以通过选择措辞并添加从 Postman Monitor 运行结果中派生的内容来自定义文本通知。

输入文字

完成后,选择Create Flow右上角的。创建流后,您将需要 Microsoft Power Automate 生成的 Webhook URL。要获得它,请选择Request,您将看到生成的 webhook URL。

生成的 webhook URL