Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mathieu-benoit/6a49ac44745c53681edc149d3431e0fe to your computer and use it in GitHub Desktop.
Save mathieu-benoit/6a49ac44745c53681edc149d3431e0fe to your computer and use it in GitHub Desktop.
MyMonthlyBlogArticle
Gist snippets for my MonthlyBlogArticle: https://alwaysupalwayson.blogspot.com/2017/08/my-monthly-azure-news-updates-powered.html
{
"$connections": {
"value": {
"blogger": {
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/blogger",
"connectionName": "blogger",
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/blogger"
},
"linkedin": {
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/linkedin",
"connectionName": "linkedin",
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/linkedin"
},
"office365": {
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/office365",
"connectionName": "office365",
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/office365"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"CreateBlogArticleContent": {
"inputs": {
"body": {
"date": "@utcnow()"
},
"function": {
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/sites/mymonthlyblogarticle/functions/CreateBlogArticleContent"
}
},
"runAfter": {},
"type": "Function"
},
"Create_post": {
"inputs": {
"body": {
"content": "@{body('CreateBlogArticleContent')['content']}",
"labels": [
"Azure, Microsoft, Microsoft Azure, News and Updates"
],
"title": "@{body('CreateBlogArticleContent')['title']}"
},
"host": {
"connection": {
"name": "@parameters('$connections')['blogger']['connectionId']"
}
},
"method": "post",
"path": "/blogs/@{encodeURIComponent('4863855014415381319')}/posts",
"queries": {
"isDraft": false
}
},
"runAfter": {
"CreateBlogArticleContent": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Send_an_email": {
"inputs": {
"body": {
"Body": "Hi, <br /><br />@{body('Create_post')?['title']}:<br />@{body('CreateBlogArticleContent')['url']}<br /><br />Enjoy!<br />Mathieu.",
"IsHtml": true,
"Subject": "@body('Create_post')?['title']",
"To": "[email protected]"
},
"host": {
"connection": {
"name": "@parameters('$connections')['office365']['connectionId']"
}
},
"method": "post",
"path": "/Mail"
},
"runAfter": {
"Create_post": [
"Succeeded"
]
},
"type": "ApiConnection"
},
"Share_an_article": {
"inputs": {
"body": {
"content": {
"description": "@body('Create_post')?['title']",
"submitted-url": "@{body('CreateBlogArticleContent')['url']}",
"title": "@body('Create_post')?['title']"
},
"visibility": {
"code": "anyone"
}
},
"host": {
"connection": {
"name": "@parameters('$connections')['linkedin']['connectionId']"
}
},
"method": "post",
"path": "/v1/people/~/shares"
},
"runAfter": {
"Send_an_email": [
"Succeeded"
]
},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"recurrence": {
"frequency": "Month",
"interval": 1,
"startTime": "2017-09-01T03:50:00Z",
"timeZone": "Eastern Standard Time"
},
"type": "Recurrence"
}
}
}
}
{
"$connections": {
"value": {
"azuretables": {
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/azuretables",
"connectionName": "azuretables",
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/azuretables"
},
"rss": {
"connectionId": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/resourceGroups/MyMonthlyBlogArticle/providers/Microsoft.Web/connections/rss",
"connectionName": "rss",
"id": "/subscriptions/071eb531-0874-4eaf-823d-0a2d0d711d56/providers/Microsoft.Web/locations/eastus/managedApis/rss"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Insert_Entity": {
"inputs": {
"body": {
"Date": "@{substring(triggerBody()?['publishDate'],0,10)}",
"Link": "@{triggerBody()?['primaryLink']}",
"PartitionKey": "@{substring(triggerBody()?['publishDate'],0,7)}",
"RowKey": "@{replace(replace(replace(toLower(triggerBody()?['id']), 'http://blogs.msdn.microsoft.com/', ''), 'https://blogs.msdn.microsoft.com/', ''), '/?p=', '-')}",
"Title": "@{triggerBody()?['title']}",
"Type": "auto"
},
"host": {
"connection": {
"name": "@parameters('$connections')['azuretables']['connectionId']"
}
},
"method": "post",
"path": "/Tables/@{encodeURIComponent('RssFeeds')}/entities"
},
"runAfter": {},
"type": "ApiConnection"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"When_a_feed_item_is_published_on_apimanagement": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://blogs.msdn.microsoft.com/apimanagement/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_appserviceteam": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://blogs.msdn.microsoft.com/appserviceteam/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_blog": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://azure.microsoft.com/blog/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_devops": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://blogs.msdn.microsoft.com/devops/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_servicefabric": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://blogs.msdn.microsoft.com/azureservicefabric/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_mpncanada": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://blogs.partner.microsoft.com/mpn-canada/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_oss": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://open.microsoft.com/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_roadmap": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://azure.microsoft.com/roadmap/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_updates": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://azure.microsoft.com/updates/feed/"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
},
"When_a_feed_item_is_published_on_vsts": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['rss']['connectionId']"
}
},
"method": "get",
"path": "/OnNewFeed",
"queries": {
"feedUrl": "https://www.visualstudio.com/team-services/updates/?feed=product_updates"
}
},
"recurrence": {
"frequency": "Hour",
"interval": 3
},
"splitOn": "@triggerBody()?['value']",
"type": "ApiConnection"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment