Azure功能或Azure逻辑应用程序的可操作消息发布

时间:2018-01-02 16:15:10

标签: office365connectors

如果我希望我的可操作消息将HttpPOST发送到Azure功能或Azure逻辑应用程序,我该如何使其工作?

我已经尝试了以下两个senario,但没有运气:

  1. 使用Azure Active Directory身份验证的Azure功能。当我打电话给我时,我收到以下回复:

    {
       "innerErrorCode":"ProviderException",
       "innerErrorMessage":null,
       "authenticationUrl":null,
       "displayMessage":"The action could not be completed."
    }
    
  2. 此目标网址已在可操作的电子邮件开发者信息中心中注册。

    该功能甚至没有触发,因此错误来自 /actions/userid/messages/.../executeAction 调用

    1. 没有身份验证的Azure功能,我收到以下响应:

      {
         "innerErrorCode":"InvalidTargetUrlException",
         "innerErrorMessage":null,
         "authenticationUrl":null,
         "displayMessage":"Target URL 
         'https://mysite.azurewebsites.net/api/ActionableMessage' is not allowed."
      }
      
    2. 由于

1 个答案:

答案 0 :(得分:0)

你能分享你用来发送邮件的可操作消息json吗?

您需要在潜在操作中输入一个条目作为输入以及后续操作,例如:选项多选表示为:

{
    "@type": "ActionCard",
    "name": "SelectResource",
    "inputs": [
      {
        "@type": "MultichoiceInput",
        "id": "<id_which_will_be_used_for_fetching_value>",
        "isRequired":  true,
        "title": "Pick an option",
        "style": "expanded",
        "choices": $6
      }
    ],
    "actions": [
      {
        "@type": "HttpPOST",
        "name": "Select one of the resource for booking",
        "target": "your_azure_function_url",
        "body": "{{<id_of_the_input>.value}}" //will be received in function
      }
    ]
  }