Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
2,854 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
azure logic app using sharepoint data
@chandar Thanks for reaching out. Here are some of the references for you on getting started with integrating SharePoint and logic apps.
Here is a sample example of using azure logic apps for sharepoint.
Screenshot of Logic app:
Sample code reference:
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"For_each": {
"actions": {
"Get_attachment_content": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sharepointonline']['connectionId']"
}
},
"method": "get",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://microsoftapc.sharepoint.com/teams/SampleSharepoint'))}/tables/@{encodeURIComponent(encodeURIComponent('xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'))}/items/@{encodeURIComponent(encodeURIComponent(items('For_each')?['Id']))}/attachments/@{encodeURIComponent(items('For_each')?['Id'])}/$value"
},
"type": "ApiConnection"
},
"Send_an_email_(V2)_copy": {
"inputs": {
"body": {
"Attachments": [
{
"ContentBytes": "@{base64(body('Get_attachment_content'))}",
"Name": "@{items('For_each')?['DisplayName']}"
}
],
"Body": "<p>tette</p>",
"Subject": "SharePoint : New Item has been added",
"To": "xxxxxxx@microsoft.com"
},
"host": {
"connection": {
"name": "@parameters('$connections')['outlook']['connectionId']"
}
},
"method": "post",
"path": "/v2/Mail"
},
"runAfter": {
"Get_attachment_content": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
"foreach": "@body('Get_attachments')",
"runAfter": {
"Get_attachments": [
"Succeeded"
]
},
"type": "Foreach"
},
"Get_attachments": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sharepointonline']['connectionId']"
}
},
"method": "get",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://microsoftapc.sharepoint.com/teams/SampleSharepoint'))}/tables/@{encodeURIComponent(encodeURIComponent('xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'))}/items/@{encodeURIComponent(encodeURIComponent(triggerBody()?['ID']))}/attachments"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"When_an_item_is_created": {
"evaluatedRecurrence": {
"frequency": "Second",
"interval": 3
},
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['sharepointonline']['connectionId']"
}
},
"method": "get",
"path": "/datasets/@{encodeURIComponent(encodeURIComponent('https://microsoftapc.sharepoint.com/teams/SampleSharepoint/'))}/tables/@{encodeURIComponent(encodeURIComponent('xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'))}/onnewitems"
},
"recurrence": {
"frequency": "Second",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
}
}
},
"parameters": {
"$connections": {
"value": {
"outlook": {
"connectionId": "/subscriptions/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Web/connections/outlook",
"connectionName": "outlook",
"id": "/subscriptions/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Web/locations/southindia/managedApis/outlook"
},
"sharepointonline": {
"connectionId": "/subscriptions/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/rg/providers/Microsoft.Web/connections/sharepointonline",
"connectionName": "sharepointonline",
"id": "/subscriptions/xxxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/providers/Microsoft.Web/locations/southindia/managedApis/sharepointonline"
}
}
}
}
}