使用 Azure 逻辑应用管理 Outlook.com 中的电子邮件、日历和联系人Manage email, calendars, and contacts in Outlook.com by using Azure Logic Apps

使用 Azure 逻辑应用Outlook.com 连接器,可以通过构建逻辑应用来创建用于管理 @outlook.com 或 @hotmail.com 帐户的自动化任务和工作流。With Azure Logic Apps and the Outlook.com connector, you can create automated tasks and workflows that manage your @outlook.com or @hotmail.com account by building logic apps. 例如,可以自动执行以下任务:For example, you automate these tasks:

  • 获取、发送和回复电子邮件。Get, send, and reply to email.
  • 在日历上安排会议。Schedule meetings on your calendar.
  • 添加和编辑联系人。Add and edit contacts.

可以使用任何触发器来启动工作流,例如,当新电子邮件到达时、当日历项更新时或其他服务中发生某个事件时。You can use any trigger to start your workflow, for example, when a new email arrives, when a calendar item is updated, or when an event happens in a difference service. 可以使用对触发器事件做出响应的操作,例如,发送电子邮件或创建新的日历事件。You can use actions that respond to the trigger event, for example, send an email or create a new calendar event.

备注

若要针对 Microsoft 工作帐户(例如 @fabrikam.partner.onmschina.cn)自动执行任务,请使用 Office 365 Outlook 连接器To automate tasks for a Microsoft work account such as @fabrikam.partner.onmschina.cn, use the Office 365 Outlook connector.

必备条件Prerequisites

  • 一个 Outlook.com 帐户An Outlook.com account

  • Azure 订阅。An Azure subscription. 如果没有 Azure 订阅,请注册一个 Azure 试用帐户If you don't have an Azure subscription, sign up for a trial Azure account.

  • 你要在其中访问 Outlook.com 帐户的逻辑应用。The logic app where you want to access your Outlook.com account. 若要通过 Outlook.com 触发器启动工作流,你需要有一个空白逻辑应用To start your workflow with an Outlook.com trigger, you need to have a blank logic app. 若要向工作流中添加 Outlook.com 操作,逻辑应用需要已有一个触发器。To add an Outlook.com action to your workflow, your logic app needs to already have a trigger.

添加触发器Add a trigger

触发器是一个事件,用于启动逻辑应用中的工作流。A trigger is an event that starts the workflow in your logic app. 此示例逻辑应用使用一个“轮询”触发器,该触发器根据指定的时间间隔和频率检查电子邮件帐户中是否有任何新电子邮件。This example logic app uses a "polling" trigger that checks for any new email in your email account, based on the specified interval and frequency.

  1. Azure 门户中,在逻辑应用设计器中打开你的空白逻辑应用。In the Azure portal, open your blank logic app in the Logic App Designer.

  2. 在搜索框中,输入“outlook.com”作为筛选器。In the search box, enter "outlook.com" as your filter. 对于此示例,选择“新电子邮件到达时” 。For this example, select When a new email arrives.

  3. 如果提示你登录,请提供你的 Outlook.com 凭据,以便逻辑应用可以连接到你的帐户。If you're prompted to sign in, provide your Outlook.com credentials so that your logic app can connect to your account. 或者,如果连接已存在,请提供触发器属性的信息:Otherwise, if your connection already exists, provide the information for the trigger properties:

  4. 在触发器中,设置“频率” 和“间隔” 值。In the trigger, set the Frequency and Interval values.

    例如,如果希望触发器每 15 分钟轮询一次,请将“频率” 设置为“分钟” ,将“间隔” 设置为“15” 。For example, if you want the trigger to poll every 15 minutes, set the Frequency to Minute, and set the Interval to 15.

  5. 在设计器工具栏上,选择“保存” ,这将保存你的逻辑应用。On the designer toolbar, select Save, which saves your logic app.

若要响应触发器,请添加另一操作。To respond to the trigger, add another action. 例如,你可以添加 Twilio 发送消息操作,该操作将在电子邮件到达时发送一个文本。For example, you can add the Twilio Send message action, which sends a text when an email arrives.

添加操作Add an action

操作是指由逻辑应用中的工作流运行的操作。An action is an operation that's run by the workflow in your logic app. 此示例逻辑应用从你的 Outlook.com 帐户发送一封电子邮件。This example logic app sends an email from your Outlook.com account. 可以使用其他触发器的输出来填充操作。You can use the output from another trigger to populate the action. 例如,假设你的逻辑应用使用了 SalesForce“创建对象时” 触发器。For example, suppose your logic app uses the SalesForce When an object is created trigger. 你可以添加 Outlook.com“发送电子邮件” 操作,并在电子邮件中使用该 SalesForce 触发器的输出。You can add the Outlook.com Send an email action and use the outputs from the SalesForce trigger in the email.

  1. Azure 门户的逻辑应用设计器中打开逻辑应用。In the Azure portal, open your logic app in the Logic App Designer.

  2. 若要将某个操作添加为工作流的最后一步,请选择“新建步骤” 。To add an action as the last step in your workflow, select New step.

    若要在步骤之间添加操作,请将鼠标指针移到这些步骤之间的箭头上。To add an action between steps, move your pointer over the arrow between those steps. 选择出现的加号 ( + ),然后选择“添加操作”。 Select the plus sign (+) that appears, and then select Add an action.

  3. 在搜索框中,输入“outlook.com”作为筛选器。In the search box, enter "outlook.com" as your filter. 对于此示例,请选择“发送电子邮件” 。For this example, select Send an email.

  4. 如果提示你登录,请提供你的 Outlook.com 凭据,以便逻辑应用可以连接到你的帐户。If you're prompted to sign in, provide your Outlook.com credentials so that your logic app can connect to your account. 或者,如果连接已存在,请提供操作属性的信息。Otherwise, if your connection already exists, provide the information for the action properties.

  5. 在设计器工具栏上,选择“保存” ,这将保存你的逻辑应用。On the designer toolbar, select Save, which saves your logic app.

连接器参考Connector reference

如需技术详细信息(例如触发器、操作和限制,如连接器的 Swagger 文件所述),请查看连接器的参考页For technical details, such as triggers, actions, and limits, as described by the connector's Swagger file, see the connector's reference page.

后续步骤Next steps