teams.message#

When a bookmark item is set up with a Microsoft Teams Incoming Webhook URL, we can use it to send cards (messages) to the associated channel. The current functionality is limited and is currently only used to signal new publishes.

Functions:

get_payload(card[, thumbnail, asset, ...])

Get a formatted payload to send.

send(webhook, payload)

Send the specified payload using the given webhook.

bookmarks.teams.message.get_payload(card, thumbnail=None, asset='', publish_type='', path='', date='', user=common.get_username())[source]#

Get a formatted payload to send.

Returns

The payload data as a dictionary.

Return type

dict

bookmarks.teams.message.send(webhook, payload)[source]#

Send the specified payload using the given webhook.

Parameters
  • webhook (str) – The URL of the webhook.

  • payload (str) – The payload to send.