Skip to content

Instantly share code, notes, and snippets.

@lbugnion
Created April 7, 2019 07:36
Show Gist options
  • Save lbugnion/5ff5177fed45430d21b74a202d8c0919 to your computer and use it in GitHub Desktop.
Save lbugnion/5ff5177fed45430d21b74a202d8c0919 to your computer and use it in GitHub Desktop.
{
"$connections": {
"value": {
"twitter": {
"connectionId": "/subscriptions/6e69cf24-0859-4dec-84e2-695e2618e473/resourceGroups/swisstechsummit/providers/Microsoft.Web/connections/twitter",
"connectionName": "twitter",
"id": "/subscriptions/6e69cf24-0859-4dec-84e2-695e2618e473/providers/Microsoft.Web/locations/westeurope/managedApis/twitter"
}
}
},
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Condition": {
"actions": {
"Post_a_tweet": {
"inputs": {
"host": {
"connection": {
"name": "@parameters('$connections')['twitter']['connectionId']"
}
},
"method": "post",
"path": "/posttweet",
"queries": {
"tweetText": "Congratulations to @{triggerBody()?['twittername']} for cracking the Tech Summit Switzerland Easter Egg! We're proud of you :) #TechSummitCH"
}
},
"runAfter": {},
"type": "ApiConnection"
}
},
"expression": {
"and": [
{
"equals": [
"@triggerBody()?['key']",
"b9428987d60ade36f292fa333f63c657"
]
}
]
},
"runAfter": {},
"type": "If"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"manual": {
"inputs": {
"schema": {
"properties": {
"key": {
"type": "string"
},
"twittername": {
"type": "string"
}
},
"type": "object"
}
},
"kind": "Http",
"type": "Request"
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment