ARM template Office 365 connection for logic apps

后端 未结 2 970
野的像风
野的像风 2020-12-18 06:56

I have a logic app that I am trying to automate through an ARM Template.

The logic app requires a connection to Office 365. Below I have the template for the connec

2条回答
  •  没有蜡笔的小新
    2020-12-18 07:40

    Use the below link to install logic app tool which can help to design workflow https://marketplace.visualstudio.com/items?itemName=VinaySinghMSFT.AzureLogicAppsToolsforVisualStudio-18551

    once done you can create office 365 connector and when you open ARM template you can see o365 component in the ARM template. My template looks like :-

    {
      "type": "MICROSOFT.WEB/CONNECTIONS",
      "apiVersion": "2016-06-01",
      "name": "[parameters('office365_1_Connection_Name')]",
      "location": "[parameters('location')]",
      "properties": {
        "api": {
          "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/', 'office365')]"
        },
        "displayName": "[parameters('office36`enter code here`5_1_Connection_DisplayName')]"
      }
    }
    

    and inside workflow

    "triggers": {
                "When_a_new_event_is_created_(V2)": {
                  "type": "ApiConnection",
                  "inputs": {
                    "host": {
                      "connection": {
                        "name": "@parameters('$connections')['office365']['connectionId']"
                      }
                    },
                    "method": "get",
                    "path": "/datasets/calendars/v2/tables/@{encodeURIComponent(encodeURIComponent('AAMkNbPwESLK3F8s5n1Q3BwAhXXXXXXXXXXXXXXXXXXXXXXXXXXX'))}/onnewitems"
                  },
                  "recurrence": {
                    "frequency": "Minute",
                    "interval": 1
                  },
                  "splitOn": "@triggerBody()?['value']"
                }
              }
    

    ================================================================ And the parameters for workflow

    "parameters": {
              "$connections": {
                "value": {
                  "office365": {
                    "id": "[concat(subscription().id, '/providers/Microsoft.Web/locations/', parameters('location'), '/managedApis/', 'office365')]",
                    "connectionId": "[resourceId('Microsoft.Web/connections', parameters('office365_1_Connection_Name'))]",
                    "connectionName": "[parameters('office365_1_Connection_Name')]"
                  }
    

    ================================================================

提交回复
热议问题