Recently, I got an opportunity to work on Bot framework to develop a bot which is deployed to Microsoft Teams with an integration to SharePoint deployed in a different tenant.
Following is the architecture:
Below are the use cases:
Use Case 1: The idea of the Microsoft Teams Bot is to help with discovering content from SharePoint sites and help upload documents to the SharePoint site (in a different tenant).
Use Case 2: Once the document is uploaded to SharePoint site (a folder in ‘Documents’ library), Microsoft Power Automate will kick in and present an option to ‘Approve’ or ‘Reject’ in Microsoft Teams channel for the approver. This will be in the Teams channel on the same tenant as the SharePoint site.
Therefore, following aspects needed to be considered for the use case to complete:
- Create a Bot using Bot Framework and deploy to Microsoft Teams channel
- Develop the Bot using Visual Studio with C# as language and deploy it to the bot created in the 1st step
- Set up an integration with SharePoint environment that the bot will be talking to
- Update Bot’s code to authenticate against SharePoint and upload documents to SharePoint site. Additionally, the bot will also present an option (a form) to capture additional details (metadata) about the document.
- Develop Power Automate which will send email and send an Adaptive card for the approver to act on the document uploaded right in the Teams channel.
I will be walking you through the entire set up in a series of blog posts.
Post 1: Set up a Bot in the Microsoft Azure and deploy to Microsoft Teams
Post 2: Develop the bot using Visual Studio and deploy to the application created in the Post 1. We will use Git Hub sample for Eco bot which will give us a head start
Post 3: Integrate the application created in the Post 1 with SharePoint environment
Post 4: Update the Bot’s code to use Certificate based authentication with the SharePoint site, deployed in a different tenant, and add code for document upload. The bot will also present a form to capture document metadata for the document uploaded.
Post 5: Develop Power Automate, which will trigger when the document gets uploaded to the document library and send Adaptive card to the approver. Approver can approve the document either from email or right from Microsoft Teams.
If you liked the article, share it with your friends and colleagues. You can also send a “Thank you” note by buying me a coffee. Buy Me a Coffee