0

I am trying to copy the logic app code from code view and paste it in the logic app project that I created locally.

Once I have pasted the code, I am trying to right click and open the file using logic app designer, then I am getting an error No workflow resource found in the template in Logic App.

Request some help if someone has faced this problem before.

1 Answers1

0

I would suggest you to copy each array separately like triggers and actions and paste it in local project. I have done the same thing and i am able to open the designer. Below are steps I followed,

  1. Created a standard logic app in portal.

  2. Created a workflow as shown below, enter image description here

  3. Created a local project in vs code as followed by document.

{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {},
"contentVersion": "1.0.0.0",
"outputs": {},
"triggers": {}
},
"kind": "Stateful"
}
  1. Copied actions json from portal to vs code.
"actions": {
            "Initialize_variable": {
                "inputs": {
                    "variables": [
                        {
                            "name": "str",
                            "type": "string"
                        }
                    ]
                },
                "runAfter": {},
                "type": "InitializeVariable"
            },
            "Lists_blobs_(V2)": {
                "inputs": {
                    "host": {
                        "connection": {
                            "referenceName": "azureblob"
                        }
                    },
                    "method": "get",
                    "path": "/v2/datasets/@{encodeURIComponent(encodeURIComponent('AccountNameFromSettings'))}/foldersV2/@{encodeURIComponent(encodeURIComponent('xxxx'))}",
                    "queries": {
                        "nextPageMarker": "",
                        "useFlatListing": false
                    }
                },
                "metadata": {
                    "xxxx": "/xxxx"
                },
                "runAfter": {
                    "Initialize_variable": [
                        "Succeeded"
                    ]
                },
                "type": "ApiConnection"
            }
        }
  1. Now copied triggers code from portal to vs code.
"triggers": {

"manual": {

"inputs": {},

"kind": "Http",

"type": "Request"

}

}
  1. Saved the workflow.json file in vs code.
  2. Able to open designer from local project, enter image description here
vijaya
  • 1,525
  • 1
  • 2
  • 6
  • Hi Vijaya, thank you for the response. The logic app that I am using is of consumption plan, and I tried to figure out a way too. I will surely try this as well. – SANDEEP KUMAR Jan 30 '23 at 13:43