function Get-SlackAction { <# .SYNOPSIS Used to create interactive elements in messages .PARAMETER Text The text to display .PARAMETER Url The URL the user will interact with .PARAMETER Type Defaults to button #> [CmdletBinding()] [OutputType([object])] param ( [Parameter(Mandatory = $true)] [string]$Text, [Parameter(Mandatory = $true)] [string]$Url, [Parameter(Mandatory = $false)] [ValidateSet('button')] # We only usually offer one option type. Feel free to update when you've got a new use-case [string]$Type = 'button' ) return @{ text = $Text url = $Url type = $Type } }