为 Power Apps 代码应用添加 OneDrive for Business 连接器,便于上传、下载和管理文件。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "add-onedrive" 技能: 1. 下载 https://raw.githubusercontent.com/microsoft/power-platform-skills/main/plugins/code-apps/skills/add-onedrive/SKILL.md 2. 保存为 ~/.claude/skills/add-onedrive/SKILL.md 3. 装好后重载技能,告诉我可以用了
请为我的 Power Apps 代码应用添加 OneDrive for Business 连接器,并说明完成后可以执行哪些文件操作。
返回已添加连接器的结果,并概述可用的上传、下载、列出和管理文件能力。
在 Power Apps 代码应用中接入 OneDrive for Business,用于将用户提交的文件上传到指定文件夹。
返回已启用的 OneDrive 文件上传能力,支持把文件保存到目标目录。
为我的应用添加 OneDrive for Business 连接器,以便列出某个目录中的文件并支持下载、重命名或删除。
返回可用于浏览目录内容并执行常见文件管理操作的连接配置。
📋 Shared Instructions: shared-instructions.md - Cross-cutting concerns.
Check for memory-bank.md per shared-instructions.md.
First, find the connection ID (see connector-reference.md):
Run the /list-connections skill. Find the OneDrive for Business connection 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 power.config.json or a prior step): https://make.powerapps.com/environments/<environment-id>/connections → + New connection → search for the connector → Create.
npx power-apps add-data-source -a onedriveforbusiness -c <connection-id>
Ask the user what file operations they need (list files, upload, download, create folder, etc.).
// List files in a folder
const files = await OneDriveForBusinessService.ListFolder({
id: "root" // or folder ID
});
// Get file metadata
const metadata = await OneDriveForBusinessService.GetFileMetadata({
id: "file-id"
});
// Get file content
const content = await OneDriveForBusinessService.GetFileContent({
id: "file-id"
});
// Create file
await OneDriveForBusinessService.CreateFile({
folderPath: "/Documents",
name: "report.txt",
body: "File content here"
});
Key points:
ListFolder or ListRootFolderfolderPath for creating files by path, id for accessing existing filesUse Grep to find specific methods in src/generated/services/OneDriveForBusinessService.ts (generated files can be very large -- see connector-reference.md).
npm run build
Fix TypeScript errors before proceeding. Do NOT deploy yet.
Update memory-bank.md with: connector added, configured operations, build status.
为 Power Apps 代码应用接入 Azure DevOps 连接器,便于查询工单、提报缺陷与管理流水线。
为 Power Apps 代码应用添加 Teams 连接器,实现消息发送与频道协作集成。