Skip to main content

Post Teams message

Post a message to a Microsoft Teams channel, chosen by id or by name.

Command in the Microsoft 365 toolkit · id ooa.microsoft365/teams_message · 12 inputs (1 required), 1 output

Inputs​

InputTypeRequiredDefaultWhat it is
Access tokenCredentialNoMicrosoft Graph access token from the vault; or leave it empty and choose a connection that signs in, which gets and renews the token.
Team IDStringNoTeam id; or give team_name instead.
Channel IDStringNoChannel id; or give channel_name instead.
MessageStringYesMessage text (HTML allowed when html is true).
Body is HTMLBooleanNofalseMessage is HTML.
SubjectStringNoTitle shown above the message.
ImportanceStringNonormalImportance of the message.
Reply to message IDStringNoPost as a reply in the thread of this message instead of a new post.
Endpoint addressStringNohttps://graph.microsoft.com/v1.0Graph endpoint; change only for national clouds or testing.
Team nameStringNoTeam display name (not case-sensitive), among the teams the signed-in user belongs to; used instead of team_id.
Channel nameStringNoChannel display name (not case-sensitive); used instead of channel_id.
MentionsListNoPeople to @mention, by email address or user id; also channel or team (channel posts only) to notify everyone. Write @[ann@contoso.com] in the message where a mention goes; mentions not placed in the text are put at the start.

Outputs​

OutputTypeWhat it is
message_idStringMessage id.