Chat with Microsoft Sharepoint

Paul Omenaca

Paul Omenaca

@houmland

Chat with Microsoft Sharepoint

Microsoft Sharepoint is a robust tool to keep teams aligned, containing all the data about your company and its operations. But as this intranet grows with hundreds of new pages, it’s harder to find the facts to decide on a new hire or how to move a project forward.

Is it time for re-organizing Sharepoint from the ground up? Not yet: AI can round up the data to answer questions quickly and accurately, helping your teams find what they need faster.

And searching isn’t the only possibility: you can generate content, summarize information or run reasoning tasks with simple prompts. As you build and implement these AI-powered tools, you can increase employee productivity by up to 66% and reduce costs by up to 10%.

In the big-picture view, this technology can add trillions of dollars in value to the global economy in the coming years: the earlier you start, the better prepared your company will be for future market demands. Implementing AI now is crucial to stay ahead of the curve.

In this step-by-step guide, you’ll learn how to build a Stack AI chatbot connected to your Sharepoint instance and tune it for high security and accuracy standards.

How to build a Sharepoint assistant

  • Create a new project in Stack AI
  • Chatbots you can build with Stack AI and Sharepoint
  • Connect the LLM, Sharepoint, inputs and outputs
  • Choose the user interface
  • Share it with your team
  • Keep track of usage with analytics
  • Improve your assistant

It’ll take 30 to 60 minutes to implement this Sharepoint assistant, depending on your current setup.

Create a new project in Stack AI

Stack AI is an enterprise-grade generative AI platform for building intelligent assistants to automate back-office operations.

With high compliance and security standards—including SOC 2 Type 2, GDPR, and HIPAA —you can leverage the full potential of AI with fewer risks, helping you and your company gain and keep a competitive edge.

If you haven’t already, click here to create a Stack AI account to follow this guide. Please note that a paid Enterprise plan is required to connect Stack AI to Microsoft Sharepoint.

Once you log in for the first time, you can create a new project by clicking the corresponding button at the top right of the dashboard.


Chat with Microsoft SharePoint

There are many templates to explore, each offering a different set of nodes and connections. We’re going to start from scratch: select New Project to continue.


Click start from
scratch

Click start from scratch

You’ll land on the flow editor screen. For now, there’s only an input and an output node.

Chatbots you can build with Stack AI and Sharepoint

When you change the LLM system instructions and user prompts, you can build a variety of chatbots for multiple use cases.

In this guide, we’ll build an employee onboarding assistant to help new hires in their first weeks at work: they’ll be able to chat with Sharepoint and get answers to all their questions.

Here are more examples of other useful chatbots you can build with Stack AI:

  • An HR expert tuned with your unique policies, ready to answer any questions about compliance, workplace procedures or compensation structures.
  • A content compliance verification bot to fact-check your content, determine whether it fits your brand voice and ensure no sensitive information is shared.
  • A resume search engine to help surface the best candidates in your system matched to current or future project requirements.
  • An internal communications bot to help draft, save and review internal memos.
  • A request for proposal assistant to streamline new proposals, offering guidelines, managing submissions and scoring them based on pre-determined criteria.
  • A physician copilot for asking questions about patient data, assisting in diagnosis and supporting clinical decisions.

Connect the LLM, Sharepoint, inputs and outputs

It’s time to start building. We'll add the Sharepoint connection to improve the accuracy of each answer, the LLM to reason through the user’s requests, and we’ll connect everything to the inputs and outputs of the project.

Adding an LLM

We need an LLM to be in charge of the generation process. On the left side of the screen, you’ll find all the nodes you can add to the canvas. Click to expand the LLMs section.


Select OpenAI
LLM

Select OpenAI LLM

For this guide, we’re only going to use text generation. However, Stack AI also offers multimodal (text, image, audio, video) model access, so you can input and output any type of data depending on your use case requirements.

Hold and drag the OpenAI LLM node into the canvas. It comes with GPT-4o selected by default.


OpenAI LLM
dropped

OpenAI LLM dropped

Your company data is safe on our platform: Stack AI has data protection addendums in place with OpenAI and Anthropic, while also offering connectors to any AI models you deployed in isolated Microsoft Azure or AWS Bedrock instances.

This means the data you send to any AI models through Stack AI won’t be exposed or used for training.

Note: the LLM token price for all AI models is included in your Stack AI subscription. You don’t have to pay for token usage separately.

Connecting Sharepoint

The LLM needs more information about your company to provide the most accurate answer. On the left side of the screen, click to expand the Knowledge Bases section.


Connecting
Sharepoint

Connecting Sharepoint

This section contains nodes that LLMs can use as information sources. This will prevent the model from hallucinating, increasing response accuracy.

Hold and drag the Sharepoint node to the canvas, just under the input node.


Drag and drop Sharepoint
node

Drag and drop Sharepoint node

Sending all your Sharepoint site data in a single prompt would overwhelm the model, with unpredictable results to follow.

To prevent this issue, Stack AI has proprietary search algorithms to search through Sharepoint and select the most relevant data for the answer, which increases efficiency and output quality.

To take advantage of this feature, connect the input node to the Sharepoint node.


Connect Input to
Sharepoint

Connect Input to Sharepoint

Then, connect the Sharepoint node to the LLM input box.


Connect Sharepoint to
LLM

Connect Sharepoint to LLM

The LLM also needs the user prompt to understand what it must do, so connect the input node to the LLM node.


Connect Input to
LLM

Connect Input to LLM

Next, integrate your Sharepoint site to the corresponding node inside Stack AI. Click the Settings icon at the top-right of the Sharepoint knowledge base node.


Click settings on
Sharepoint

Click settings on Sharepoint

Add the Connection data to the settings tab. Follow this guide on how to get the connection details from Microsoft Azure.


Add Connection
data

Add Connection data

Once you paste all the credentials, click the Connect to Sharepoint button inside the node. Stack AI will sync with Microsoft and create the connection.


Click connect to
Sharepoint

Click connect to Sharepoint

You can set a sync interval—for example, once every hour—to make sure that Stack AI pulls all the information from Sharepoint and stays up to date.

Tip: if you’d like to reuse your Sharepoint connection in all your future projects, you can connect it to your Stack AI account. Here’s how to do it: on the Stack AI dashboard, click your profile name > Settings > Connections and set up the integration there.


Connections
tip

Connections tip

Set up LLM system instructions and prompt

The system instructions of the LLM set the role, tone and bot behavior.

In this case, we’ll configure it to help new employees navigate company information. Here’s an example system prompt:

You are an employee onboarding assistant for Acme Industries. Your goal is to help the user get to know Acme Industries,
understand their role responsibilities and provide access to useful tools and resources. Be friendly, concise and clear.
Be proactive in offering assistance.

Here are the topics you should cover:
- Company overview
- Team integration
- Tools and resources
- FAQs

If the user asks something outside your knowledge base, kindly state that you can’t help them with that information
and that they should speak to their point of contact to know more.

Remember, your goal is to make the onboarding process as smooth and informative as possible.

Copy and paste this example into the Instructions input field inside the OpenAI LLM node or write your own.


Add system
instructions

Add system instructions

It’s time to set up the prompt: the message sent to the AI that’ll trigger the generation process.

We’ll combine the user prompt with the data from Sharepoint to provide the best answer:

User Message: {in-0}
Use this information from Sharepoint to answer to the user:
---
{sharepointemb-0}
---

You can copy and paste it into the Prompt input field of the OpenAI LLM node.


Insert the
prompt

Insert the prompt

The values in curly brackets are variables: {sharepointemb-0} will contain the data returned from Sharepoint. {in-0} contains the prompt of the user.

When building more complex flows, you can add variables from multiple nodes to your prompt or instructions. Adding that dynamic data will improve the accuracy and versatility of your tools.

One last note: remember to separate key parts of the prompt with dashes or XML tags (for example, <context>{docemb-0}</context>). This will help the LLM correctly distinguish between instructions and the content to execute them on.

Adjust the LLM settings

On the top right of the OpenAI LLM node, click on the Settings icon.


Click settings

Click settings

A side tab opens with all the controls to change the generation settings.

This functionality is true for nearly every other node available in Stack AI, so be sure to look out for the Settings icon.


LLM settings

LLM settings

Every setting has a small information icon close to its name: hover over each to find out what they do.

The most important ones for this guide are:

  • Provider and Model let you change the company and model in charge of the generation process here. Stack AI integrates with multiple providers and platforms, including Anthropic, Google or Hugging Face.
  • Memory controls whether to activate context window (conversational memory) features for this chatbot. Don’t forget to adjust the Window control to select how many messages the bot will keep track of before forgetting.
  • Citations will offer links to the original resources used to generate the answer. Users can quickly jump to the Sharepoint article, making it easy to get extra context.
  • You can activate Chart generation for the answer, personally identifiable information protection and set safety guardrails.

Connect the LLM node to the output

The LLM needs to send its generation work back to the user: connect the LLM completion handle to the output node.


Connect LLM to
output

Connect LLM to output

Choose the user interface

We just took care of the logic to make the chatbot work, but your team won’t be interacting with the project builder interface.

Instead, Stack AI offers a collection of pre-built interfaces that you can use to distribute this tool. Click on Publish at the top right of the screen.

Important: whenever you make changes to your project, always remember to click the Publish button. This will update the assistant’s user interface.


Click publish

Click publish

The tool is deployed. Click the Export tab button on the notification.


Click export
tab

Click export tab

On the top left side of the screen, click the dropdown displaying Form and select Chat Assistant.


Select chat
assistant

Select chat assistant

The preview window updates to show a user experience similar to ChatGPT. This is what your team will use to ask questions.


The chat
interface

The chat interface

While the chat assistant is the user experience that best matches this employee onboarding use case, you can choose other pre-built interfaces for different projects:

  • Form is good for quick AI-powered processing with multiple inputs and outputs. It can help summarize a document, generate Q&As from content, or run structured reasoning tasks without follow-up questions.
  • Website chatbot can help your web visitors with questions about your products and services.
  • WhatsApp/SMS, configurable with Twilio, brings generative AI into mobile phones, providing quick information to your team members while out of the office or at an event.
  • Slack app integrates Stack AI with this communication platform, helping you push messages between both. This helps automate notifications to Slack or deploy chatbots in your internal channels.
  • Batch loops the flow over multiple lines of data, making list processing much easier.
  • Voice assistant turns this Stack AI flow into a tool equivalent to Siri or Alexa, helping you ask questions and get answers with voice.
  • API lets you integrate this Stack AI flow with any internal tools or backend services programmatically.

Share it with your team

Beyond customizing the interface’s look, name and description, you can add a custom sub-domain for your assistant. This shortens the link length, making it easier to share.

Below the interface selector dropdown, type a custom domain name and click Save to apply.


Custom
sub-domain

Custom domain

There are two other important settings when you scroll down the left-side tab: in the Security section, you can set password protection for this interface or enforce SSO rules.


Security
settings

Security settings

This way, even if the link is leaked by accident, you can still keep your data safe and ensure that only your team members have access to it.

Once you’ve updated all the settings, click the Save Interface at the top right.


Save interface

Save interface

You can copy and paste the link into your internal communication channels, send it via email or share on a new Sharepoint page dedicated to the chatbot.


Copy the link

Copy the link

If you have other team members building flows in Stack AI, you can share what you’re building by clicking the Share button at the top right of the screen.

This will share a copy of your flow: any changes others make to the nodes or connections will be saved to their copy. Your original project remains unchanged.

Keep track of usage with analytics

Your chatbot performance is always being measured, meaning you can use this data to improve it over time. On the top left side of the screen, click Analytics.


Click
analytics

Click analytics

Here you’ll have an overview of total runs, users, errors and how many tokens were consumed since you implemented this tool. You can also see a list of recent prompts and responses with their status and how long each took to process.


Analytics tab

Analytics tab

More than this, when you click the Manager tab at the top left of the screen, you can see all the conversations on a user-by-user basis. This is great for further improving this flow or working through a conversation that wasn’t helpful.


Manager tab

Manager tab

Improve your assistant

You can improve your assistant over time based on the information from the analytics and manager tabs. Use this data to adjust the system and user prompts, add more knowledge bases or logic nodes to route the flow of the conversation based on the topic.

More than this, you can easily upgrade your assistant’s intelligence by selecting new AI models as they’re released. Simply click the LLM node’s settings icon, choose the best one for the task, and click the save button to apply.

Reminder: every time you change anything in your project, click the Publish button at the top right of the screen to update your assistant.

Chat with Sharepoint

It’s easy to underestimate how much time you lose when searching for information. With a Sharepoint chat assistant, your teams can work up to 66% faster, finding everything they need without wasting time on the intranet.

More than surfacing facts, they can ask deeper questions, correlate data or generate document drafts. A faster, more interactive experience that opens up time for high-value work, not repetitive tasks.

But this is just the beginning of what you can build with Stack AI. Create a free Stack AI account and get started on your AI tool collection with our in-depth tutorials: