Skip to main content

Notifications

Power Platform Community / Forums / Bot Extensibility / Adding a Bot to ShareP...
Bot Extensibility
Answered

Adding a Bot to SharePoint with Custom Styling

Posted on by 267

Through much trial and error, I have found a way to embed my bot into SharePoint without being restricted to an iFrame.

 

I followed instructions at https://learn.microsoft.com/en-us/microsoft-copilot-studio/customize-default-canvas to create a page with the correct code to render my chatbot, then uploaded it as an ASPX page to SharePoint.

I then used the "Embed" web part to render the ASPX page.

The custom color or the header is correct, but the settings under the constant styleOptions don't seem to be working.

 

I have the following section in the page for styling (the upload button IS hidden, but the avatar images I'm referencing are not showing)...

const styleOptions = {
 // Hide upload button.
 hideUploadButton: 'true', 
 botAvatarBackgroundColor: '#FFFFFF',
 botAvatarImage: 'https://myDomain.sharepoint.com/Shared%20Documents/WAlterLogo.png',
 userAvatarImage: 'https://avatars.githubusercontent.com/u/661465'
};

 

Categories:
  • Verified answer
    rkirk2k Profile Picture
    rkirk2k 267 on at
    Re: Adding a Bot to SharePoint with Custom Styling

    For some reason, the botAvatarImage will not display unless I add the property...

    botAvatarInitials: 'WA',

     

    I got this working by using...

    const styleOptions = {
     // Hide upload button.
     hideUploadButton: 'true', 
     botAvatarBackgroundColor: '#FFFFFF',
     botAvatarImage: 'https://myDomain.sharepoint.com/Shared%20Documents/WAlterLogo.png',
     botAvatarInitials: 'WA',
    };

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

September 2024 Newsletter…

September 2024 Community Newsletter…

Community Update Sept 16…

Power Platform Community Update…

Tuesday Tip #2 Global Search…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 142,131

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,542

Leaderboard

Featured topics