Create LogicApp using DotNet SDK

Jun 28 2018 2:08 AM
Hello,
 
I have created Azure Logic App using Dot.Net SDK. Logic App created successfully but for Trigger and Action i want to use existing Connector. I have manually created connector to Azur Portal. I am passing that Connector's APIConnection to request json but it will not connect to that connector. I mean Logic App is created without any connectors.
 
Below is my Request Json.
 
{
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {
"smtp": {
"connectionId": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/resourceGroups/logicapp_flow_rnd/providers/Microsoft.Web/connections/smtp",
"connectionName": "smtp",
"id": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/providers/Microsoft.Web/locations/westindia/managedApis/smtp"
},
"sql": {
"connectionId": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/resourceGroups/logicapp_flow_rnd/providers/Microsoft.Web/connections/sql",
"connectionName": "sql",
"id": "/subscriptions/680cf604-e2e7-4a14-9724-a26c35c573ff/providers/Microsoft.Web/locations/westindia/managedApis/sql"
}
},
"type": "Object"
}
},
"triggers": {
"When_an_item_is_created": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sql']['connectionId']"
}
},
"method": "get",
"path": "/datasets/default/tables/@{encodeURIComponent(encodeURIComponent('LogicAppTable1'))}/onnewitems"
},
"recurrence": {
"frequency": "Minute",
"interval": 1
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
}
},
"actions": {
"Send_Email": {
"inputs": {
"body": {
"Body": "New Item Created - @{triggerBody()?['Id']}",
"Subject": "LogicAppDemo - New Item Created",
},
"host": {
"connection": {
"name": "@parameters('$connections')['smtp']['connectionId']"
}
},
"method": "post",
"path": "/SendEmailV2"
},
"runAfter": {},
"type": "ApiConnection"
}
}
}
 
Here is the screenshot from Azur portal. Here you can see that Logic App is created successfully but without Connector.
 
 
Please Suggest,
Thanks

Answers (1)