|
1 | 1 | ---
|
2 |
| -title: Add and Run JavaScript in Workflows |
3 |
| -description: Write and run JavaScript code snippets in workflows to perform custom integration tasks using Inline Code operations in Azure Logic Apps. |
| 2 | +title: Run JavaScript in Workflows |
| 3 | +description: Learn how to run JavaScript code snippets in workflows for custom integration tasks by using Inline Code operations in Azure Logic Apps. |
4 | 4 | services: logic-apps
|
5 | 5 | ms.suite: integration
|
6 | 6 | ms.reviewer: estfan, azla
|
@@ -42,7 +42,7 @@ The following diagram shows the highlights from an example workflow:
|
42 | 42 |
|
43 | 43 | * The logic app resource with the workflow where you want to add your code snippet. The workflow must already start with a trigger.
|
44 | 44 |
|
45 |
| - This article's example uses the Office 365 Outlook trigger named **When a new email arrives**. |
| 45 | + This article's example uses the **Office 365 Outlook** trigger named **When a new email arrives**. |
46 | 46 |
|
47 | 47 | 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:
|
48 | 48 |
|
@@ -107,7 +107,9 @@ The following diagram shows the highlights from an example workflow:
|
107 | 107 |
|
108 | 108 | :::image type="content" source="media/add-run-javascript/save-email-body-variable-consumption.png" alt-text="Screenshot showing the Consumption workflow, Execute JavaScript Code action, and example code that creates variables.":::
|
109 | 109 |
|
110 |
| -1. With your cursor still in the **Code** box, select **Add dynamic content**. Find the **When a new email arrives** section, and select the **Body** property, which references the email message's body. |
| 110 | +1. With your cursor still in the **Code** box, select the lightning icon to open the dynamic content list. |
| 111 | + |
| 112 | +1. In the list, under the **When a new email arrives** section, select the **Body** property, which references the trigger output with the email message body. |
111 | 113 |
|
112 | 114 | :::image type="content" source="media/add-run-javascript/select-output-consumption.png" alt-text="Screenshot showing the Consumption workflow, Execute JavaScript Code action, dynamic content list, and email message's Body property selected.":::
|
113 | 115 |
|
@@ -355,13 +357,13 @@ Before you start, you need the JSON name for the trigger or action in the underl
|
355 | 357 |
|
356 | 358 | `My.Action.Name`
|
357 | 359 |
|
358 |
| -1. On the workflow menu, select **Code view**. In the `actions` object, find the action's name. |
| 360 | +1. On the workflow menu, under **Tools**, select **Code** to view the workflow's JSON definition. In the `actions` object, find the action's name. |
359 | 361 |
|
360 | 362 | For example, `Send_approval_email` is the JSON name for the **Send approval email** action.
|
361 | 363 |
|
362 | 364 | :::image type="content" source="media/add-run-javascript/find-action-name-json.png" alt-text="Screenshot showing the action name in JSON.":::
|
363 | 365 |
|
364 |
| -1. To return to designer view, on the workflow menu, select **Designer**. |
| 366 | +1. To return to designer view, on the workflow menu, under **Tools**, select **Designer**. |
365 | 367 |
|
366 | 368 | 1. Now add the JSON name to the **Execute JavaScript Code** action.
|
367 | 369 |
|
@@ -394,5 +396,5 @@ For more information about the **Execute JavaScript Code** action's structure an
|
394 | 396 |
|
395 | 397 | ## Related content
|
396 | 398 |
|
397 |
| -* [List of all Logic Apps connectors](/connectors/connector-reference/connector-reference-logicapps-connectors) |
398 |
| -* [Built-in connectors in Azure Logic Apps](../connectors/built-in.md) |
| 399 | +* [Managed connectors for Azure Logic Apps](/connectors/connector-reference/connector-reference-logicapps-connectors) |
| 400 | +* [Built-in connectors for Azure Logic Apps](../connectors/built-in.md) |
0 commit comments