Skip to main content

Microsoft Teams Receipe

Account Setup

Create a free account at https://teams.microsoft.com.

You will need to create an Incoming Webhook to attach Magic Receipe. This can be accomplished through the the app store (bottom left hand side of slack like interface); don't worry it's free. From within the app store, search for Incoming Webhook. Once you click on it you can associate it with your team. You can also assign it a name, and an avatar. Finally you will have to assign it to a channel.

When you've completed this, it will generate you a URL that looks like:

https://team-name.office.com/webhook/ \
abcdefgf8-2f4b-4eca-8f61-225c83db1967@abcdefg2-5a99-4849-8efc-\
c9e78d28e57d/IncomingWebhook/291289f63a8abd3593e834af4d79f9fe/\
a2329f43-0ffb-46ab-948b-c9abdad9d643

Yes... The URL is that big... but at the end of the day this effectively equates to: https://{team}.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}

Hence: The team name can be found in the generated webhook which looks like:

# https://TEAM-NAME.office.com/webhook/ABCD/IncomingWebhook/DEFG/HIJK
# ^ ^ ^ ^
# | | | |
# These are important <----------------^--------------------^----^

vs the legacy URL which looked like (always stating outlook as the team name):

# https://outlook.office.com/webhook/ABCD/IncomingWebhook/DEFG/HIJK
# ^ ^ ^ ^
# | | | |
# legacy team reference: 'outlook' | | |
# | | |
# These are important <--------------^--------------------^----^

So as you can see, we have is 3 separate tokens. These are what you need to build your magic receipe URL with. In the above example the tokens are as follows:

  1. TokenA is ABCD@WXYZ
  2. TokenB is DEFG
  3. TokenC is HIJK

Receipe

Valid syntax is as follows:

  • https://team-name.office.com/webhook/{tokenA}/IncomingWebhook/{tokenB}/{tokenC}
  • msteams://{team}/{tokenA}/{tokenB}/{tokenC}/

The Legacy format is also still supported. The below URL would automatically set the team name to outlook

  • msteams://{tokenA}/{tokenB}/{tokenC}/

Parameter Breakdown

VariableRequiredDescription
teamYesExtracted from the incoming-webhook.
tokenAYesThe first part of 3 tokens provided to you after creating a incoming-webhook
tokenBYesThe second part of 3 tokens provided to you after creating a incoming-webhook
tokenCYesThe last part of 3 tokens provided to you after creating a incoming-webhook
templateNoOptionally point to your own custom JSON formatted Microsoft Teams MessageCard; See here for details on their formatting.