从预构建的模板创建逻辑应用工作流Create logic app workflows from prebuilt templates

为更快掌握工作流创建方法,逻辑应用提供了模板,此模板是按照常用模式预先构建的逻辑应用。To get you started creating workflows more quickly, Logic Apps provides templates, which are prebuilt logic apps that follow commonly used patterns. 使用提供的这些模板,或者对其进行编辑以适合你的方案。Use these templates as provided or edit them to fit your scenario.

此处有一些模板类别:Here are some template categories:

模板类型Template type 说明Description
企业云模板Enterprise cloud templates 用于集成 Azure Blob、Dynamics CRM、Salesforce、Box 以及其他连接器来满足企业云需求。For integrating Azure Blob, Dynamics CRM, Salesforce, Box, and includes other connectors for your enterprise cloud needs. 例如,可以使用这些模板组织业务领导方式或备份公司文件数据。For example, you can use these templates to organize business leads or back up your corporate file data.
个人工作效率模板Personal productivity templates 通过设置日常提醒、将重要工作项目添加为待办事项,以及通过自动化将耗时较长的任务缩减为单个用户同意的步骤,有助于提高个人工作效率。Improve personal productivity by setting daily reminders, turning important work items into to-do lists, and automating lengthy tasks down to a single user approval step.
消费者云模板Consumer cloud templates 用于集成 Twitter、Slack 和电子邮件等社交媒体服务。For integrating social media services such as Twitter, Slack, and email. 对于增强社交媒体营销计划十分有用。Useful for strengthening social media marketing initiatives. 这些模板还包括云复制等任务,可节省花费在传统重复性任务上的时间提高工作效率。These templates also include tasks such as cloud copying, which increases productivity by saving time on traditionally repetitive tasks.
Enterprise Integration Pack 模板Enterprise integration pack templates 可用于配置 VETER 管道(验证、提取、转换、扩展、路由),通过 AS2 接收 X12 EDI 文档并将其转换为 XML,还可用于处理 X12 和 AS2 消息。For configuring VETER (validate, extract, transform, enrich, route) pipelines, receiving an X12 EDI document over AS2 and transforming to XML, and handling X12, EDIFACT, and AS2 messages.
协议模式模板Protocol pattern templates 用于实现 HTTP 请求-响应及 FTP 和 SFTP 之间的集成等协议模式。For implementing protocol patterns such as request-response over HTTP and integrations across FTP and SFTP. 使用这些提供的模板,或在其上构建模板以处理复杂协议模式。Use these templates as provided, or build on them for complex protocol patterns.

如果没有 Azure 订阅,可以在开始前注册一个 Azure 帐户If you don't have an Azure subscription, sign up for an Azure account before you begin. 有关构建逻辑应用的详细信息,请参阅创建逻辑应用For more information about building a logic app, see Create a logic app.

从模板创建逻辑应用Create logic apps from templates

  1. 登录到 Azure 门户(如果尚未登录)。If you haven't already, sign in to the Azure portal.

  2. 在 Azure 主菜单中,选择“创建资源” > “企业集成” > “逻辑应用”。From the main Azure menu, choose Create a resource > Enterprise Integration > Logic App.

    Azure 门户 >“新建”>“Enterprise Integration”>“逻辑应用”

  3. 使用此图片下面表格中的设置创建逻辑应用:Create your logic app with the settings in the table under this image:

    提供逻辑应用的详细信息

    设置Setting Value 说明Description
    名称Name your-logic-app-nameyour-logic-app-name 提供一个唯一的逻辑应用名称。Provide a unique logic app name.
    订阅Subscription your-Azure-subscription-nameyour-Azure-subscription-name 选择要使用的 Azure 订阅。Select the Azure subscription that you want to use.
    资源组Resource group your-Azure-resource-group-nameyour-Azure-resource-group-name 创建或选择一个用于此逻辑应用的 Azure 资源组,以便组织与此应用相关联的所有资源。Create or select an Azure resource group for this logic app and to organize all resources associated with this app.
    位置Location your-Azure-datacenter-regionyour-Azure-datacenter-region 选择用于部署逻辑应用的数据中心区域,例如“中国东部”。Select the datacenter region for deploying your logic app, for example, China East.
  4. 准备就绪后,请选择“固定到仪表板” 。When you're ready, select Pin to dashboard. 这样一来,逻辑应用就会自动显示在 Azure 仪表板上,并在部署后打开。That way, your logic app automatically appears on your Azure dashboard and opens after deployment. 选择“创建”。 Choose Create.

    Note

    如果不希望固定逻辑应用,则必须在部署后手动查找并打开逻辑应用,然后才能继续。If you don't want to pin your logic app, you must manually find and open your logic app after deployment so you can continue.

    在 Azure 部署逻辑应用以后,逻辑应用设计器会打开并显示一个包含简介视频的页面。After Azure deploys your logic app, the Logic Apps Designer opens and shows a page with an introduction video. 在视频下可以找到常用逻辑应用模式的模板。Under the video, you can find templates for common logic app patterns.

  5. 略过简介视频和常见触发器,滚动到模板 。Scroll past the introduction video and common triggers to Templates. 选择预构建的模板。Choose a prebuilt template. 例如:For example:

    选择逻辑应用模板

    Tip

    请选择“空白逻辑应用”,以便可以从头开始构建逻辑应用 。To create your logic app from scratch, choose Blank Logic App.

    选择预建构模板时,可以查看有关该模板的详细信息。When you select a prebuilt template, you can view more information about that template. 例如:For example:

    选择预构建的模板

  6. 若要使用所选模板继续,请选择“使用此模板” 。To continue with the selected template, choose Use this template.

  7. 根据模板中的连接器,可能提示你执行这些步骤:Based on the connectors in the template, you are prompted to perform any of these steps:

    • 使用凭据登录到模板所引用的系统或服务。Sign in with your credentials to systems or services that are referenced by the template.

    • 创建模板引用的服务或系统连接。Create connections for any services or systems referenced by the template. 若要创建连接,请提供连接名称,并按需选择要使用的资源。To create a connection, provide a name for your connection, and if necessary, select the resource that you want to use.

    • 如果已设置这些连接,请选择“继续” 。If you already set up these connections, choose Continue.

    例如:For example:

    创建连接

    完成后,逻辑应用将会在逻辑应用设计器中开启并显示。When you're done, your logic app opens and appears in the Logic Apps Designer.

    Tip

    若要返回到模板查看器,请选择设计器工具栏上的“模板” 。To return to the template viewer, choose Templates on the designer toolbar. 此操作会放弃所有未保存更改,因此,会出现警告消息,以确认请求。This action discards any unsaved changes, so a warning message appears to confirm your request.

  8. 继续建构逻辑应用。Continue building your logic app.

    Note

    许多模板包括已预先安装了所需属性的连接器。Many templates include connectors that might already have prepopulated required properties. 不过,某些模板仍然要求提供值,才能正确部署逻辑应用。However, some templates might still require that you provide values before you can properly deploy the logic app. 如果在完成缺失的属性字段前部署应用,会收到错误消息。If you try to deploy without completing the missing property fields, you get an error message.

使用模板更新逻辑应用Update logic apps with templates

  1. Azure 门户的逻辑应用设计器中查找逻辑应用并将其打开。In the Azure portal, find and open your logic app in th Logic App Designer.

  2. 在设计器工具栏上,选择“模板” 。On the designer toolbar, choose Templates. 此操作会放弃所有未保存更改,因此,会出现警告消息,以便确认是否继续。This action discards any unsaved changes, so a warning message appears so you can confirm that you want to continue. 若确认执行请求,请选择“确定” 。To confirm, choose OK. 例如:For example:

    选择“模板”

  3. 略过简介视频和常见触发器,滚动到模板 。Scroll past the introduction video and common triggers to Templates. 选择预构建的模板。Choose a prebuilt template. 例如:For example:

    选择逻辑应用模板

    选择预建构模板时,可以查看有关该模板的详细信息。When you select a prebuilt template, you can view more information about that template. 例如:For example:

    选择预构建的模板

  4. 若要使用所选模板继续,请选择“使用此模板” 。To continue with the selected template, choose Use this template.

  5. 根据模板中的连接器,可能提示你执行这些步骤:Based on the connectors in the template, you are prompted to perform any of these steps:

    • 使用凭据登录到模板所引用的系统或服务。Sign in with your credentials to systems or services that are referenced by the template.

    • 创建模板引用的服务或系统连接。Create connections for any services or systems referenced by the template. 若要创建连接,请提供连接名称,并按需选择要使用的资源。To create a connection, provide a name for your connection, and if necessary, select the resource that you want to use.

    • 如果已设置这些连接,请选择“继续” 。If you already set up these connections, choose Continue.

    创建连接

    此时,逻辑应用将会逻辑应用设计器中开启并显示。Your logic app now opens and appears in the Logic Apps Designer.

  6. 继续建构逻辑应用。Continue building your logic app.

    Tip

    如果还未保存更改,可放弃操作,返回到先前的逻辑应用。If you haven't saved your changes, you can discard your work and return to your previous logic app. 在设计器工具栏上,选择“放弃” 。On the designer toolbar, choose Discard.

Note

许多模板包括已预先安装了所需属性的连接器。Many templates include connectors that might have already pre-populated required properties. 不过,某些模板仍然要求提供值,才能正确部署逻辑应用。However, some templates might still require that you provide values before you can properly deploy the logic app. 如果在完成缺失的属性字段前部署应用,会收到错误消息。If you try to deploy without completing the missing property fields, you get an error message.

部署模板构建的逻辑应用Deploy logic apps built from templates

对模板进行更改之后,可保存所做更改。After you make your changes to the template, you can save your changes. 此操作还自动将发布应用逻辑。This action also automatically publishes your logic app.

在设计器工具栏上,选择“保存” 。On the designer toolbar, choose Save.

保存并发布逻辑应用

获取支持Get support

后续步骤Next steps

了解构建逻辑应用的全部示例、方案、客户案例和演练。Learn about building logic apps through examples, scenarios, customer stories, and walkthroughs.