// BLOG — AUTOMATIONS — TEAMS BOT
GETTING THE IDS
FROM TEAMS
IDs Needed
When you work with proactive notifications, you need three IDs to be able to send a notification to Teams:
- Tenant ID
- Team ID
- Channel ID
From the Bot Response Webhook Handler
Every time your bot is added to a new Team, those IDs get sent to the Rewst webhook. New channels that also get added to a team after the bot is installed are also sent. You can build a sub-workflow that handles how to document those IDs based on the response you get in the JSON payload.
Using Graph API
A second way to get these IDs is to use the Graph API:
List Teams — Graph API
Graph API call to list teams and obtain IDs
List Channels — Graph API
Graph API call to list channels of teams and obtain channel IDs
With those two calls you can discover the IDs for the team and channel. Using this way, you shouldn't need to dig for tenant IDs since to make the calls you would have to have had those in your system already.