First, create a Microsoft Teams Bot Credential in Tines
Login to your Tines tenant
Navigate to the team that will be using the API and click "Credential"
Click "+ New Credential" and select "OAuth 2.0"
Copy the "Callback URL"
Next, create an Microsoft Teams App and Bot
In Microsoft Teams, ensure you have the Developer Portal App installed
Open the "Developer Portal" app, click on "Apps" and then "+ New app"
Name the app and click "Add"
Fill out all the required fields and click "Save"
Required fields: Short Description, Long Description, Developer Name, Website, Privacy Policy, Terms of Use, Application Client ID (should be the same as your App ID)
Copy the "App ID" which you will need
Next, navigate to "Tools" and then click "Bot management"
Click "+ New Bot"
Name the bot and click "Add"
Navigate to "Configure" and paste the URL of webhook action into the "Bot endpoint address" to interact with the bot
Navigate to "Client secrets" and click "Add a client secret for your bot"
Copy the client secret and click "OK"
Click on the "Azure" link to be taken to the "App registrations" page in your Azure Portal.
In the Azure Portal, search for your bot and click on it
In the "Essentials" section, copy your "Application (client) ID" and then click "Add a Redirect URI"
Under, "Platform configurations" and click "Add a platform"
Click "Web"
Paste the "Callback URL" into the "Redirect URIs" field you copied from your credential in Tines, and then click "Configure"
You should now see the Web platform show under "Platform configurations"
Back in Teams, navigate to the "Developer Portal" app and click "Apps"
Select your app, click "App features" and then "Bot"
Select your bot from the "Select an existing bot" dropdown list and add the scopes "Personal", "Team" and "Group Chat", then click "Save"
Click "Publish"
Click "Publish to your org"
Click "Publish your app" and you will see your app's "Version" and "Status"
Navigate (or ask your Teams Admin) to the Manage Apps section of the Teams admin center and find your app using the "Search by name" field
Click on your app and then click "Publish"
Click "Publish". You will see a confirmation message stating it may take a few hours for the app to appear.
Back in Teams, navigate to the "Built for your org" section under "Apps"
Click on your app and click "Add" and choose "Add to a team"
Type the name of the channel where the app will be added and click "Set up a bot"
Navigate to the channel and click the ellipsis (
...
) and then "Get link to channel"
Click "Copy" and paste the link into a text editor
Find the channel ID between
channel/
and the next/
in the link and copy the ID
Next, finish creating the Microsoft Teams Bot credential in Tines
Input the values for the Microsoft Teams Bot credential
Name: Required
Description: Optional
Client ID: The "Application (client) ID" of your bot
Client secret: The "Client secret" of your bot
Scope:
https://api.botframework.com/.default
OAuth Provider: Manual
Grant type: Client credentials
OAuth token URL:
https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token
Optional
Domains: Ensure this credential can only be used when making HTTP requests to specific domains
Access: What other teams can also use the API
Click "Save"
Your credential should look like the following:
Lastly, create Microsoft Teams Bot resources in Tines
You will need to create two resources:
Microsoft Teams channel ID
Microsoft service URL
Navigate to the team that will be using the API and click "Resource"
Click "+ New Resource"
Input the values for the Microsoft resource
Name: Microsoft Teams channel ID
Description: Optional
Builder: The channel ID you copied earlier
Optional
Access: What other teams can also use the resource
Click "Save resource"
In Resources, click "+ New Resource"
Input the values for the Microsoft resource
Name: Microsoft service URL
Description: Optional
Builder: Your Microsoft service URL, which will vary depending on region and is set by the channel or user location
Optional
Access: What other teams can also use the resource
Click "Save resource"
Your resources should look like the following:
For more on creating credentials in Tines, click here.
You can find a selection of Microsoft Teams stories in the story library
Using the credential and resources in an action
Here is an example Microsoft Teams action you can copy and paste onto your storyboard in Tines:
{"standardLibVersion":"35","actionRuntimeVersion":"4","agents":[{"disabled":false,"name":"Fetch Team Roster","description":"MS Teams fetch team list","options":"{\"url\":\"https://<<RESOURCE.microsoft_service_url>>/v3/conversations/<<RESOURCE.microsoft_teams_channel_id>>/members\",\"content_type\":\"json\",\"method\":\"get\",\"headers\":{\"Authorization\":\"Bearer <<CREDENTIAL.msteamsbot>>\"}}","position":{"x":870,"y":1080},"type":"httpRequest","timeSavedUnit":"minutes","timeSavedValue":0,"monitorAllEvents":false,"monitorFailures":false,"monitorNoEventsEmitted":null,"recordType":null,"recordWriters":[],"form":null,"cardIconName":"httpRequest","createdFromTemplateGuid":"56ae7e3123ae1262561544b398b55ef009c2b3b02acf7f5f9aa3402e99bdd0a1","createdFromTemplateVersion":null,"originStoryIdentifier":"cloud:aa47f8215c6f30a0dcdb2a36a9f4168e:d4c15df0f02ba4789095426607003199"}],"links":[],"diagramNotes":[]}