Once you have your bot ready and deployed in Azure, you can now embed it in SharePoint site.
- SharePoint Admin credential
Steps to Embed Bot in SharePoint
Test your deployed bot in Web Chat and make sure it is working.
Click on Channels under Bot management and select Get bot embed codes.
Copy your bot embed code and add your secret key by replacing the text “YOUR_SECRET_KEY”. This is how it looks like.
<iframe src='https://webchat.botframework.com/embed/SharepointEchoBot?s=YOUR_SECRET_HERE' style='min-width: 400px; width: 100%; min-height: 500px;'></iframe>
Go to your SharePoint site and click on Settings icon on the top right and select Site Information.
Scroll down to find View all site settings. Click on it.
Under Site Collection Administration click on HTML Field Security. Only SharePoint admin can edit these settings.
Add webchat.botframework.com in Allow iframes from these domains. Click on OK to save the settings.
Go to the page you want to embed your Bot. I will select Home page of Communication Site. Click on Edit.
Click on Add -> Select any layout where you want to embed your bot. I will select Two Columns.
Select any one section and click “+” and select Embed.
Modify the above embed code to support the SharePoint site. Modifying the style attributes. Add the embed code in the editor.
<iframe src="https://webchat.botframework.com/embed/SharepointQnABot?s=YOUR_SECRET_HERE" width="400px" height="500px"></iframe>
If your syntax is correct, Bot layout will load. Click on Republish and test your bot.