- 概述
- Excel
- 发行说明
- 关于 Excel 活动包
- 项目兼容性
- 受支持的字符编码
- 项目设置
- 添加或更新 Excel 敏感性标签
- 附加范围
- 自动填充
- 自动调整范围
- 更改透视表数据源
- 清除工作表/范围/表格
- 复制/粘贴范围
- 创建透视表
- 删除列
- 删除行
- 删除工作表
- 复制工作表
- 导出为 CSV
- 填充范围
- 筛选
- 筛选条件透视表
- 查找数据的首行/末行
- 查找/替换值
- 对每个 Excel 行
- 对每个 Excel 工作表
- 格式化为表格
- 设置单元格的格式
- 获取单元格颜色
- 获取 Excel 图表
- 获取 Excel 敏感性标签
- 获取选定范围
- 插入列
- 插入图表
- 插入行
- 插入工作表
- 调用 VBA
- 查找
- “匹配”功能
- 保护工作表
- 读取单元格公式
- 读取单元格值
- 读取范围
- 刷新 Excel 数据连接
- 刷新透视表
- 删除重复项
- 重命名工作表
- 运行电子表格宏
- 保存 Excel 文件
- 将 Excel 文件另存为
- 将 Excel 文件保存为 PDF 格式
- 选择范围
- 范围排序
- 分列
- 取消保护工作表
- 更新 Excel 图表
- 使用 Excel 文件
- VLookup
- 写入单元格
- 写入 CSV
- 将数据表写入 Excel
- Google Workspace
- 发行说明
- 关于“Google Workspace”活动包
- 项目兼容性
- 项目设置
- 添加参加者
- 创建活动
- 删除活动
- 修改活动
- 搜索活动
- 使用 Google 云端硬盘
- 共享文件
- 删除文件权限
- 获取文件权限
- 更新文件权限
- 复制文件
- 创建文件夹
- 删除文件
- 下载文件
- 查找文件和文件夹
- 获取文件信息
- 移动文件
- 上传文件
- 创建文档
- 创建新电子表格
- 获取邮件消息
- 发送邮件消息
- 更改标签
- 使用 Google 电子表格
- 添加/删除列
- 添加删除行
- 自动填充范围
- 添加新工作表
- 附加行
- 批量电子表格更新
- 复制工作表
- 复制粘贴范围
- 删除范围
- 删除工作表
- 获取单元格颜色
- 获取工作表
- 读取单元格
- 读取列
- 读取范围
- 读取行
- 重命名工作表
- 写入单元格
- 写入范围
- 清除范围
- 下载电子表格
- 使用 Google 文档
- 批量文档更新
- 获取文档
- 获取文本索引
- 插入文本
- 替换文本
- 读取所有文本
- 创建脚本项目
- 获取项目内容
- 上传脚本文件
- 创建部署
- 运行脚本
- 邮件
- Microsoft 365
- 发行说明
- 关于 Microsoft Office 365 活动包
- 项目兼容性
- 项目设置
- Microsoft Office 365 作用域
- 添加工作表
- 附加范围
- 清除范围
- 复制范围
- 复制工作表
- 创建工作簿
- 删除范围
- 删除工作表
- 获取单元格颜色
- 获取工作表
- 读取单元格
- 读取列
- 读取范围
- 读取行
- 重命名工作表
- 写入单元格
- 写入范围
- 设置范围颜色
- 创建表格
- 获取表格范围
- 插入列
- 删除列
- 插入行
- 删除行
- VLookup 范围
- 使用 OneDrive 和 SharePoint
- 复制文件/文件夹
- 创建文件夹
- 删除文件/文件夹
- 下载文件
- 将文件导出为 PDF
- 查找文件和文件夹
- 获取文件/文件夹
- 移动文件/文件夹
- 上传文件
- 共享文件/文件夹
- 遍历每个文件/文件夹
- 转发邮件
- 查找会议时间
- 获取邮件
- 移动邮件
- 发送邮件
- 回复邮件
- 删除邮件
- 设置邮件类别
- 添加附件
- 添加参加者
- 添加地点
- 创建活动
- 删除活动
- 获取日历
- 修改活动
- RSVP
- 搜索活动
- 创建组
- 删除组
- 获取组
- 列出组
- 创建存储桶
- 删除存储桶
- 列出存储桶
- 列出存储桶任务
- 创建计划
- 获取计划
- 列出计划
- 创建任务
- 删除任务
- 获取任务
- 列出任务
- 更新任务
- 遍历列表
- 获取列表信息
- 遍历列表项目
- 删除列表项目
- 添加列表项目
- 更新列表项目
- 获取列表项目
- 演示文稿
- Word

Productivity Activities
The example below explains how to create a workflow that automatically sends a test email, identifies it, and moves it in the Junk folder. It presents activities such as Send Outlook Mail Message, Get Outlook Mail Messages, and Move Outlook Mail Message. You can find these activities in the UiPath.Mail.Activities package.
This is how the automation process can be built:
- Open Studio and create a new Process.
-
Drag a Sequence container in the Workflow Designer.
-
Create the following variables:
Variable Name
Variable Type
Default Value
messages
System.Collections.Generic.List<System.Net.Mail.MailMessage>
junkMailFolder
String
"Junk Email"
filter
String
sendTo
String
-
-
Drag an Assign activity inside the Sequence container.
- Add the variable
sendTo
in the To field. -
Add your email address in the Value field.
Note: Make sure that thetest.txt
file is added to your project folder. This is used for sending you a testing email.
- Add the variable
-
Drag a Send Outlook Mail Message activity below the Assign activity.
- Add the variable
sendTo
in the To field. - Add the expression
"This is a test mail for me"
in the Subject field. - Add the expression
"Lorem ipsum"
in the Body field.
- Add the variable
-
Drag a Delay activity below the Send Outlook Mail Message activity.
- In the Properties panel, add the value
00:00:10
in the Duration field.
- In the Properties panel, add the value
-
Drag an Assign activity below the Delay activity.
- Add the variable
filter
in the To field. - Add the expression
"[Subject]='This is a test mail for me' AND [Received] >= '1/17/2019'"
in the Value field.
- Add the variable
-
Drag a Get Outlook Mail Message activity below the Assign activity.
- In the Properties panel, add the variable
filter
in the Filter field. - Add the variable
messages
in the Messages field.
- In the Properties panel, add the variable
-
Drag a Write Line activity below the Get Outlook Mail Message activity.
- Add the expression
String.Format("# of test mails found: {0}", messages.Count)
in the Text field.
- Add the expression
-
Drag an If activity below the Write Line activity.
- Add the expression
messages.Count = 1
in the Condition field.
- Add the expression
-
Drag a Sequence container inside the Then field of the If activity.
-
Create the following variable:
Variable Name
Variable Type
Default Value
testMail
System.Net.Mail.MailMessages
-
-
Drag an Assign activity inside the Sequence container.
- Add the variable
testMail
in the To field. - Add the expression
messages(0)
in the Value field.
- Add the variable
-
Drag a Move Outlook Mail Message below the Assign activity.
- Add the variable
testMail
in the Mail Message field. - Add the variable
junkMailFolder
in the Mail Folder field.
- Add the variable
-
Drag a Write Line activity inside the Else field of the If activity.
-
Add the expression
"We're getting more test mails than expected. Check your Inbox and perform a cleanup before trying this sample again."
in the Text field.This is how your workflow should look:
-
- Run the process. A test email is sent to your mailbox, verified, and moved to the Junk Folder.