By connecting a Microsoft Teams Bot to Pipedream, you can build interactive chat experiences and automate messaging workflows using any of the thousands of apps available on Pipedream.
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
microsoft_teams_bot: {
type: "app",
app: "microsoft_teams_bot",
}
},
async run({steps, $}) {
return "Azure Bot successfully authenticated."
},
})
To connect your Teams Bot to Pipedream, you'll need to create a bot in Azure, set up a webhook in Pipedream, and configure the Teams app manifest. Follow the detailed instructions below to get started.
To get started, you'll need the following:
For detailed instructions, follow the steps below.
manifest.json
with the following template:{
"$schema": "https://developer.microsoft.com/en-us/json-schemas/teams/v1.14/MicrosoftTeams.schema.json",
"manifestVersion": "1.14",
"version": "1.0.0",
"id": "<your-bot-app-id>",
"packageName": "com.yourcompany.bot",
"developer": {
"name": "Your Company",
"websiteUrl": "https://your-website.com",
"privacyUrl": "https://your-website.com/privacy",
"termsOfUseUrl": "https://your-website.com/terms"
},
"name": {
"short": "Your Bot Name",
"full": "Your Bot Full Name"
},
"description": {
"short": "A brief description",
"full": "A full description of your bot"
},
"icons": {
"outline": "outline.png",
"color": "color.png"
},
"accentColor": "#FFFFFF",
"bots": [
{
"botId": "<your-bot-app-id>",
"scopes": [
"personal",
"team",
"groupchat"
],
"supportsFiles": false,
"isNotificationOnly": false
}
],
"permissions": [
"messageTeamMembers"
]
}
outline.png
(32x32 pixels)color.png
(192x192 pixels)For more details, please see:
Microsoft Teams Bot uses OAuth authentication. When you connect your Microsoft Teams Bot account, Pipedream will open a popup window where you can sign into Microsoft Teams Bot and grant Pipedream permission to connect to your account. Pipedream securely stores and automatically refreshes the OAuth tokens so you can easily authenticate any Microsoft Teams Bot API.
Pipedream requests the following authorization scopes when you connect your account:
https://api.botframework.com/.default
POST
https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.microsoft_app_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
scope={{oauth.comma_separated_scopes}}
POST
https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token
content-type: application/x-www-form-urlencoded
accept: application/json
client_id={{custom_fields.microsoft_app_id}}
&
client_secret={{custom_fields.client_secret}}
&
grant_type=client_credentials
&
scope={{oauth.comma_separated_scopes}}