Skip to main content

TemplatedtoSlackTemplate

Properties

NameTypeDescriptionNotes
KeyStringThe template key[optional]
TextStringThe main text content of the Slack message[optional]
BlocksStringJSON string of Slack Block Kit blocks for rich formatting[optional]
AttachmentsStringJSON string of Slack attachments[optional]
NotificationTypeStringThe type of notification[optional]
ApprovalIdStringThe approval request ID[optional]
RequestIdStringThe request ID[optional]
RequestedByIdStringThe ID of the user who made the request[optional]
IsSubscriptionBooleanWhether this is a subscription notification[optional] [default to $false]
AutoApprovalDataTemplateslackAutoApprovalData[optional]
CustomFieldsTemplateslackCustomFields[optional]

Examples

  • Prepare the resource
$TemplatedtoSlackTemplate = Initialize-TemplatedtoSlackTemplate  -Key null `
-Text You have a new approval request `
-Blocks null `
-Attachments [] `
-NotificationType null `
-ApprovalId null `
-RequestId null `
-RequestedById null `
-IsSubscription null `
-AutoApprovalData null `
-CustomFields null
  • Convert the resource to JSON
$TemplatedtoSlackTemplate | ConvertTo-JSON

[Back to top]