0 votes

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

by (260 points)
+1

Hello Richard,

For troubleshooting purposes, could you, please, clarify what control (e.g. checkbox) is used to specify the param-notificationtype parameter value and what values can be specified there? If it is a drop-down, post here or send us (support[at]softerra.com) a screenshot of the parameter configuration. We need something like the following: image.png

Also, please, confirm that you check the notification in the same channel that is specified for the $uri variable.

0

The script now works for some reason.

The param-notificationtype is a dropdown list with a few text options

0

Hello Richard,

Thank you for the confirmation, it is much appreciated! Should the issue reoccur, provide us with all the possible details. Screenshots would be much appreciated.

Please log in or register to answer this question.

Related questions

0 votes
1 answer

Receive "Index operation failed; the array index evaluated to null. Stack trace: at <ScriptBlock>, <No file>: line 104>" and "Index operation failed; the ... $GroupName, $GroupDN." } } #foreach write-output "" Write-Output "" Stop-Transcript

asked Apr 14 by jbahou (20 points)
0 votes
0 answers

Good Afternoon, I'm looking for some clarification on what security settings I would need to apply to the Self-Service Users to allow them to update both their own ... accounts they have full access to. Please let me know if this requires more clarification.

asked Jul 22, 2021 by jtop (680 points)
0 votes
1 answer

Hello, we want to setup a scheduled report with all our teams (security groups) and their respective team-leader (specified in "managedBy" of security group). I get the name of ... the team-leader. And this is my problem... Can you help me with this problem?

asked Oct 9, 2020 by lohnag (100 points)
0 votes
1 answer

Hi, I would need to set a random plaintext in the header of the login page of one of the contexts (via custom HTML). This plaintext must be aligned with a ... . This would serve as a pseudo verification code for entering in the console. Thanks, Daniele

asked May 26, 2020 by dmaggiolo (20 points)
0 votes
1 answer

I'd like to be able to either send an email report or export a CSV of all of the business rules carried out when a user is disabled. This would be ... Management Activity section but this includes things that weren't part of the disable operation. Thanks

asked Feb 19, 2020 by bavery (250 points)
2,797 questions
2,530 answers
6,594 comments
57,494 users