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',
    };

Helpful resources

Quick Links

Exciting News for Copilot Studio Communi…

Get ready to experience a whole new level of engagement with the Copilot Studio…

Celebrating the May Super User of the…

LaurensM is an exceptional contributor to the Power Platform Community…

Check out the Copilot Studio Cookbook…

We are excited to announce our new Copilot Cookbook Gallery in the Community…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 137,998

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 63,059

Leaderboard

Featured topics