add-connector
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns.
📋 通用说明:shared-instructions.md - 跨领域相关事项。
Add Connector (Generic)
添加连接器(通用版)
Fallback skill for any connector not covered by a specific skill. For common connectors, prefer the dedicated skills:
/add-*- -- Dataverse tables
/add-dataverse - -- Azure DevOps
/add-azuredevops - -- Microsoft Teams
/add-teams - -- Excel Online (Business)
/add-excel - -- OneDrive for Business
/add-onedrive - -- SharePoint Online
/add-sharepoint - -- Office 365 Outlook (calendar, email, contacts)
/add-office365
作为未被特定技能覆盖的连接器的备选技能。对于常用连接器,优先使用专用技能:
/add-*- -- Dataverse 表
/add-dataverse - -- Azure DevOps
/add-azuredevops - -- Microsoft Teams
/add-teams - -- Excel Online (Business)
/add-excel - -- OneDrive for Business
/add-onedrive - -- SharePoint Online
/add-sharepoint - -- Office 365 Outlook(日历、邮件、联系人)
/add-office365
Workflow
工作流程
- Check Memory Bank → 2. Identify Connector → 3. Add Connector → 4. Inspect & Configure → 5. Build → 6. Update Memory Bank
- 检查记忆库 → 2. 识别连接器 → 3. 添加连接器 → 4. 检查与配置 → 5. 构建 → 6. 更新记忆库
Step 1: Check Memory Bank
步骤1:检查记忆库
Check for per shared-instructions.md.
memory-bank.md根据shared-instructions.md检查文件。
memory-bank.mdStep 2: Identify Connector
步骤2:识别连接器
If is provided or the caller already specified the connector, use it directly and skip the question below.
$ARGUMENTSOtherwise, ask the user which connector they want to add. Browse available connectors: Connector Reference
Before proceeding, check if the connector has a dedicated skill. If it does, delegate immediately and STOP:
| Connector API name | Delegate to |
|---|---|
| |
| |
| |
| |
| |
| |
| |
Invoke the appropriate skill with the same and do not continue this skill's workflow.
$ARGUMENTSCommon connector API names:
- ,
sharepointonline,teams,excelonlinebusinessonedriveforbusiness - ,
azuredevops,azureblobazurequeues - ,
office365,office365usersoffice365groups - ,
sqlcommondataservice
如果已提供或调用者已指定连接器,直接使用该连接器,跳过以下问题。
$ARGUMENTS否则,询问用户想要添加的连接器。可浏览可用连接器:连接器参考文档
在继续之前,检查该连接器是否有专用技能。如果有,立即委托给该技能并停止当前流程:
| 连接器API名称 | 委托至技能 |
|---|---|
| |
| |
| |
| |
| |
| |
| |
使用相同的调用相应技能,不要继续当前技能的工作流程。
$ARGUMENTS常用连接器API名称:
- ,
sharepointonline,teams,excelonlinebusinessonedriveforbusiness - ,
azuredevops,azureblobazurequeues - ,
office365,office365usersoffice365groups - ,
sqlcommondataservice
Step 3: Add Connector
步骤3:添加连接器
First, find the connection ID (see connector-reference.md):
Run the skill. Find the connector in the output. If none exists, direct the user to create one using the environment-specific Connections URL — construct it from the active environment ID in context (from or a prior step): → + New connection → search for the connector → Create.
/list-connectionspower.config.jsonhttps://make.powerapps.com/environments/<environment-id>/connectionsbash
undefined首先,查找连接ID(参考connector-reference.md):
运行技能。在输出结果中查找该连接器。如果不存在,引导用户使用环境专属的连接URL创建连接——根据上下文(来自或之前步骤)中的活跃环境ID构建该URL: → + 新建连接 → 搜索连接器 → 创建。
/list-connectionspower.config.jsonhttps://make.powerapps.com/environments/<environment-id>/connectionsbash
undefinedNon-tabular connectors (Teams, Azure DevOps, etc.)
非表格型连接器(Teams、Azure DevOps等)
pwsh -NoProfile -Command "pac code add-data-source -a <connector-api-name> -c <connection-id>"
pwsh -NoProfile -Command "pac code add-data-source -a <connector-api-name> -c <connection-id>"
Tabular connectors (SharePoint, Excel, SQL, etc.) -- also need dataset and table
表格型连接器(SharePoint、Excel、SQL等)——还需要数据集和表
pwsh -NoProfile -Command "pac code add-data-source -a <connector-api-name> -c <connection-id> -d '<dataset>' -t '<table>'"
**Parameter reference:**
- `-a` (apiId) -- connector name (e.g., `sharepointonline`, `teams`)
- `-c` (connectionId) -- **required** for all non-Dataverse connectors. Get from `/list-connections`.
- `-d` (dataset) -- required for tabular datasources (e.g., SharePoint site URL, SQL database). Not needed for Dataverse.
- `-t` (table) -- table/list name for tabular datasources (e.g., SharePoint list, Dataverse table logical name)pwsh -NoProfile -Command "pac code add-data-source -a <connector-api-name> -c <connection-id> -d '<dataset>' -t '<table>'"
**参数参考:**
- `-a`(apiId)——连接器名称(例如`sharepointonline`, `teams`)
- `-c`(connectionId)——**所有非Dataverse连接器必填**。从`/list-connections`获取。
- `-d`(dataset)——表格型数据源必填(例如SharePoint站点URL、SQL数据库)。Dataverse无需此参数。
- `-t`(table)——表格型数据源的表/列表名称(例如SharePoint列表、Dataverse表逻辑名称)Step 4: Inspect & Configure
步骤4:检查与配置
After adding, inspect the generated files. Generated service files can be very large -- use to find specific methods instead of reading the entire file:
GrepGrep pattern="async \w+" path="src/generated/services/<Connector>Service.ts"Files to check:
- -- available operations and their parameters
src/generated/services/<Connector>Service.ts - -- TypeScript interfaces (if generated)
src/generated/models/<Connector>Model.ts - -- connector schema and configuration
.power/schemas/<connector>/
For each method the user needs:
- Grep for the method name to find its signature
- Read just that method's section (use and
offsetparameters on Read)limit - Identify required vs optional parameters and response type
Help the user write code using the generated service methods.
添加完成后,检查生成的文件。生成的服务文件可能非常大——使用查找特定方法,而非阅读整个文件:
GrepGrep pattern="async \w+" path="src/generated/services/<Connector>Service.ts"需要检查的文件:
- ——可用操作及其参数
src/generated/services/<Connector>Service.ts - ——TypeScript接口(若已生成)
src/generated/models/<Connector>Model.ts - ——连接器架构与配置
.power/schemas/<connector>/
对于用户需要的每个方法:
- 使用Grep查找方法名称以获取其签名
- 仅阅读该方法的相关部分(使用Read操作的和
offset参数)limit - 区分必填参数与可选参数,以及响应类型
协助用户使用生成的服务方法编写代码。
Step 5: Build
步骤5:构建
powershell
npm run buildFix TypeScript errors before proceeding. Do NOT deploy yet.
powershell
npm run build继续前修复所有TypeScript错误。暂不部署。
Step 6: Update Memory Bank
步骤6:更新记忆库
Update with: connector added, configured operations, build status.
memory-bank.md在中更新以下内容:已添加的连接器、已配置的操作、构建状态。
memory-bank.md