You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/logic-apps/logic-apps-perform-data-operations.md
+62-43Lines changed: 62 additions & 43 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -73,71 +73,97 @@ and creates the following output:
73
73
74
74
`{"age":35,"fullName":"Owens,Sophia"}`
75
75
76
-
To try the **Compose** action, follow these steps by using the workflow designer. Or, if you prefer working in the code view editor, you can copy the example **Compose** and **Initialize variable** action definitions from this guide into your own logic app's underlying workflow definition: [Data operation code examples - Compose](../logic-apps/logic-apps-data-operations-code-samples.md#compose-action-example). For more information about the **Compose** action in the underlying JSON workflow definition, see the [Compose action](logic-apps-workflow-actions-triggers.md#compose-action).
76
+
To try the **Compose** action, follow these steps by using the workflow designer. Or, if you prefer working in the code view editor, you can copy the example **Compose** and **Initialize variable** action definitions from this guide into your own logic app's underlying workflow definition: [Data operation code examples - Compose](logic-apps-data-operations-code-samples.md#compose-action-example). For more information about the **Compose** action in the underlying JSON workflow definition, see the [Compose action](logic-apps-workflow-actions-triggers.md#compose-action).
77
77
78
78
### [Consumption](#tab/consumption)
79
79
80
80
1. In the [Azure portal](https://portal.azure.com), Visual Studio, or Visual Studio Code, open your logic app workflow in the designer.
81
81
82
-
This example uses the Azure portal and a sample workflow with the **Recurrence** trigger followed by several **Initialize variable** actions. These actions are set up to create two string variables and an integer variable.
82
+
This example uses the Azure portal and a sample workflow with the **Recurrence** trigger followed by several **Variables** actions named **Initialize variable**. These actions are set up to create two string variables and an integer variable.
83
83
84
-

1. In your workflow where you want to create the output, follow one of these steps:
90
+
:::image type="content" source="media/logic-apps-perform-data-operations/sample-start-compose-action-consumption.png" alt-text="Screenshot shows Azure portal and designer for example Consumption workflow with Compose action." lightbox="media/logic-apps-perform-data-operations/sample-start-compose-action-consumption.png":::
87
91
88
-
* To add an action under the last step, select **New step**.
92
+
1.[Follow these general steps to add the **Data Operations** action named **Compose**](create-workflow-with-trigger-or-action.md?tabs=consumption#add-action).
89
93
90
-
* To add an action between steps, move your mouse over the connecting arrow so the plus sign (**+**) appears. Select the plus sign, and then select **Add an action**.
94
+
1. On the designer, select the **Compose** action, if not already selected. In the **Inputs** box, enter the inputs to use for creating the output.
95
+
96
+
For this example, follow these steps:
91
97
92
-
1.Under the **Choose an operation**search box, select **Built-in**. In the search box, enter **compose**.
98
+
1.In the **Inputs** box, enter the following sample JSON object, including the spacing as shown:
93
99
94
-
1. From the actions list, select the action named **Compose**.
100
+
```json
101
+
{
102
+
"age": ,
103
+
"fullName": " , "
104
+
}
105
+
```
95
106
96
-

107
+
1. In the JSON object, put your cursor in the corresponding locations, select the dynamic content list (lightning icon), and then select the corresponding variable from the list:
97
108
98
-
1. In the **Inputs** box, enter the inputs to use for creating the output.
For this example, select inside the **Inputs** box, which opens the dynamic content list. From that list, select the previously created variables:
114
+
The following example shows both added and not yet added variables:
101
115
102
-

116
+
:::image type="content" source="media/logic-apps-perform-data-operations/configure-compose-action-consumption.png" alt-text="Screenshot shows Consumption workflow, Compose action, dynamic content list, and selected inputs to use." lightbox="media/logic-apps-perform-data-operations/configure-compose-action-consumption.png":::
103
117
104
-
The following screenshot shows the finished example**Compose** action:
118
+
The following example shows the finished sample **Compose** action:
105
119
106
-

1. Save your workflow. On the designer toolbar, select **Save**.
109
123
110
124
### [Standard](#tab/standard)
111
125
112
126
1. In the [Azure portal](https://portal.azure.com) or Visual Studio Code, open your logic app workflow in the designer.
113
127
114
-
This example uses the Azure portal and a sample workflow with the **Recurrence** trigger followed by several **Initialize variable** actions. These actions are set up to create two string variables and an integer variable.
128
+
This example uses the Azure portal and a sample workflow with the **Recurrence** trigger followed by several **Variables** actions named **Initialize variable**. These actions are set up to create two string variables and an integer variable.
115
129
116
-

1. In your workflow where you want to create the output, follow one of these steps:
136
+
:::image type="content" source="media/logic-apps-perform-data-operations/sample-start-compose-action-standard.png" alt-text="Screenshot shows Azure portal and designer for example Standard workflow with Compose action." lightbox="media/logic-apps-perform-data-operations/sample-start-compose-action-standard.png":::
119
137
120
-
* To add an action under the last step, select the plus sign (**+**), and then select **Add an action**.
138
+
1. [Follow these general steps to add the **Data Operations** action named **Compose**](create-workflow-with-trigger-or-action.md?tabs=standard#add-action).
121
139
122
-
* To add an action between steps, select the plus sign (**+**) between those steps, and then select **Add an action**.
140
+
1. On the designer, select the **Compose** action, if not already selected. In the **Inputs** box, enter the inputs to use for creating the output.
123
141
124
-
1. After the connector gallery opens, [follow these general steps to find the **Data Operations** action named **Compose**](create-workflow-with-trigger-or-action.md?tabs=standard#add-an-action-to-run-a-task).
142
+
For this example, follow these steps:
125
143
126
-
> [!NOTE]
127
-
>
128
-
> If the connector results box shows the message that **We couldn't find any results for compose**,
129
-
> you get this result because the connector name is actually **Data Operations**, not **Compose**,
130
-
> which is the action name.
144
+
1. In the **Inputs** box, enter the following sample JSON object, including the spacing as shown:
131
145
132
-
1. After the action information box opens, in the **Inputs** box, enter the inputs to use for creating the output.
146
+
```json
147
+
{
148
+
"age": ,
149
+
"fullName": " , "
150
+
}
151
+
```
133
152
134
-
For this example, select inside the **Inputs** box, and then select the lightning icon, which opens the dynamic content list. From that list, select the previously created variables:
153
+
1. In the JSON object, put your cursor in the corresponding locations, select the dynamic content list (lightning icon), and then select the corresponding variable from the list:
135
154
136
-

The following screenshot shows the finished example **Compose** action:
160
+
The following example shows both added and not yet added variables:
139
161
140
-

162
+
:::image type="content" source="media/logic-apps-perform-data-operations/configure-compose-action-standard.png" alt-text="Screenshot shows Standard workflow, Compose action, dynamic content list, and selected inputs to use." lightbox="media/logic-apps-perform-data-operations/configure-compose-action-standard.png":::
163
+
164
+
The following example shows the finished sample **Compose** action:
165
+
166
+
:::image type="content" source="media/logic-apps-perform-data-operations/finished-compose-action-standard.png" alt-text="Screenshot shows Standard workflow with complete Compose action." lightbox="media/logic-apps-perform-data-operations/finished-compose-action-standard.png":::
141
167
142
168
1. Save your workflow. On the designer toolbar, select **Save**.
143
169
@@ -153,40 +179,33 @@ To confirm whether the **Compose** action creates the expected results, send you
153
179
154
180
This example continues by using the Office 365 Outlook action named **Send an email**.
155
181
156
-
1. In this action, for each box where you want the results to appear, select inside each box, which opens the dynamic content list. From that list, under the **Compose** action, select **Outputs**.
182
+
1. In this action, for each box where you want the results to appear, select inside each box, and then select the dynamic content list. From that list, under the **Compose** action, select **Outputs**.
157
183
158
184
For this example, the result appears in the email's body, so add the **Outputs** field to the **Body** box.
159
185
160
-

186
+
:::image type="content" source="media/logic-apps-perform-data-operations/send-email-compose-action-consumption.png" alt-text="Screenshot shows Consumption workflow designer, the action named Send an email, and output from the preceding Compose action." lightbox="media/logic-apps-perform-data-operations/send-email-compose-action-consumption.png":::
161
187
162
-
1. Save your workflow, and then manually run your workflow. On the designer toolbar, select **Run Trigger** > **Run**.
188
+
1. Save your workflow, and then manually run your workflow. On the designer toolbar, select **Run** > **Run**.
163
189
164
190
#### [Standard](#tab/standard)
165
191
166
192
1. In your workflow, add an action that can send you the results from the **Compose** action.
167
193
168
194
This example continues by using the Office 365 Outlook action named **Send an email**.
169
195
170
-
1. In this action, for each box where you want the results to appear, select inside each box, and then select the lightning icon, which opens the dynamic content list. From that list, under the **Compose** action, select **Outputs**.
171
-
172
-
> [!NOTE]
173
-
>
174
-
> If the dynamic content list shows the message that **We can't find any outputs to match this input format**,
175
-
> select **See more** next to the **Compose** label in the list.
176
-
>
177
-
> 
196
+
1. In this action, for each box where you want the results to appear, select inside each box, and then select the dynamic content list. From that list, under the **Compose** action, select **Outputs**.
178
197
179
198
For this example, the result appears in the email's body, so add the **Outputs** field to the **Body** box.
180
199
181
-

200
+
:::image type="content" source="media/logic-apps-perform-data-operations/send-email-compose-action-standard.png" alt-text="Screenshot shows Consumption workflow designer, the action named Send an email, and output from the preceding Compose action." lightbox="media/logic-apps-perform-data-operations/send-email-compose-action-standard.png":::
182
201
183
202
1. Save your workflow, and then manually run your workflow. On the workflow navigation menu, select **Overview** > **Run Trigger** > **Run**.
184
203
185
204
---
186
205
187
206
If you used the Office 365 Outlook action, you get a result similar to the following screenshot:
188
207
189
-

208
+
:::image type="content" source="media/logic-apps-perform-data-operations/compose-email-results.png" alt-text="Screenshot shows email with results from the Compose action.":::
0 commit comments