I'm trying to setup a quick automations to drop a notification into a Micrsoft Teams feed using their Webhook integration.
I've managed to make Webhooks work before using Pushcut for iOS but this one doesn't work.
This script runs 'Succsessfully' and simply copying this script into PS and runnning it works fine, posting the message to the Micrsoft Teams chat, am I missing something to make this work via Adaxes?
$uri = "https://outlook.office.com/webhook/%%%%%%%"
$body = ConvertTo-Json -Depth 4 @{
title = '%param-notificationtype%: %fullname%'
text = "Adaxes has completed %param-notificationtype% actions"
sections = @(
@{
activityTitle = '%fullname%'
activitySubtitle = '%department%'
activityText = '%company%'
activityImage = '%thumbnailPhoto%'
},
@{
title = 'Details'
facts = @(
@{
name = 'Email'
value = '[%mail%](mailto:%mail%)'
},
@{
name = 'Incident Number'
value = '[%adm-CustomAttributeText18%](#URL)'
}
)
}
)
potentialAction = @(@{
'@context' = 'http://schema.org'
'@type' = 'ViewAction'
name = 'Click here to complete %param-notificationtype%'
target = @('#URL')
})
}
Invoke-RestMethod -uri $uri -Method Post -body $body -ContentType 'application/json'
Any assistance with this would be gratefully received