> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fetchhive.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Teams

> Microsoft Teams 可帮助用户通过已连接的账号在频道、聊天、会议和日程中进行聊天、开会和协作。

# Microsoft Teams

当你的工作流程需要团队聊天、频道消息、会议或日程操作时，请使用 Microsoft Teams。它在你需要读取或更新团队和频道记录时也很有用。

## 配置

| 选项 | 是否必填 | 描述 |
| - | - | - |
| 名称 | 否 | 工作流画布中该步骤的标签。 |
| Authentication | 是 | 此步骤要使用的已连接 Microsoft Teams 账号。 |
| Action | 是 | 要执行的 Microsoft Teams 操作（例如 Get user profile、List teams、Get team by ID、List team channels）。 |
| Arguments | 是 | 由操作的架构生成的、按操作区分的表单字段。每个文本字段都有一个 **Insert Variable** 按钮，可用于注入 `{{placeholder}}` 值。高级用法还可使用 **Raw JSON** 选项卡。 |
| When the step fails | 否 | 控制此步骤失败时，工作流应当 **Terminate Workflow** 还是 **Continue**。 |

在配置此步骤之前，请通过登录流程在你工作区的 **Integrations** 中连接 Microsoft Teams。如果没有可用的活动连接，步骤会显示警告，并提供指向 **Integrations** 的链接，而不是账号选择器。

## 参数表单

当你选择一个操作时，**Arguments** 部分会根据该操作的输入架构渲染一个表单。引用现有记录的字段包含下拉选择器。

如果你更喜欢手动编写完整的参数对象，请切换到 **Raw JSON** 选项卡。任一选项卡中的更改都会保持同步。

## 常用操作

| 操作 | 描述 |
| - | - |
| **Get user profile** | 获取已连接用户的个人资料详情。 |
| **List teams** | 列出已连接用户可用的团队。 |
| **Get team by ID** | 通过 ID 获取具有其属性的团队。 |
| **List team channels** | 列出团队中的频道。 |
| **Create a channel** | 在团队中创建一个新频道。 |
| **Get team channel** | 获取团队中的特定频道。 |
| **List channel messages** | 列出团队频道中的消息。 |
| **Send channel message** | 向频道发布一条新消息。 |
| **Update channel message** | 更新频道中的现有消息。 |
| **Reply to channel message** | 回复现有的频道消息。 |
| **Create online meeting** | 安排一场独立的在线会议。 |
| **Get online meeting** | 获取在线会议的详细信息。 |
| **Update online meeting** | 更新现有的在线会议。 |

删除记录等破坏性操作不在工作流操作选择器中提供。

## 输出

此步骤会将 Microsoft Teams 的响应作为步骤输出进行存储。响应的结构取决于所执行的操作。

在后续步骤中使用完整的输出引用：

```text theme={null}
{{STEP_IDENTIFIER.output}}
```

## 示例

1. 打开 **Integrations**，如果你还没有连接 Microsoft Teams，就先连接它。
2. 在你的工作流中添加一个 **Microsoft Teams** 步骤。
3. 在 **Authentication** 中选择一个已连接账号。
4. 在 **Action** 中选择 **Get user profile**。
5. 填写必需字段。使用 **Insert Variable** 来引用前一步输出的任何字段值。
6. 点击步骤标题栏中的 **Run** 来测试该操作，然后在 **Output** 中查看返回的有效载荷。

## 使用场景

### 发布频道更新

1. List team channels
2. Send channel message
3. Reply to channel message

### 管理会议

1. Create online meeting
2. Get online meeting
3. Update online meeting

### 处理日程变更

1. List shifts
2. Create team schedule shift
3. Update team schedule shift

## 注释

* 此步骤依赖于你工作区中已连接的 Microsoft Teams 集成。
* 工作流操作选择器会显示一组精选操作。拥有 Microsoft Teams 工具的代理可以使用更多操作。
* 登录界面可能会显示第三方授权品牌标识。

## 将 Microsoft Teams 作为代理工具使用

你也可以在 **Agent Editor** 中将 Microsoft Teams 添加为工具。打开代理，点击 **Add tool**，然后选择 **Microsoft Teams**。在工具设置面板中，选择代理应使用的已连接账号。当相关于对话时，代理会调用 Microsoft Teams 操作。

另请参阅：[Integrations](https://docs.fetchhive.com/zh/workspace/integrations.md)、[Creating and Editing](https://docs.fetchhive.com/zh/workflows/creating-and-editing.md) 和 [Testing and Iteration](https://docs.fetchhive.com/zh/workflows/testing-and-iteration.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.