Skip to content

Commit c34b7ca

Browse files
committed
Add extra changes
1 parent 3332c7f commit c34b7ca

File tree

3 files changed

+63
-40
lines changed

3 files changed

+63
-40
lines changed

articles/logic-apps/add-run-powershell-scripts.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.service: azure-logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, swghimire, shahparth, azla
77
ms.topic: how-to
8-
ms.date: 05/23/2025
8+
ms.date: 06/20/2025
99
# Customer intent: As a logic app workflow developer, I want to write and run PowerShell code so that I can perform custom integration tasks in Standard workflows for Azure Logic Apps.
1010
---
1111

@@ -37,15 +37,20 @@ This guide shows how to add the action in your workflow and add the PowerShell c
3737

3838
* An Azure account and subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/?WT.mc_id=A261C142F).
3939

40-
* The Standard logic app workflow where you want to add your PowerShell script. The workflow must already start with a trigger. For more information, see [Create example Standard logic app workflows](create-single-tenant-workflows-azure-portal.md).
40+
* The logic app resource with the Standard workflow where you want to add your PowerShell script.
4141

42-
You can use any trigger for your scenario, but as an example, this guide uses the Request trigger named **When a HTTP request is received** and also the **Response** action. The workflow runs when another application or workflow sends a request to the trigger's endpoint URL. The sample script returns the results from code execution as output that you can use in subsequent actions.
42+
The workflow must already start with a trigger. You can use any trigger for your scenario, but as an example, this guide uses the Request trigger named **When a HTTP request is received** and also the **Response** action. The workflow runs when another application or workflow sends a request to the trigger's endpoint URL. The sample script returns the results from code execution as output that you can use in subsequent actions.
43+
44+
If you don't have a logic app resource and workflow, create them now by following the steps for the logic app that you want:
45+
46+
* [Create an example Consumption logic app workflow](quickstart-create-example-consumption-workflow.md)
47+
* [Create an example Standard logic app workflow](create-single-tenant-workflows-azure-portal.md)
4348

4449
## Considerations
4550

46-
- The Azure portal saves your script as a PowerShell script file (*.ps1*) in the same folder as your **workflow.json** file, which stores the JSON definition for your workflow, and deploys the file to your logic app resource along with the workflow definition.
51+
- The Azure portal saves your script as a PowerShell script file (.ps1) in the same folder as your *workflow.json* file, which stores the JSON definition for your workflow, and deploys the file to your logic app resource along with the workflow definition.
4752

48-
The *.ps1* file format lets you write less "boilerplate" and focus just on writing PowerShell code. If you rename the action, the file is also renamed, but not vice versa. If you directly rename the file, the renamed version overwrites the previous version. If the action name and file names don't match, the action can't find the file and tries to create a new empty file.
53+
The .ps1 file format lets you write less "boilerplate" and focus just on writing PowerShell code. If you rename the action, the file is also renamed, but not vice versa. If you directly rename the file, the renamed version overwrites the previous version. If the action name and file names don't match, the action can't find the file and tries to create a new empty file.
4954

5055
- The script is local to the workflow. To use the same script in other workflows, [view the script file in the **Kudu** console](#view-script-file), and then copy the script to reuse in other workflows.
5156

@@ -58,9 +63,13 @@ This guide shows how to add the action in your workflow and add the PowerShell c
5863

5964
## Add the Execute PowerShell Code action
6065

61-
1. In the [Azure portal](https://portal.azure.com), open your Standard logic app resource and workflow in the designer.
66+
1. In the [Azure portal](https://portal.azure.com), open your Standard logic app resource.
67+
68+
1. On the resource sidebar menu, under **Workflows**, select **Workflows**, and then select your blank workflow.
6269

63-
1. In the designer, add the **Inline Code Operations** action named **Execute PowerShell Code** to your workflow. For detailed steps, see [Add an action to run a task](add-trigger-action-workflow.md?tabs=standard#add-action).
70+
1. On the workflow sidebar menu, under **Tools**, select the designer to open the workflow.
71+
72+
1. Add the **Inline Code Operations** action named **Execute PowerShell Code** to your workflow by following the [general steps to add a trigger](add-trigger-action-workflow.md?tabs=standard#add-action).
6473

6574
1. After the action information pane opens, on the **Parameters** tab, in the **Code File** box, update the prepopulated sample code with your own code.
6675

@@ -240,15 +249,15 @@ To use the managed identity from inside the **Execute PowerShell Code** action,
240249

241250
1. In the [Azure portal](https://portal.azure.com), open your Standard logic app resource that has the workflow you want.
242251

243-
1. On the logic app resource menu, under **Development Tools**, select **Advanced Tools**.
252+
1. On the sidebar menu, under **Development Tools**, select **Advanced Tools**.
244253

245254
1. On the **Advanced Tools** page, select **Go**, which opens the **Kudu** console.
246255

247256
1. Open the **Debug console** menu, and select **CMD**.
248257

249258
1. Go to your logic app's root location: **site/wwwroot**
250259

251-
1. Go to your workflow's folder, which contains the *.ps1* file, along this path: **site/wwwroot/{workflow-name}**
260+
1. Go to your workflow's folder, which contains the .ps1 file, along this path: **site/wwwroot/{workflow-name}**
252261

253262
1. Next to the file name, select **Edit** to open and view the file.
254263

@@ -283,23 +292,23 @@ A module organizes PowerShell code, making it easier to distribute. For example,
283292

284293
To find publicly available modules, visit the [PowerShell gallery](https://www.powershellgallery.com). A Standard logic app resource can support up to 10 public modules. To use any public module, you must enable this capability by following these steps:
285294

286-
1. In the [Azure portal](https://portal.azure.com), on your logic app resource menus, under Development Tools, select **Advanced Tools**.
295+
1. In the [Azure portal](https://portal.azure.com), on your logic app resource menu, under Development Tools, select **Advanced Tools**.
287296

288297
1. On the **Advanced Tools** page, select **Go**.
289298

290299
1. On the **Kudu** toolbar, from the **Debug console** menu, select **CMD**.
291300

292301
1. Browse to your logic app's root level at **C:\home\site\wwwroot** by using the directory structure or the command line.
293302

294-
1. Open the workflow's **host.json** file, and set the **managed dependency** property to **true**, which is already set by default.
303+
1. Open the workflow's *host.json* file, and set the **managed dependency** property to **true**, which is already set by default.
295304

296305
```json
297306
"managedDependency": {
298307
"enabled": true
299308
}
300309
```
301310

302-
1. Open the file named **requirements.psd1**. Include the name and version for the module that you want by using the following syntax: `MajorNumber.*` or the exact module version, for example:
311+
1. Open the file named *requirements.psd1*. Include the name and version for the module that you want by using the following syntax: `MajorNumber.*` or the exact module version, for example:
303312

304313
```powershell
305314
@{
@@ -332,7 +341,7 @@ You can generate your own private PowerShell modules. To create your first Power
332341

333342
1. In the **Modules** folder, create a subfolder with the same name as your private module.
334343

335-
1. In your private module folder, add your private PowerShell module file with the *psm1* file name extension. You can also include an optional PowerShell manifest file with the *psd1* file name extension.
344+
1. In your private module folder, add your private PowerShell module file with the .psm1 file name extension. You can also include an optional PowerShell manifest file with the .psd1 file name extension.
336345

337346
When you're done, your complete logic app file structure appears similar to the following example:
338347

@@ -363,13 +372,13 @@ Make sure that you use the `Push-WorkflowOutput` cmdlet.
363372

364373
### Execute PowerShell Code action fails: "The term '{some-text}' is not recognized..."
365374

366-
If you incorrectly reference a public module in the **requirements.psd1** file, or if your private module doesn't exist in the path **C:\home\site\wwwroot\Modules\{module-name}**, you get the following error:
375+
If you incorrectly reference a public module in the *requirements.psd1* file, or if your private module doesn't exist in the path **C:\home\site\wwwroot\Modules\{module-name}**, you get the following error:
367376

368377
**"The term '{some-text}' is not recognized as a name of a cmdlet, function, script file, or executable program. Check the spelling of the name or if a path was included, verify the path is correct and try again."**
369378

370379
> [!NOTE]
371380
>
372-
> By default, the Az* modules appear in the **requirements.psd1** file, but they're commented out at file creation.
381+
> By default, the Az* modules appear in the *requirements.psd1* file, but they're commented out at file creation.
373382
> When you reference a cmdlet from the module, make sure to uncomment the module.
374383
375384
### Execute PowerShell Code action fails: "Cannot bind argument to parameter 'Output' because it is null."

articles/logic-apps/logic-apps-control-flow-conditional-statement.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ services: logic-apps
55
ms.suite: integration
66
ms.reviewer: estfan, azla
77
ms.topic: how-to
8-
ms.date: 05/22/2025
8+
ms.date: 06/20/2025
99
---
1010

1111
# Add conditions to control workflow actions in Azure Logic Apps
@@ -21,7 +21,7 @@ You can add the **Condition** action to send email only when the new item includ
2121
>
2222
> If you want to specify more than two paths from which your workflow can choose
2323
> or condition criteria that's not restricted to only true or false, use a
24-
> [*switch action* instead](logic-apps-control-flow-switch-statement.md).
24+
> [**switch** action](logic-apps-control-flow-switch-statement.md) instead.
2525
2626
This guide shows how to add a condition to your workflow and use the result to help your workflow choose between two action paths.
2727

@@ -37,11 +37,13 @@ This guide shows how to add a condition to your workflow and use the result to h
3737

3838
### [Consumption](#tab/consumption)
3939

40-
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
40+
1. In the [Azure portal](https://portal.azure.com), open your Consumption logic app resource.
4141

42-
1. Add the trigger named **When a feed item is published** to your workflow. For detailed steps, see [Add a trigger to start your workflow](add-trigger-action-workflow.md?tabs=consumption#add-trigger).
42+
1. On the sidebar menu, under **Development Tools**, select the designer to open the blank workflow.
4343

44-
1. Below the trigger, add the **Condition** action to your workflow. For detailed steps, see [Add an action to run a task](add-trigger-action-workflow.md?tabs=consumption#add-action).
44+
1. Add the trigger named **When a feed item is published** to your workflow by following the [general steps to add a trigger](add-trigger-action-workflow.md?tabs=consumption#add-trigger).
45+
46+
1. Add the **Condition** action to your workflow by following the [general steps to add an action](add-trigger-action-workflow.md?tabs=consumption#add-action).
4547

4648
1. In the **Condition** action, follow these steps to build your condition:
4749

@@ -87,11 +89,15 @@ This guide shows how to add a condition to your workflow and use the result to h
8789

8890
### [Standard](#tab/standard)
8991

90-
1. In the [Azure portal](https://portal.azure.com), open your logic app workflow in the designer.
92+
1. In the [Azure portal](https://portal.azure.com), open your Standard logic app resource.
93+
94+
1. On the resource sidebar menu, under **Workflows**, select **Workflows**, and then select your blank workflow.
95+
96+
1. On the workflow sidebar menu, under **Tools**, select the designer to open the workflow.
9197

92-
1. Add the trigger named **When a feed item is published** to your workflow. For detailed steps, see [Add a trigger to start your workflow](add-trigger-action-workflow.md?tabs=standard#add-trigger).
98+
1. Add the trigger named **When a feed item is published** to your workflow by following the [general steps to add a trigger](add-trigger-action-workflow.md?tabs=standard#add-trigger).
9399

94-
1. Below the trigger, add the **Condition** action to your workflow. For detailed steps, see [Add an action to run a task](add-trigger-action-workflow.md?tabs=standard#add-action).
100+
1. Add the **Condition** action to your workflow by following the [general steps to add an action](add-trigger-action-workflow.md?tabs=standard#add-action).
95101

96102
1. In the **Condition** action, follow these steps to build your condition:
97103

0 commit comments

Comments
 (0)