Blog Post

Azure Infrastructure Blog
5 MIN READ

Build and Deploy Logic App Workflows Using Visual Studio Code and CI/CD Pipeline

Devi_Priya's avatar
Devi_Priya
Icon for Microsoft rankMicrosoft
Jun 23, 2025

This guide provides instructions for creating a sample Standard logic app workflow locally using Visual Studio Code and the Azure Logic Apps (Standard) extension, intended for use with single-tenant Azure Logic Apps.

Throughout this guide, you'll create a Standard logic app workspace and project, build your workflow, and deploy it as a Standard logic app resource in Azure. This enables your workflow to run in a single-tenant Azure Logic Apps environment or within an App Service Environment v3 (restricted to Windows-based App Service plans).

Key advantages of Standard logic apps include:

You can locally develop, debug, run, and test workflows within the Visual Studio Code environment. Although both the Azure portal and Visual Studio Code support building, running, and deploying Standard logic app resources and workflows, Visual Studio Code allows you to perform all these actions locally, offering greater flexibility during development.

Prerequisites
  1. Visual Studio Code
  2. Azure Account extension for Visual Studio Code
  3. Download and install the following Visual Studio Code dependencies for your specific operating system using either method:

Starting with version 2.81.5, the Azure Logic Apps (Standard) extension for Visual Studio Code includes a dependency installer that automatically installs all the required dependencies in a new binary folder and leaves any existing dependencies unchanged. 

This extension includes the following dependencies:

Dependency

Description

C# for Visual Studio Code

Enables F5 functionality to run your workflow.

Azurite for Visual Studio Code

Provides a local data store and emulator to use with Visual Studio Code so that you can work on your logic app project and run your workflows in your local development environment. If you don't want Azurite to automatically start, you can disable this option:

1. On the File menu, select Preferences > Settings.

2. On the User tab, select Extensions > Azure Logic Apps (Standard).

3. Find the setting named Azure Logic Apps Standard: Auto Start Azurite, and clear the selected checkbox.

.NET SDK 6.x.x

Includes the .NET Runtime 6.x.x, a prerequisite for the Azure Logic Apps (Standard) runtime.

Azure Functions Core Tools - 4.x version

Installs the version based on your operating system (WindowsmacOS, or Linux).

These tools include a version of the same runtime that powers the Azure Functions runtime, which the Azure Logic Apps (Standard) extension uses in Visual Studio Code.

Node.js version 16.x.x unless a newer version is already installed

 

Required to enable the Inline Code Operations action that runs JavaScript.

Set up Visual Studio code
  • To make sure that all the extensions are correctly installed, reload or restart Visual Studio Code.
  • Confirm that the Azure Logic Apps Standard: Project Runtime setting for the Azure Logic Apps (Standard) extension is set to version ~4:
  • On the File menu, go to Preferences > Settings.
  • On the User tab, go to > Extensions > Azure Logic Apps (Standard).
  • You can find the Azure Logic Apps Standard: Project Runtime setting here or use the search box to find other settings:

Connect to your Azure account

  1. On the Visual Studio Code Activity Bar, select the Azure icon.

 

 

In the Azure window, on the Workspace section toolbar, from the Azure Logic Apps menu, select Create New Project.

 

From the templates list that appears, select either Stateful Workflow or Stateless Workflow.

Provide a name for your workflow and press Enter. 

If Visual Studio Code prompts you to open your project in the current Visual Studio Code or in a new Visual Studio Code window, select Open in current window.

Visual Studio Code finishes creating your project.

The Explorer pane shows your project, which now includes automatically generated project files. For example, the project has a folder that shows your workflow's name. Inside this folder, the workflow.json file contains your workflow's underlying JSON definition.

Open the workflow.json file's shortcut menu, and select Open Designer.

If it asks for Enable connectors in Azure, select Use connectors from Azure

  • Select subscription list opens, select the Azure subscription to use for your logic app project.
  • After that resource groups list opens, select RG to use for your logic app project.
  • After you perform this step, Visual Studio Code opens the workflow designer.

After you open a blank workflow in the designer, the Add a trigger prompt appears on the designer. You can now start creating your workflow by adding a trigger and actions and save it.

 Run, test, and debug locally

  1. Make sure to start the emulator before you run your workflow:
  2. In Visual Studio Code, from the View menu, select Command Palette.
  3. After the command palette appears, enter Azurite: Start.
  4. On the Visual Studio Code Activity Bar, open the Run menu, and select Start Debugging (F5).

The Terminal window opens so that you can review the debugging session.

Now, find the callback URL for the endpoint on the Request trigger.

  1. Reopen the Explorer pane so that you can view your project.
  2. From the jsonfile's shortcut menu, select Overview.

Click on Run trigger

If it is stateful workflow, you’ll be able to see the status as shown below.

To view it, click on identifier.

It will open a new window with the results.

Note: Incase while using storage account in your workflow if you get any forbidden error then whitelist your IP in that storage account and rerun the workflow by choosing Run and debug in VS code.

Upon completion stop the debug by choosing the stop button and push the code to azure repo using git commands to push the code.

Use a Pipeline to Deploy the Created Workflow

Build.yaml

jobs:
  - job: logic_app_build
    displayName: "Build and publish Logic App"
    steps: 
      - script: sudo apt-get update && sudo apt-get install -y zip
        displayName: 'Install zip utility'

      - task: CopyFiles@2
        displayName: 'Create project folder'
        inputs: 
          sourceFolder: '$(System.DefaultWorkingDirectory)'
          contents: |
            azure_logicapps/**
          targetFolder: 'project_output'
  
      - task: ArchiveFiles@2
        displayName: 'Create project Zip'
        inputs: 
          rootFolderOrFile: '$(System.DefaultWorkingDirectory)/project_output/azure_logicapps'
          includeRootFolder: false
          archiveType: 'zip'
          archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
          replaceExistingArchive: true
      
  
      - task: PublishPipelineArtifact@1
        displayName: 'Publish project zip artifact'
        inputs: 
          targetPath: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
          artifact: 'logicAppCIArtifact'
          publishLocation: 'pipeline'

Deploy.yaml

jobs:
  - deployment: deploy_logicapp_resources
    displayName: Deploy Logic App
    environment: ${{ parameters.environmentToDeploy }}
    strategy:
      runOnce:
        deploy:
          steps:
            - download: current
              artifact: logicAppCIArtifact

            - task: AzureFunctionApp@1
              displayName: 'Deploy Logic App workflows'
              inputs:
                azureSubscription: ${{ parameters.azureServiceConnection }}
                appType: 'functionApp'
                appName: ${{ parameters.vars.LogicAppName }}
                package: '$(Pipeline.Workspace)/logicAppCIArtifact/$(Build.BuildId).zip'
                deploymentMethod: 'zipDeploy'

 

Updated Jun 23, 2025
Version 1.0
No CommentsBe the first to comment