Skip to content

Commit 6b607f9

Browse files
authored
Merge pull request #109882 from ecfan/json
Update art for Transform JSON topic
2 parents 533dfc0 + 2046a04 commit 6b607f9

11 files changed

+35
-47
lines changed

articles/logic-apps/logic-apps-enterprise-integration-liquid-transform.md

Lines changed: 35 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,29 +7,18 @@ author: divyaswarnkar
77
ms.author: divswa
88
ms.reviewer: estfan, logicappspm
99
ms.topic: article
10-
ms.date: 08/16/2018
10+
ms.date: 04/01/2020
1111
---
1212

1313
# Perform advanced JSON transformations with Liquid templates in Azure Logic Apps
1414

15-
You can perform basic JSON transformations in your logic apps with
16-
native data operation actions such as **Compose** or **Parse JSON**.
17-
To perform advanced JSON transformations, you can create templates
18-
or maps with [Liquid](https://shopify.github.io/liquid/), which is
19-
an open-source template language for flexible web apps. A Liquid template
20-
defines how to transform JSON output and supports more complex JSON
21-
transformations, such as iterations, control flows, variables, and so on.
15+
You can perform basic JSON transformations in your logic apps with native data operation actions such as **Compose** or **Parse JSON**. To perform advanced JSON transformations, you can create templates or maps with [Liquid](https://shopify.github.io/liquid/), which is an open-source template language for flexible web apps. A Liquid template defines how to transform JSON output and supports more complex JSON transformations, such as iterations, control flows, variables, and so on.
2216

23-
Before you can perform a Liquid transformation in your logic app,
24-
you must first define the JSON to JSON mapping with a Liquid template
25-
and store that map in your integration account. This article shows
26-
you how to create and use this Liquid template or map.
17+
Before you can perform a Liquid transformation in your logic app, you must first define the JSON to JSON mapping with a Liquid template and store that map in your integration account. This article shows you how to create and use this Liquid template or map.
2718

2819
## Prerequisites
2920

30-
* An Azure subscription. If you don't have a subscription, you can
31-
[start with a free Azure account](https://azure.microsoft.com/free/).
32-
Or, [sign up for a Pay-As-You-Go subscription](https://azure.microsoft.com/pricing/purchase-options/).
21+
* An Azure subscription. If you don't have a subscription, [sign up for a free Azure account](https://azure.microsoft.com/free/).
3322

3423
* Basic knowledge about [how to create logic apps](../logic-apps/quickstart-create-first-logic-app-workflow.md)
3524

@@ -39,10 +28,8 @@ Or, [sign up for a Pay-As-You-Go subscription](https://azure.microsoft.com/prici
3928

4029
## Create Liquid template or map for your integration account
4130

42-
1. For this example, create the sample Liquid template described
43-
in this step. In your Liquid template, you can use
44-
[Liquid filters](https://shopify.github.io/liquid/basics/introduction/#filters),
45-
which use [DotLiquid](https://dotliquidmarkup.org/) and C# naming conventions.
31+
1. For this example, create the sample Liquid template described in this step. In your Liquid template, you can use
32+
[Liquid filters](https://shopify.github.io/liquid/basics/introduction/#filters), which use [DotLiquid](https://dotliquidmarkup.org/) and C# naming conventions.
4633

4734
> [!NOTE]
4835
> Make sure the filter names use *sentence casing* in your template.
@@ -68,63 +55,64 @@ which use [DotLiquid](https://dotliquidmarkup.org/) and C# naming conventions.
6855
}
6956
```
7057

71-
2. Sign in to the [Azure portal](https://portal.azure.com).
72-
On the main Azure menu, select **All resources**.
73-
In the search box, find and select your integration account.
58+
1. In the [Azure portal](https://portal.azure.com), from the Azure search box, enter `integration accounts`, and select **Integration accounts**.
59+
60+
![Find "Integration accounts"](./media/logic-apps-enterprise-integration-liquid-transform/find-integration-accounts.png)
61+
62+
1. Find and select your integration account.
7463

7564
![Select integration account](./media/logic-apps-enterprise-integration-liquid-transform/select-integration-account.png)
7665

77-
3. Under **Components**, select **Maps**.
66+
1. On the **Overview** pane, under **Components**, select **Maps**.
7867

79-
![Select maps](./media/logic-apps-enterprise-integration-liquid-transform/add-maps.png)
68+
![Select "Maps" tile](./media/logic-apps-enterprise-integration-liquid-transform/select-maps-tile.png)
8069

81-
4. Choose **Add** and provide these details for your map:
70+
1. On the **Maps** pane, select **Add** and provide these details for your map:
8271

8372
| Property | Value | Description |
8473
|----------|-------|-------------|
85-
| **Name** | JsonToJsonTemplate | The name for your map, which is "JsonToJsonTemplate" in this example |
74+
| **Name** | `JsonToJsonTemplate` | The name for your map, which is "JsonToJsonTemplate" in this example |
8675
| **Map type** | **liquid** | The type for your map. For JSON to JSON transformation, you must select **liquid**. |
87-
| **Map** | "SimpleJsonToJsonTemplate.liquid" | An existing Liquid template or map file to use for transformation, which is "SimpleJsonToJsonTemplate.liquid" in this example. To find this file, you can use the file picker. For map size limits, see [Limits and configuration](../logic-apps/logic-apps-limits-and-config.md#artifact-capacity-limits). |
76+
| **Map** | `SimpleJsonToJsonTemplate.liquid` | An existing Liquid template or map file to use for transformation, which is "SimpleJsonToJsonTemplate.liquid" in this example. To find this file, you can use the file picker. For map size limits, see [Limits and configuration](../logic-apps/logic-apps-limits-and-config.md#artifact-capacity-limits). |
8877
|||
8978

90-
![Add liquid template](./media/logic-apps-enterprise-integration-liquid-transform/add-liquid-template.png)
79+
![Add Liquid template](./media/logic-apps-enterprise-integration-liquid-transform/add-liquid-template.png)
9180

9281
## Add the Liquid action for JSON transformation
9382

94-
1. In the Azure portal, follow these steps to
95-
[create a blank logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
83+
1. In the Azure portal, follow these steps to [create a blank logic app](../logic-apps/quickstart-create-first-logic-app-workflow.md).
9684

97-
2. In the Logic App Designer, add the
98-
[Request trigger](../connectors/connectors-native-reqres.md#add-request)
99-
to your logic app.
85+
1. In the Logic App Designer, add the [Request trigger](../connectors/connectors-native-reqres.md#add-request) to your logic app.
10086

101-
3. Under the trigger, choose **New step**.
102-
In the search box, enter "liquid" as your filter,
103-
and select this action: **Transform JSON to JSON - Liquid**
87+
1. Under the trigger, choose **New step**. In the search box, enter `liquid` as your filter, and select this action: **Transform JSON to JSON - Liquid**
10488

10589
![Find and select Liquid action](./media/logic-apps-enterprise-integration-liquid-transform/search-action-liquid.png)
10690

107-
4. Click inside the **Content** box so that the dynamic content list appears,
108-
and select the **Body** token.
109-
110-
![Select body](./media/logic-apps-enterprise-integration-liquid-transform/select-body.png)
111-
112-
5. From the **Map** list, select your Liquid template,
113-
which is "JsonToJsonTemplate" in this example.
91+
1. Open the **Map** list, and select your Liquid template, which is "JsonToJsonTemplate" in this example.
11492

11593
![Select map](./media/logic-apps-enterprise-integration-liquid-transform/select-map.png)
11694

11795
If the maps list is empty, most likely your logic app is not linked to your integration account.
118-
To link your logic app to the integration account that has the Liquid template or map,
119-
follow these steps:
96+
To link your logic app to the integration account that has the Liquid template or map, follow these steps:
12097

12198
1. On your logic app menu, select **Workflow settings**.
12299

123-
2. From the **Select an Integration account** list,
124-
select your integration account, and choose **Save**.
100+
1. From the **Select an Integration account** list, select your integration account, and select **Save**.
125101

126102
![Link logic app to integration account](./media/logic-apps-enterprise-integration-liquid-transform/link-integration-account.png)
127103

104+
1. Now add the **Content** property to this action. Open the **Add new parameter** list, and select **Content**.
105+
106+
![Add "Content" property to action](./media/logic-apps-enterprise-integration-liquid-transform/add-content-property-to-action.png)
107+
108+
1. To set the **Content** property value, click inside the **Content** box so that the dynamic content list appears. Select the **Body** token, which represents the body content output from the trigger.
109+
110+
![Select "Body" token for "Content" property value](./media/logic-apps-enterprise-integration-liquid-transform/select-body.png)
111+
112+
When you're done, the action looks like this example:
113+
114+
![Finished "Transform JSON to JSON" action](./media/logic-apps-enterprise-integration-liquid-transform/finished-transform-action.png)
115+
128116
## Test your logic app
129117

130118
Post JSON input to your logic app from [Postman](https://www.getpostman.com/postman) or a similar tool.
17.1 KB
Loading
-575 Bytes
Loading
29.6 KB
Loading
10.5 KB
Loading
16.8 KB
Loading
4.52 KB
Loading
-3.93 KB
Loading
-1.65 KB
Loading

0 commit comments

Comments
 (0)