Skip to content

Instantly share code, notes, and snippets.

@taddison
Created January 21, 2020 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taddison/2552bcb0b9d30fda738939be30e0d2a7 to your computer and use it in GitHub Desktop.
Save taddison/2552bcb0b9d30fda738939be30e0d2a7 to your computer and use it in GitHub Desktop.
$payload = @"
{
"text": "Danny Torrence left a 1 star review for your property.",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Danny Torrence left the following review for your property:"
}
},
{
"type": "section",
"block_id": "section567",
"text": {
"type": "mrkdwn",
"text": "<https://example.com|Overlook Hotel> \n :star: \n Doors had too many axe holes, guest in room 237 was far too rowdy, whole place felt stuck in the 1920s."
},
"accessory": {
"type": "image",
"image_url": "https://is5-ssl.mzstatic.com/image/thumb/Purple3/v4/d3/72/5c/d3725c8f-c642-5d69-1904-aa36e4297885/source/256x256bb.jpg",
"alt_text": "Haunted hotel image"
}
},
{
"type": "section",
"block_id": "section789",
"fields": [
{
"type": "mrkdwn",
"text": "*Average Rating*\n1.0"
}
]
}
]
}
"@
$uri = "http://localhost:7071/api/HttpTrigger"
Invoke-WebRequest -Uri $uri -Method Post -Body $payload -ContentType "application/json"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment