Edit

Share via


Create and publish workflow templates for Azure Logic Apps

Applies to: Azure Logic Apps (Consumption + Standard)

Azure Logic Apps provides prebuilt, reusable automation and integration workflow templates that you can use to speed up the process of building integration applications. These templates follow commonly used patterns and help you streamline development by providing a starting point or baseline with predefined business logic and configurations.

Templates can include one or more workflows along with their connections, parameters, and documentation. Azure Logic Apps offers the following template types:

Template type Description
Workflow Reusable templates that create single workflows.
Accelerators Bundled solutions that contain multiple related workflows.

You can find these templates in the templates gallery, which opens when you choose to create a workflow by starting with a template. The gallery already contains Microsoft-authored templates for common design and integration patterns.

Not only can you kickstart development by using workflow templates, but you can create and publish workflow templates for your organization's use alone within an Azure subscription or share them with others. Your template can include artifacts such as schemas, maps, and custom assemblies.

Organizational templates let you standardize integration patterns, share best practices, and reuse solutions across your enterprise internally without making them public. This capability is especially useful for businesses that want to promote consistency while keeping options open for flexibility. Whether your scenarios include embedding internal APIs, handling ___domain-specific logic, or enforcing architectural patterns, organizational templates help you scale and grow while you stay in control.

Azure Logic Apps templates also give you the following capabilities:

  • Publish templates in test or production mode, which allow you to safely experiment and gate keep releases.

  • Directly use APIs and internal systems in templates without having to externalize them.

  • Download template packages and optionally add them to the public workflow template repository for Azure Logic Apps in GitHub.

  • Graduate your templates from test to production by using the built-in lifecycle management in Azure DevOps, which gives your team structure but preserves agility.

  • As first-class resources in Azure, templates support Azure role-based access control (RBAC).

    • You can manage template permissions like any other Azure resource.

      These permissions respect subscription and role scopes, which means developers can see and access only those templates in subscriptions where developers have access.

      This capability provides enterprise-grade control over who can author, view, and deploy templates. You have full control over the way that you want organize templates so that you can make sure the right teams get access to the automation patterns they need.

The following screenshot shows the workflow templates gallery scoped to an organization and Azure subscription with example templates that show status labels such as Testing and Production:

Screenshot shows Azure portal and workflow templates gallery with Azure subscription-scoped custom templates in testing and production.

This guide shows how to create and publish a workflow template in the following ways:

Prerequisites

  • An Azure account and subscription. If you don't have a subscription, sign up for a free Azure account.

  • The deployed Consumption or Standard logic app resource and workflow to use as the source workflow definition for the template.

    Your logic app resource and workflow must be deployed before you create your template. Make sure that you correctly parameterize any values that the workflow's end-user must provide, rather than hardcode those values.

    If you don't have this resource and workflow, see the following articles:

  • Screenshots that show read-only preview images for the workflow that the template creates. Use the .png file name extension for these screenshots. These preview images for template appear on the template overview pane in the templates gallery.

    To store these images so that your template can use them, you need an Azure storage account and a blob container.

    To create these images, follow these steps:

    1. In the Azure portal, open the source logic app resource and workflow in the designer.

    2. Set up the workflow to create two screenshots: one version that works with a web browser's light theme and another version that works with a web browser's dark theme.

    3. Create the screenshots using your preferred screen capture tool. Don't include too much whitespace around the workflow.

    4. Save each image using the .png file name extension and a name that follows the Names and style conventions, for example, <image-name>-light.png and <image-name>-dark.png.

    5. Add your images to the blob container in your Azure storage account. Copy and save the blob URL for each image so you can later reference the images from your template.

      Important

      The URL includes a Shared Access Signature (SAS) key or token that grants permissions, for example, to storage services. Make sure to protect your SAS key just as you protect an account key from unauthorized use.

Best practices

This list provides best practices to follow when you create your workflow template:

  • Don't use hardcoded properties and their values in trigger and action definitions.

  • Provide more context about trigger and action definitions by adding descriptive and helpful comments.

  • Standard logic app resource and workflows

    • Use the built-in operations as much as possible. For example, the Azure Blob Storage connector has the following versions available for Standard workflows:

      • Built-in, service provider operations appear in the connectors gallery under the Built-in filter. These versions are hosted and run with the single-tenant Azure Logic Apps runtime, offering better performance, throughput, and other benefits.

      • Azure-hosted managed API connector operations appear in the connectors gallery under the Shared filter. These versions are hosted and run in multitenant Azure using shared global resources.

Create a workflow template

Based on whether you want to make your workflow template available only for your organization or for everyone in Azure, follow the corresponding steps:

These steps describe how to create and publish a workflow template available only for members in a specific Azure subscription.

  1. In the Azure portal search box, find and select logic apps templates.

  2. On the Logic Apps Templates page toolbar, select Create.

  3. On the Create an Azure Logic Apps template page, on the Basics tab, provide the following information:

    Parameter Required Value Description
    Subscription Yes <Azure-subscription-name> The Azure subscription to use with the workflow template.
    Resource group Yes <resource-group-name> The name for the Azure resource group to use with the template.
    Name Yes <template-name> The name for the workflow template resource.
    Region Yes <Azure-region> The Azure region for where to create the workflow template resource.
  4. When you're done, select Review + create. Review the provided information, and select Create.

    Azure creates the template resource.

Next, choose the source workflow definition to use for your template.

Choose the source workflow definition

  1. On the template resource menu, under Template, select Template.

  2. On the Template page, on the Workflows tab, select Add.

  3. On the Manage workflows in this template pane, on the Choose workflows tab, provide the following information:

    Parameter Required Value Description
    Subscription Yes <Azure-subscription-name> The name for the Azure subscription with the source logic app.
    Resource group Yes <resource-group-name> The name for the Azure resource group with the source logic app.
    Logic app instance Yes <source-logic-app> The name for the source logic app with the workflow that you want to use.
    Workflows Yes <source-workflows> For a Consumption logic app, select the sole existing workflow to use in your template.

    For a Standard logic app, select at least one workflow to use in your template.
  4. When you're done, select Next.

  5. On the Set up workflows tab, provide the following information for each selected source workflow:

    Parameter Required Value Description
    Workflow name Yes <JSON-workflow-name> The JSON name for the workflow that can use only lowercase letters, numbers, and hyphens and which you can rename only one time.
    State Yes Stateful or Stateless Whether to save and store workflow run history, operation inputs, and operation outputs, by default.
    Summary Yes <short-description> A short high-level summary about purpose for the template.
    Description No <detailed-description> A description with more detailed information about the template.
    Prerequisites No <prerequisites> Any requirements that you need before you can use the template.
  6. In the Workflow images section, provide the workflow preview images to use for the template overview pane in the templates gallery. This pane includes other template information.

    Workflow image Description
    Light-mode SAS URL The SAS URL for the light-themed workflow preview image stored in a blob container from your Azure storage account.
    Dark-mode SAS URL The SAS URL for the dark-themed workflow preview image stored in a blob container from your Azure storage account.
  7. When you're done, select Save.

    You can save your template anytime during the creation process. Every time that you save your progress, validation automatically runs to determine whether any errors exist, for example, unsupported actions or un-parameterized values. You don't have to immediately fix errors when you find them, but you must fix them before publishing.

  8. On the Connections tab, review and confirm the connections that Azure automatically pulls from the source workflows.

    You don't have to take any other actions.

  9. When you're ready, select Next.

Customize parameters

On the Parameters tab, add customization for any parameters that you want for the workflow.

  1. On the Parameters tab, select the edit icon for the parameter.

  2. Provide the following information for the parameter:

    Property Required Description
    Display name Yes The parameter name that appears in Azure portal.
    Default value No The default value for the parameter.
    Description No The description for parameter's purpose.
    Required Field No Whether the workflow requires the parameter.
  3. When you're done, select Save.

Provide template information

The Profile tab specifies information about your template that appears in the templates gallery, for example, the template's display name, publisher name, connectors, and other metadata.

  1. On the Profile tab, provide the following information about your template:

    Property Required Description
    Display name Yes The workflow template display name that appears in the templates gallery.
    By Yes The workflow template publisher name.
    Summary Yes The description for the workflow that the template creates.
    Featured connectors Yes Select the primary connector types in the workflow template.
    Category No The category where the template belongs.
    Tags No Any tags that you want to use for labeling the workflow.
  2. When you're ready, select Next.

  3. On the Summary tab, review and confirm all the provided information.

Publish for testing

When you're ready to test your template, you can publish your template for testing.

  1. On the Summary tab or a preceding tab, at the tab bottom, from the Save list, select Save + publish for testing.

    Screenshot shows Azure portal, Profile tab, and option selected for Save + publish for testing.

    Azure publishes the template, which displays the Testing label, to the templates gallery.

  2. To test your new template, follow the steps in Create workflows from prebuilt templates but with these steps:

    1. From the Status list, select Published for Testing. Under the filters row, select My Templates.

      Your template appears with the Testing label, for example:

      Screenshot shows Azure portal, templates gallery, and selected tab for My templates.

    2. Finish creating your workflow, testing your template, and making any necessary adjustments.

Publish for production

To change the template label from Testing to Production in the templates gallery, follow these steps:

  1. In the Azure portal, find and open your template resource.

  2. On the template sidebar, under Template, select Template.

  3. On the Template page, select Next and repeat until you open the Profile tab.

  4. From the Save list, select Save + publish for production.

    Screenshot shows Azure portal, Profile tab, and option selected for Save + publish for production.

If you want to temporarily or permanently remove your custom workflow template from the templates gallery, you can unpublish the template.

  1. In the Azure portal, find and open your template resource.

  2. On the template sidebar, under Template, select Template.

  3. On the Template page, select Next and repeat until you open the Profile tab.

  4. From the Save list, select Save + unpublish template.

    Screenshot shows Azure portal, Profile tab, and option selected for Save + unpublish template.

Names and style conventions

Area Convention
Sensitive data Don't include or upload personal and sensitive data in template files, screenshots, descriptions, or test data. For example, this data includes subscription IDs, usernames, passwords, and so on.
Folder names For easier readability, use lowercase and hyphens when possible. See Capitalization – Microsoft Style Guide.
Image file names Use the .png as the file name extension, lowercase, and hyphens, for example, workflow-light.png.
Product, service, technology, and brand names Follow the official spelling and capitalization. For example:

- When you refer to the service name or platform, use "Azure Logic Apps", not "Logic Apps".

- When you refer to the resource or instance, use "logic apps" or "logic app", not "Logic App" or "Logic Apps".

- When you refer to the sequence of trigger and actions, use "logic app workflow" or "workflow".
Abbreviations and acronyms Use the expanded name for product, service, technology, brand names, and uncommon technical terms, not abbreviations or acronyms. Common acronyms, such as "HTTP" and "URL", are acceptable. For example, use "Visual Studio Code", not "VS Code". See Acronyms – Microsoft Style Guide.
Other text - Use sentence case for titles, headings, and body content, which means that you capitalize only the first letter unless you have product, service, technology, or brand name.

- Don't capitalize ordinary nouns and articles, such as "a", "an", "and", "or", "the", and so on.
Voice - Use second person voice (you and your), rather than third person (users, developers, customers) unless you need to refer to specific roles. See Person – Microsoft Style Guide.

- Use an active, direct, but friendly tone when possible. Active voice focuses on the subject and verb in text, while passive voice focuses on the object in text.
Vocabulary - Use simple, common, everyday words, such as "use", rather than "utilize" or "leverage".

- Don't use words, phrases, jargon, colloquialisms, idioms, or slang that don't translate well across languages.

- Use "please" only for specific scenarios. See please – Microsoft Style Guide.

- Use "for example" or "such as", not "e.g." or "i.e.".

- Don't use directional terms such as "here", "above", "below", "right", and "left", which aren't accessible friendly.
Punctuation - For a series of items, include the last comma before the conjunction, such as "and". For example, "apples, oranges, and bananas". See Commas – Microsoft Style Guide.

- End full sentences with appropriate punctuation. Don't use exclamation points. See Punctuation – Microsoft Style Guide.
Formatting - For code, follow the style convention for that code's language.

- Don't use hardcoded links, which break if the URLs change. In your PR request, ask for a redirection link to use instead.

- For links, use the following format:

"For more information, see [descriptive-link-text](URL)].".

- Use descriptive link text, not generic or vague link text, such as "See [here](URL)."

- Use numbers only for steps in a procedure, not for lists that have no specific order. See Lists – Microsoft Style Guide.

- Use only one space after punctuation unless you're indenting code.

For more guidance, see the Microsoft Style Guide and Global writing tips.

Create logic app workflows from prebuilt templates