管理 Microsoft Flow 中的连接Manage connections in Microsoft Flow

如果在 Microsoft Flow 中创建连接,可以在生成流时轻松访问数据。If you create a connection in Microsoft Flow, you can easily access your data while building a flow. Microsoft Flow 包含常用连接,其中包括 SharePoint、SQL Server、Office 365、OneDrive for Business、Salesforce、Excel、Dropbox、Twitter 等。Microsoft Flow includes commonly used connections, including SharePoint, SQL Server, Office 365, OneDrive for Business, Salesforce, Excel, Dropbox, Twitter, and more. 连接与 PowerApps 共享,因此,在一个产品中创建连接时,连接会显示在另一个产品中。Connections are shared with PowerApps, so when you create a connection in one product, the connection shows up in the other.

例如,可以使用连接来执行这些任务:For example, you can use a connection to perform these tasks:

  • 更新 SharePoint 列表。Update a SharePoint list.
  • 从 OneDrive for Business 或 Dropbox 帐户中的 Excel 文件获取数据。Get data from an Excel file in your OneDrive for Business or Dropbox account.
  • 在 Office 365 中发送电子邮件。Send email in Office 365.
  • 发送推文。Send a tweet.

可以采用多种方案创建连接,例如以下方案:You can create a connection in multiple scenarios, such as these:

本主题说明如何在 Microsoft Flow 网站中管理连接。This topic shows you how to manage connections in the Microsoft Flow website.

添加连接Add a connection

  1. Microsoft Flow 网站中,使用工作帐户或组织帐户登录。In the Microsoft Flow website, sign in with your work or organization account.

  2. 在右上角附近选择齿轮图标,然后选择“连接”。Near the upper-right corner, select the gear icon, and then select Connections.

    选择连接

  3. 选择“创建连接”。Select Create connection.

  4. 在“可用连接”列表中,选择要设置的连接,例如 SharePoint。In the list of Available connections, select the connection that you want to set up, such as SharePoint.

  5. 选择“创建连接”按钮,然后输入凭据以设置连接。Select the Create connection button, and then enter your credentials to set up the connection.

设置了连接后,该连接就会在“我的连接”中列出。When the connection is set up, it's listed in My connections.

通过本地数据网关连接到数据Connect to your data through an on-premises data gateway

在撰写本文时,SQL Server 和 SharePoint Server 支持本地数据网关。As of this writing, SQL Server and SharePoint Server support the on-premises data gateway. 若要创建使用网关的连接:To create a connection that uses a gateway:

  1. 按本主题前述步骤添加连接。Follow the steps earlier in this topic to add a connection.

  2. 在“可用连接”列表中,选择“SQL Server”,然后选择“通过本地数据网关连接”复选框。In the list of Available connections, select SQL Server, and then select the Connect via on-premise data gateway check box.

    选择网关

    重要

    Microsoft SharePoint 数据网关支持 HTTP 流量,但不支持 HTTPS 流量。Microsoft SharePoint data gateways support HTTP traffic but not HTTPS traffic.

  3. 提供连接的凭据,然后选择要使用的网关。Provide the connection's credentials, and then select the gateway that you want to use.

    有关详细信息,请参阅管理网关了解网关For more information, see Manage gateways and Understand gateways.

    设置了连接后,该连接就会在“我的连接”中列出。When the connection is set up, it's listed in My connections.

删除连接Delete a connection

  1. 转到“我的连接”页,然后选择要删除的连接的垃圾桶图标。Go to the My connections page, and then select the trash-can icon for the connection you want to delete.

    删除连接

  2. 选择“确定”以确认要删除连接。Select OK to confirm that you would like to delete the connection.

    确认删除

删除连接时,连接将从 PowerApps 和 Microsoft Flow 中删除。When you delete a connection, it's removed from both PowerApps and Microsoft Flow.

更新连接Update a connection

对于因为帐户详细信息或密码已更改而不起作用的连接,你可以更新该连接。You can update a connection that isn't working because your account details or your password changed.

  1. 在“我的连接”页上,选择要更新的连接的“验证密码”链接。On the My connections page, select the Verify password link for the connection that you want to update.

    验证密码

  2. 出现提示时,请使用新凭据更新连接。When prompted, update your connection with new credentials.

更新连接时,该连接将在 PowerApps 和 Microsoft Flow 二者中更新。When you update a connection, it's updated for both PowerApps and Microsoft Flow.

排查连接问题Troubleshoot a connection

根据组织的策略,可能需要使用相同的帐户登录到 Microsoft Flow 并创建与 SharePoint、Office 365 或 OneDrive for Business 的连接。Depending on your organization's policies, you might need to use the same account for signing in to Microsoft Flow and creating a connection to SharePoint, Office 365 or OneDrive for Business.

例如,你可能会使用 *yourname@outlook.com* 登录到 Microsoft Flow,但在尝试使用 *yourname@contoso.com* 连接到 SharePoint 时被阻止。For example, you might sign in to Microsoft Flow with *yourname@outlook.com* but be blocked when you try to connect to SharePoint with *yourname@contoso.com*. 可以改为使用 *yourname@contoso.com* 登录到 Microsoft Flow,然后你将能够连接到 SharePoint。You can instead sign in to Microsoft Flow with *yourname@contoso.com* and you'll be able to connect to SharePoint.