平台
特点
代理工作室
快速建立和定制您的代理
自主发动机
使用LLMs 引导对话和任务
知识库
使用自定义知识源训练机器人
表格
存储和管理对话数据
渠道
Whatsapp 徽章
WhatsApp
Instagram 徽章
Instagram
FacebookMessenger 徽标
Messenger
Slack 徽标
Slack
所有频道
集成
Hubspot 徽标
HubSpot
Notion 徽标
Notion
Jira 徽标
Jira
Calendly 徽标
Calendly
所有集成
LLM 提供商
OpenAI 徽标
OpenAI
Anthropic 徽标
Anthropic
Groq 徽标
Groq
拥抱脸庞徽标
Hugging Face
全部LLMs
解决方案
对于
企业
实现关键任务生产工作流程自动化
机构
提供完善的代理服务
开发者
探索用于代理开发的强大 API
客户故事
从成功客户那里了解Botpress 如何改变全球业务。
按行业分类
电子商务
教育
财务
接待服务
所有行业
部门
销售
工程学
产品
ITSM
所有部门
按用例
购物助理
潜在客户生成
员工体验
票务管理
所有用例
资源
必要
Academy
通过精心设计的课程学习建造
图书馆
增强人工智能工作流程的资源
博客
有关Botpress 和人工智能代理的见解和最新情况
建筑物
Discord
与成千上万的同行一起交流思想
文件
全面的指南和参考资料
应用程序接口
与外部系统配合使用的参考资料
LLM 排名
比较模式提供商的性能和成本
视频
教程、演示和产品演示
更新日志
了解Botpress 的最新更新
合作伙伴
成为合作伙伴
加入我们的认证专家网络
聘请专家
与合作伙伴和顾问联系
文件
企业
价格
登录
联系方式注册
返回Hub

SharePoint

v3.0.4
安装到工作区
由Botpress 增长团队维护
  # Sharepoint Document Library Connector

## Overview

The sharepoint library connector integration allows you to setup a connector between a document library in a sharepoint site and a KB in botpress.

## Configuration

Add the following keys to the integration’s `configuration` block:

- **clientId** (required) — Application (client) ID of your Microsoft Entra (Azure AD) app registration.  
- **tenantId** (required) — Directory (tenant) ID of the same app registration.  
- **thumbprint** (required) — Thumbprint of the certificate uploaded to the app registration.  
- **privateKey** (required) — PEM-formatted private key that matches the certificate (everything between `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----`).  
- **primaryDomain** (required) — SharePoint primary domain (the part before `.sharepoint.com`).  
  *Example*: `contoso`  
- **siteName** (required) — Name of the SharePoint site that owns the document libraries you want to sync.  
- **documentLibraryNames** (optional) — Comma-separated list **or** JSON array of document libraries to sync.  
  *Examples*:  
  `Policies,Procedures`  
  `["Policies","Procedures"]`  
- **folderKbMap** (optional) — JSON object that maps `kbId` ⇒ array of folder prefixes for routing files to specific KBs.  
  *Example*:  
  `{"kb-marketing":["Campaigns"],"kb-policies":["HR","Legal"]}`  

**Tip:**  
- If you omit `documentLibraryNames`, **all** document libraries in the specified site will be synced.  
- If you omit `folderKbMap`, every file is routed to the default KB configured for its library.

> [!IMPORTANT]  
> Due to reliability issues, **Moves** and **Copies** are not supported. Those events from sharepoint will not reflect in the knowledge bases. If you wish to move/copy a file to another location, **Upload** or **Create** the file instead. 

## How to's

### How to register a app on Microsoft Entra admin center

- From the Home page of Microsoft Entra admin center, Open App registrations ( This is under Applications in the Left Nav )
- Add a new registration by clicking on “+ New registration”
- Give your app an appropriate name, and click register.
- Open the App registration and take note of the following:
  - `Application (client) ID`
  - `Directory (tenant) ID`

### How to create a certificate for your app registration

- We will be using a self signed certificate to authenticate, to create a self signed certificate run the following commands in order
- `openssl genrsa -out myPrivateKey.key 2048` → This will generate a 2048-bit private key and save it as myPrivateKey.key.
- `openssl req -new -key myPrivateKey.key -out myCertificate.csr` → This will create a CSR cert. You will be prompted to enter some information, fill as needed.
- `openssl x509 -req -days 365 -in myCertificate.csr -signkey myPrivateKey.key -out myCertificate.crt` → This will create a certificate file named myCertificate.crt that is valid for 365 days.

### How to add your certificate to your app registration

- Navigate to the Azure portal and go to your Azure AD app registration.
- Under “Certificates & secrets,” choose “Certificates” and click “Upload certificate.”
- Upload your .crt

### How to update API permissions for your app registration

- Go to “API Permissions” it should be under the Manage Group, in your App Registration "
- Click “Add a permissions”
- click on "Microsoft Graph".
- Select “Application permissions” as the type of permission.
- Check `Sites.FullControl.All`  , `Sites.Manage.All` , `Sites.Read.All` , `Sites.ReadWrite.All`, `Sites.Selected.All`, `Files.Read.All` and `Files.ReadWriteAll`
- Click “Add a permissions again.”
- Click the “Add a permission” button again
- Scroll till you find Sharepoint and click on it.
- Select “Application permissions” as the type of permission.
- Check `Sites.FullControl.All`  , `Sites.Manage.All` , `Sites.Read.All` , `Sites.ReadWrite.All` and `Sites.Selected.All`
- Click “Add permissions.”
- You should see All the permissions you added in the permissions list.
- Click on “Grant admin consent for <your_org_name>”

---

## Folder‑to‑KB Mapping (`folderKbMap`)

*This is an **optional** advanced feature. If you skip it, every file in the document library will go to the single KB you specified above.*

### Why use it?
Sometimes one SharePoint document library contains several distinct collections of content—HR procedures, Legal policies, Marketing campaigns, etc.—but you want each collection to live in its **own** Botpress KB for cleaner search results and permissions.  
`folderKbMap` lets you do exactly that.

### How it works
* `folderKbMap` is a **JSON object** whose keys are **KB IDs** and whose values are **arrays of folder prefixes** (relative paths) to watch.  
* During sync, the integration checks each file’s server‑relative path.  
  * If the path **starts with** one of the prefixes you listed, that file is routed to the corresponding KB.  
  * If no prefix matches, the file falls back to the default KB for the library.

### Configuration syntax
```jsonc
// Example: route folders within the libraries
"folderKbMap": {
  "kb-id-1": ["doclib1","doclib1/ExampleFolder/2025"],
  "kb-id-2":  ["doclib2/HR","doclib2/ExampleFolder"]
}
```
*Prefixes are **case‑insensitive** and may include simple wildcards (`*`).*

### Rules & limitations
1. **No KB sharing across libraries.** A single KB **cannot** receive content from two different libraries—even via folder mapping.  
2. **Create KBs first.** All KB IDs used in `folderKbMap` must already exist in Botpress before you save the configuration.
3. **Recursive files** Every file within a document library, regardles whether it is in a nested folder - will be recursively copied.

### Quick checklist
| ✔ | Step |
|---|------|
| Create a **separate KB** for each content group you want. |
| Identify folder (or folder‑prefix) boundaries inside the SharePoint library. |
| Build a `folderKbMap` JSON object mapping **kbId → [prefixes]**. |
| Add the JSON to your integration configuration. |
| Save & verify: upload a test file in each folder and confirm it appears in the expected KB. |

---

用Botpress

打造令人惊叹的人工智能代理体验。

开始免费使用
箭头图标
了解更多信息,请访问Botpress Academy

利用我们精心挑选的课程、指南和教程,更好更快地构建人工智能代理。

聘请专家

与我们的认证开发人员联系,寻找适合您需求的Botpress 专家。

所有系统运行
SOC 2
认证
GDPR
符合要求
© 2025
平台
价格
代理工作室
自主发动机
知识库
表格
Hub
集成
渠道
LLMs
资源
咨询销售人员
文档
聘请专家
视频
客户故事
API参考
博客
状态
v12 资源
社区
社区支持
成为合作伙伴
成为大使
成为会员
公司
关于
职业机会
新闻中心
法律门户
隐私权
©Botpress 2025