Deploy Workflows to Logic App Standard using AZ CLI Task in DevOps Pipeline with Append Option

This post has been republished via RSS; it originally appeared at: Microsoft Tech Community - Latest Blogs - .



The zipDeploy method used for Deploying Logic Apps Standard overwrites all/any existing files in the wwwroot folder. Set up DevOps for Standard logic apps - Azure Logic Apps | Microsoft Learn

This tutorial is for using an Azure CLI task instead of the zipDeploy task, to give you flexibility on whether to overwrite the files/folder or not.


Services Used

  • Azure Devops
  • Azure CLI
  • Logic Apps Standard


Artifacts Folder Configuration


Create the zip file with that contains your workflow folders, and any other files that need to modified, like host.json or connections.json, in the following structure.


Note: If you're including the connections.jsonparameters.json and host.json, in the zip file, please ensure to include the content for the already existing workflows and existing settings, as these files will get completely overwritten:

| Workflow1-Folder

| workflow.json

| Workflow2-Folder

| workflow.json

| connections.json


| parameters.json


| host.json








Upload the Artifacts to DevOps


In the Repos sections of DevOps, select “Upload file(s)” and upload the file containing the workflow folders, and any other files that will be uploaded to the wwwroot directory of the Logic App.




Pipeline Creation


To create a new pipeline, go to Pipelines > “New Pipeline”





Select where your code is:





Select the “Starter Pipeline”:





Give it a name and "Save" it:





Pipeline Configuration


Open your Pipeline YAML file and on a new line, search for “Azure CLI” in the Tasks bar. 





Fill out the following information in the Azure CLI Task prompt and click “Add”.


Azure Resource Manager connection

<subscription reference>

Script Type


Script Location

Inline script

Inline Script

az webapp deploy --resource-group ResourceGroupName --name LogicAppName --src-path --type=zip --clean false








The final pipeline should have the AzureCLI task like so:





- task: AzureCLI@2


    azureSubscription: 'subscription reference'

    scriptType: 'bash'

    scriptLocation: 'inlineScript'

    inlineScript: 'az webapp deploy --resource-group ResourceGroupName --name LogicAppName --src-path --type=zip --clean false'


Pipeline Deployment


Before running the pipeline, I have created an existing workflow in my Logic App.





Now we “Validate and save” the pipeline:








“Run” the pipeline:







The job has succeeded:





The list of workflows has been updated, and the original workflow still exists.





DevOps Deploy Task: Set up DevOps for Standard logic apps - Azure Logic Apps | Microsoft Learn

Deploy Az WebApp Command: Deploy files to App Service - Azure App Service | Microsoft Learn

ZipDeploy Details: AzureFunctionApp@2 - Azure Functions Deploy v2 task | Microsoft Learn

AZ CLI Documentation: az webapp | Microsoft Learn


Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.