Files
crewAI/docs/edge/ko/enterprise/integrations/microsoft_onedrive.mdx
Lucas Gomide a237ebabba feat: adopt directory-based docs versioning with Edge channel (#6202)
* feat: adopt directory-based docs versioning with Edge channel

Switch docs.crewai.com from navigation-only versioning (every version
selector entry rendered the same docs/<lang>/* source files) to
Mintlify's directory-based versioning so each version selector entry
renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/*
that always reflects main HEAD for unreleased work, eliminating
pre-release leakage onto frozen release labels. External links to
canonical /<lang>/* URLs are preserved via wildcard redirects that
always land on the current default version.

Layout:
- docs/edge/<lang>/*         rolling source (you edit here)
- docs/edge/enterprise-api.*.yaml
- docs/v<X.Y.Z>/<lang>/*     frozen, immutable snapshots
- docs/v<X.Y.Z>/enterprise-api.*.yaml
- docs/images/               shared, append-only
- docs/docs.json             nav + redirects

URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for
Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard
redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links
working, and every freeze rewrites them (plus all per-section/per-page
redirects) so destinations always resolve to the current default
without depending on a second redirect hop.

Release flow integration (devtools release):
- New module crewai_devtools.docs_versioning.freeze() materialises
  docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the
  snapshot, inserts the version into every language block in
  docs.json, and refreshes all redirect destinations.
- _update_docs_and_create_pr() in cli.py now calls that freeze during
  Phase 2 of devtools release. Edge changelogs are updated first (so
  the snapshot freeze picks them up), then the snapshot is staged
  alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR
  is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z>
  — the title prefix the new CI guard reads.
- The PR still gates tag, GitHub release, PyPI publish, and the
  enterprise release as before; no new PRs are added.
- Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride
  Edge — and the docs PR title omits the [docs-freeze] prefix.
- docs_check (AI-generated docs scaffolding) writes to
  docs/edge/<lang>/* so newly-generated unreleased docs land in Edge
  and never accidentally touch a frozen snapshot.

Migration scripts (one-shot):
- scripts/docs/freeze_historical_versions.py reconstructs all 16
  historical snapshots (v1.10.0 .. v1.14.7) from git tags via
  git archive | tar, rewriting openapi: MDX refs so each snapshot
  reads its own enterprise-api YAML rather than the live one.
- scripts/docs/prefix_version_paths.py one-shot-migrates docs.json:
  rewrites every page path in 16 versioned blocks to point under
  docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags
  v1.14.7 as Latest (default), prunes pages whose target file
  doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before
  v1.12.0), and writes the wildcard + per-section redirects.
- scripts/docs/freeze_current_edge.py is now a thin CLI wrapper
  around docs_versioning.freeze for manual one-off freezes (e.g.
  retroactively snapshotting a forgotten release).

CI guards (.github/workflows/docs-snapshots.yml):
- Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose
  title contains [docs-freeze] (i.e. release-cut PRs generated by
  devtools release or the manual wrapper) may modify them.
- Images under docs/images/ are append-only since snapshots share a
  single image directory. Deleting or renaming an image breaks every
  historical snapshot that still references it.

Restored docs/images/crewai-otel-export.png from PR #3673; it was
deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference
it. Restoring instead of editing the snapshots preserves historical
rendering fidelity and validates the new append-only rule
retroactively.

Tests:
- lib/devtools/tests/test_docs_versioning.py covers the freeze: file
  copy, openapi rewrite, version insertion, default demotion, redirect
  upserts, per-section redirect rewriting, idempotency, and invalid
  inputs.

Verified locally with mintlify broken-links: 0 broken links across
the full site (Edge + 16 frozen versions, 4 locales).

AGENTS.md (repo root) is the contributor guide for the new model;
RELEASING.md is the release-cut runbook; README's Contribution
section links to both.

Co-authored-by: Cursor <cursoragent@cursor.com>

* style: resolve linter issues

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-17 11:56:59 -04:00

333 lines
11 KiB
Plaintext

---
title: Microsoft OneDrive 통합
description: "CrewAI를 위한 Microsoft OneDrive 통합으로 파일 및 폴더 관리."
icon: "cloud"
mode: "wide"
---
## 개요
에이전트가 Microsoft OneDrive에서 파일과 폴더를 업로드, 다운로드 및 관리할 수 있도록 합니다. AI 기반 자동화로 파일 작업을 자동화하고, 콘텐츠를 구성하고, 공유 링크를 생성하며, 클라우드 스토리지 워크플로를 간소화합니다.
## 전제 조건
Microsoft OneDrive 통합을 사용하기 전에 다음 사항을 확인하세요:
- 활성 구독이 있는 [CrewAI AMP](https://app.crewai.com) 계정
- OneDrive 액세스 권한이 있는 Microsoft 계정
- [통합 페이지](https://app.crewai.com/crewai_plus/connectors)를 통해 Microsoft 계정 연결
## Microsoft OneDrive 통합 설정
### 1. Microsoft 계정 연결
1. [CrewAI AMP 통합](https://app.crewai.com/crewai_plus/connectors)으로 이동
2. 인증 통합 섹션에서 **Microsoft OneDrive** 찾기
3. **연결**을 클릭하고 OAuth 플로우 완료
4. 파일 액세스에 필요한 권한 부여
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token 복사
### 2. 필요한 패키지 설치
```bash
uv add crewai-tools
```
### 3. 환경 변수 설정
<Note>
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로
`CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
</Note>
```bash
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
```
또는 `.env` 파일에 추가하세요:
```
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
```
## 사용 가능한 작업
<AccordionGroup>
<Accordion title="microsoft_onedrive/list_files">
**설명:** OneDrive의 파일과 폴더를 나열합니다.
**매개변수:**
- `top` (integer, 선택사항): 검색할 항목 수 (최대 1000). 기본값: 50.
- `orderby` (string, 선택사항): 필드별 정렬 (예: "name asc", "lastModifiedDateTime desc"). 기본값: "name asc".
- `filter` (string, 선택사항): OData 필터 표현식.
</Accordion>
<Accordion title="microsoft_onedrive/get_file_info">
**설명:** 특정 파일 또는 폴더에 대한 정보를 가져옵니다.
**매개변수:**
- `item_id` (string, 필수): 파일 또는 폴더의 ID.
</Accordion>
<Accordion title="microsoft_onedrive/download_file">
**설명:** OneDrive에서 파일을 다운로드합니다.
**매개변수:**
- `item_id` (string, 필수): 다운로드할 파일의 ID.
</Accordion>
<Accordion title="microsoft_onedrive/upload_file">
**설명:** OneDrive에 파일을 업로드합니다.
**매개변수:**
- `file_name` (string, 필수): 업로드할 파일의 이름.
- `content` (string, 필수): Base64로 인코딩된 파일 내용.
</Accordion>
<Accordion title="microsoft_onedrive/create_folder">
**설명:** OneDrive에 새 폴더를 만듭니다.
**매개변수:**
- `folder_name` (string, 필수): 만들 폴더의 이름.
</Accordion>
<Accordion title="microsoft_onedrive/delete_item">
**설명:** OneDrive에서 파일 또는 폴더를 삭제합니다.
**매개변수:**
- `item_id` (string, 필수): 삭제할 파일 또는 폴더의 ID.
</Accordion>
<Accordion title="microsoft_onedrive/copy_item">
**설명:** OneDrive에서 파일 또는 폴더를 복사합니다.
**매개변수:**
- `item_id` (string, 필수): 복사할 파일 또는 폴더의 ID.
- `parent_id` (string, 선택사항): 대상 폴더의 ID (선택사항, 기본값은 루트).
- `new_name` (string, 선택사항): 복사된 항목의 새 이름 (선택사항).
</Accordion>
<Accordion title="microsoft_onedrive/move_item">
**설명:** OneDrive에서 파일 또는 폴더를 이동합니다.
**매개변수:**
- `item_id` (string, 필수): 이동할 파일 또는 폴더의 ID.
- `parent_id` (string, 필수): 대상 폴더의 ID.
- `new_name` (string, 선택사항): 항목의 새 이름 (선택사항).
</Accordion>
<Accordion title="microsoft_onedrive/search_files">
**설명:** OneDrive에서 파일과 폴더를 검색합니다.
**매개변수:**
- `query` (string, 필수): 검색 쿼리 문자열.
- `top` (integer, 선택사항): 반환할 결과 수 (최대 1000). 기본값: 50.
</Accordion>
<Accordion title="microsoft_onedrive/share_item">
**설명:** 파일 또는 폴더의 공유 링크를 만듭니다.
**매개변수:**
- `item_id` (string, 필수): 공유할 파일 또는 폴더의 ID.
- `type` (string, 선택사항): 공유 링크 유형. 옵션: view, edit, embed. 기본값: view.
- `scope` (string, 선택사항): 공유 링크 범위. 옵션: anonymous, organization. 기본값: anonymous.
</Accordion>
<Accordion title="microsoft_onedrive/get_thumbnails">
**설명:** 파일의 썸네일을 가져옵니다.
**매개변수:**
- `item_id` (string, 필수): 파일의 ID.
</Accordion>
<Accordion title="microsoft_onedrive/list_files_by_path">
**설명:** 특정 OneDrive 경로의 파일과 폴더를 나열합니다.
**매개변수:**
- `folder_path` (string, 필수): 폴더 경로 (예: 'Documents/Reports').
- `top` (integer, 선택사항): 검색할 항목 수 (최대 1000). 기본값: 50.
- `orderby` (string, 선택사항): 필드별 정렬 (예: "name asc", "lastModifiedDateTime desc"). 기본값: "name asc".
</Accordion>
<Accordion title="microsoft_onedrive/get_recent_files">
**설명:** OneDrive에서 최근에 액세스한 파일을 가져옵니다.
**매개변수:**
- `top` (integer, 선택사항): 검색할 항목 수 (최대 200). 기본값: 25.
</Accordion>
<Accordion title="microsoft_onedrive/get_shared_with_me">
**설명:** 사용자와 공유된 파일과 폴더를 가져옵니다.
**매개변수:**
- `top` (integer, 선택사항): 검색할 항목 수 (최대 200). 기본값: 50.
- `orderby` (string, 선택사항): 필드별 정렬. 기본값: "name asc".
</Accordion>
<Accordion title="microsoft_onedrive/get_file_by_path">
**설명:** 경로로 특정 파일 또는 폴더에 대한 정보를 가져옵니다.
**매개변수:**
- `file_path` (string, 필수): 파일 또는 폴더 경로 (예: 'Documents/report.docx').
</Accordion>
<Accordion title="microsoft_onedrive/download_file_by_path">
**설명:** 경로로 OneDrive에서 파일을 다운로드합니다.
**매개변수:**
- `file_path` (string, 필수): 파일 경로 (예: 'Documents/report.docx').
</Accordion>
</AccordionGroup>
## 사용 예제
### 기본 Microsoft OneDrive 에이전트 설정
```python
from crewai import Agent, Task, Crew
# Microsoft OneDrive 기능을 가진 에이전트 생성
onedrive_agent = Agent(
role="파일 관리자",
goal="OneDrive에서 파일과 폴더를 효율적으로 관리",
backstory="Microsoft OneDrive 파일 작업 및 구성 전문 AI 어시스턴트.",
apps=['microsoft_onedrive'] # 모든 OneDrive 작업을 사용할 수 있습니다
)
# 파일 나열 및 폴더 생성 작업
organize_files_task = Task(
description="OneDrive 루트 디렉토리의 모든 파일을 나열하고 '프로젝트 문서'라는 새 폴더를 만드세요.",
agent=onedrive_agent,
expected_output="파일 목록이 표시되고 새 폴더 '프로젝트 문서'가 생성됨."
)
# 작업 실행
crew = Crew(
agents=[onedrive_agent],
tasks=[organize_files_task]
)
crew.kickoff()
```
### 파일 업로드 및 관리
```python
from crewai import Agent, Task, Crew
# 파일 작업에 특화된 에이전트 생성
file_operator = Agent(
role="파일 운영자",
goal="파일을 정확하게 업로드, 다운로드 및 관리",
backstory="파일 처리 및 콘텐츠 관리에 능숙한 AI 어시스턴트.",
apps=['microsoft_onedrive/upload_file', 'microsoft_onedrive/download_file', 'microsoft_onedrive/get_file_info']
)
# 파일 업로드 및 관리 작업
file_management_task = Task(
description="'report.txt'라는 이름의 텍스트 파일을 'This is a sample report for the project.' 내용으로 업로드한 다음 업로드된 파일에 대한 정보를 가져오세요.",
agent=file_operator,
expected_output="파일이 성공적으로 업로드되고 파일 정보가 검색됨."
)
crew = Crew(
agents=[file_operator],
tasks=[file_management_task]
)
crew.kickoff()
```
### 파일 정리 및 공유
```python
from crewai import Agent, Task, Crew
# 파일 정리 및 공유를 위한 에이전트 생성
file_organizer = Agent(
role="파일 정리자",
goal="파일을 정리하고 협업을 위한 공유 링크 생성",
backstory="파일 정리 및 공유 권한 관리에 뛰어난 AI 어시스턴트.",
apps=['microsoft_onedrive/search_files', 'microsoft_onedrive/move_item', 'microsoft_onedrive/share_item', 'microsoft_onedrive/create_folder']
)
# 파일 정리 및 공유 작업
organize_share_task = Task(
description="이름에 'presentation'이 포함된 파일을 검색하고, '프레젠테이션'이라는 폴더를 만든 다음, 찾은 파일을 이 폴더로 이동하고 폴더에 대한 읽기 전용 공유 링크를 생성하세요.",
agent=file_organizer,
expected_output="파일이 '프레젠테이션' 폴더로 정리되고 공유 링크가 생성됨."
)
crew = Crew(
agents=[file_organizer],
tasks=[organize_share_task]
)
crew.kickoff()
```
## 문제 해결
### 일반적인 문제
**인증 오류**
- Microsoft 계정이 파일 액세스에 필요한 권한을 가지고 있는지 확인하세요 (예: `Files.Read`, `Files.ReadWrite`).
- OAuth 연결이 필요한 모든 범위를 포함하는지 확인하세요.
**파일 업로드 문제**
- 파일 업로드 시 `file_name`과 `content`가 제공되는지 확인하세요.
- 바이너리 파일의 경우 내용이 Base64로 인코딩되어야 합니다.
- OneDrive에 대한 쓰기 권한이 있는지 확인하세요.
**파일/폴더 ID 문제**
- 특정 파일 또는 폴더에 액세스할 때 항목 ID가 올바른지 다시 확인하세요.
- 항목 ID는 `list_files` 또는 `search_files`와 같은 다른 작업에서 반환됩니다.
- 참조하는 항목이 존재하고 액세스 가능한지 확인하세요.
**검색 및 필터 작업**
- `search_files` 작업에 적절한 검색어를 사용하세요.
- `filter` 매개변수의 경우 올바른 OData 문법을 사용하세요.
**파일 작업 (복사/이동)**
- `move_item`의 경우 `item_id`와 `parent_id`가 모두 제공되는지 확인하세요.
- `copy_item`의 경우 `item_id`만 필요합니다. `parent_id`는 지정하지 않으면 루트로 기본 설정됩니다.
- 대상 폴더가 존재하고 액세스 가능한지 확인하세요.
**공유 링크 생성**
- 공유 링크를 만들기 전에 항목이 존재하는지 확인하세요.
- 공유 요구 사항에 따라 적절한 `type`과 `scope`를 선택하세요.
- `anonymous` 범위는 로그인 없이 액세스를 허용합니다. `organization`은 조직 계정이 필요합니다.
### 도움 받기
<Card
title="도움이 필요하신가요?"
icon="headset"
href="mailto:support@crewai.com"
>
Microsoft OneDrive 통합 설정 또는 문제 해결에 대한 지원이 필요하시면 지원팀에
문의하세요.
</Card>