activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

生产力活动

上次更新日期 2026年3月13日

快速入门 - 创建、上传、获取和发送

本指南旨在帮助您创建使用不同 Microsoft 365 活动的工作示例,这些活动包括创建文件夹上传文件获取项目信息发送邮件活动。

先决条件

在开始之前:

  1. 完成 Microsoft 365 设置步骤。

步骤

构建项目
  1. “Microsoft Office 365 作用域”活动添加到您的项目。

  2. 输入已注册应用程序的应用程序 ID(有关更多信息,请参阅指南)。

  3. From the AuthenticationType drop-down list, select the applicable type (e.g., InteractiveToken).

    • If you select InteractiveToken and run the sequence while you're present, you don't need to add a Password, Tenant, or Username in the Unattended section (leave empty).
  4. From the Services drop-down list, select Files (you can select the other services as well).

  5. 在“Microsoft Office 365 作用域”活动之后添加“创建文件夹” 活动。

  6. Enter a Name for the folder (e..g, "Quickstarts").

  7. In the ParentDirectory property, enter the directory where this folder will be created.

    • 如果要在根目录中创建文件夹(就像我们在此示例中所做的那样),请将此属性留空。
  8. Create and enter a new DriveItem variable for your Folder value (e.g., newFolder).

    • When creating your variable, select Microsoft.Graph.DriveItem as the variable type.
  9. 在“创建文件夹” 活动之后添加“上传文件” 活动。

  10. In the Destination property, enter the DriveItem variable you created for the Create Folder activity (e.g., newFolder).

  11. Enter the LocalFilePath of the file that you want to upload (e.g., "C:\UiPath_Projects\DemoFile.docx")

  12. Create and enter a new DriveItem variable for your Result value (e.g., uploadedFile).

    • When creating your variable, select Microsoft.Graph.DriveItem as the variable type.
  13. 在“上传文件” 活动之后添加“获取项目信息” 活动。

  14. In the ItemID property, enter the DriveItem variable that you created for the Upload File activity (e.g., uploadedFile) and append .Id at the end of the variable (e.g., uploadedFile.Id)

  15. Create and enter a new DriveItem variable for your Item value (e.g., getFile).

    • When creating your variable, select Microsoft.Graph.DriveItem as the variable type.
测试您的项目
  1. 要验证文件是否已上传并在新的 OneDrive 文件夹中找到,请在“获取项目信息” 活动之后添加“发送邮件” 活动。
  2. In the Body property, enter the following String to include a link to the file: "Here is a link to the file: "+getFile.WebUrl.
  3. Enter a Subject for your email (e.g., "Link to OneDrive File").
  4. “收件人”属性中输入您的电子邮件地址(例如{" user@uipath.com "} )。
    • 请记住在 {} 中包含您的电子邮件地址。有关详细信息,请参阅“邮件发送”属性详细信息。
  5. 单击“开始”,然后检查电子邮件并单击链接以查看文件,以验证结果。

准备就绪后,请尝试使用其他快速入门指南,以更熟悉不同的 Microsoft Office 365 活动。

工作方式

完成本指南中的步骤后,您将获得一个自动化序列,该连接器将执行以下操作:

  1. 与已注册的 Microsoft 365 应用程序( Microsoft Office 365 作用域)连接。
  2. 在 OneDrive 中创建新文件夹,用于存储新的工作簿(创建文件夹)。
  3. 将文件上传到新文件夹(上传文件)。
  4. 获取已上传文件的文件元数据( “获取项目信息”)。
  5. 通过向您发送包含已上传文件链接的电子邮件( 发送邮件 ),验证“ 上传文件” 和“获取项目信息” 活动的结果。

docs image

  • 先决条件
  • 步骤
  • 工作方式

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新