Skip to main content

Notifications

Copilot Studio - Bot Extensibility
Answered

Adding a Bot to SharePoint with Custom Styling

(0) ShareShare
ReportReport
Posted on by 280

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 280 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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard

Featured topics