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
# Extract information in Excel using Named Entity Recognition(NER) and Power Automate
15
15
16
-
In this tutorial, you'll create a Power Automate flow to extract text in an Excel spreadsheet without having to write code.
16
+
In this tutorial, you create a Power Automate flow to extract text in an Excel spreadsheet without having to write code.
17
17
18
-
This flow will take a spreadsheet of issues reported about an apartment complex, and classify them into two categories: plumbing and other. It will also extract the names and phone numbers of the tenants who sent them. Lastly, the flow will append this information to the Excel sheet.
18
+
This flow takes a spreadsheet of issues reported about an apartment complex, and classify them into two categories: plumbing and other. It also extracts the names and phone numbers of the tenants who sent them. Lastly, the flow appends this information to the Excel sheet.
19
19
20
-
In this tutorial, you'll learn how to:
20
+
In this tutorial, you learn how to:
21
21
22
22
> [!div class="checklist"]
23
23
> * Use Power Automate to create a flow
@@ -39,7 +39,7 @@ Download the example Excel file from [GitHub](https://github.com/Azure-Samples/c
39
39
40
40
:::image type="content" source="../media/tutorials/excel/example-data.png" alt-text="Examples from the Excel file" lightbox="../media/tutorials/excel/example-data.png":::
41
41
42
-
The issues are reported in raw text. We will use the NER feature to extract the person name and phone number. Then the flow will look for the word "plumbing" in the description to categorize the issues.
42
+
The issues are reported in raw text. We use the NER feature to extract the person name and phone number. Then the flow looks for the word "plumbing" in the description to categorize the issues.
43
43
44
44
## Create a new Power Automate workflow
45
45
@@ -57,7 +57,7 @@ On the **Build a scheduled cloud flow** page, initialize your flow with the foll
57
57
58
58
## Add variables to the flow
59
59
60
-
Create variables representing the information that will be added to the Excel file. Select **New Step** and search for **Initialize variable**. Do this four times, to create four variables.
60
+
Create variables representing the information that is added to the Excel file. Select **New Step** and search for **Initialize variable**. Do this four times, to create four variables.
61
61
62
62
:::image type="content" source="../media/tutorials/excel/initialize-variables.png" alt-text="The step for initializing variables" lightbox="../media/tutorials/excel/initialize-variables.png":::
63
63
@@ -115,7 +115,7 @@ In your flow, enter the following information to create a new Language connectio
115
115
116
116
## Extract the excel content
117
117
118
-
After the connection is created, search for **Text Analytics** and select **Named Entity Recognition**. This will extract information from the description column of the issue.
118
+
After the connection is created, search for **Text Analytics** and select **Named Entity Recognition**. This extracts information from the description column of the issue.
119
119
120
120
:::image type="content" source="../media/tutorials/excel/extract-info.png" alt-text="Extract the entities from the Excel sheet" lightbox="../media/tutorials/excel/extract-info.png":::
121
121
@@ -131,7 +131,7 @@ Within the **Apply to each**, select **Add an action** and create another **Appl
131
131
132
132
## Extract the person name
133
133
134
-
Next, we will find the person entity type in the NER output. Within the **Apply to each 2**, select **Add an action**, and create another **Apply to each** action. Select inside the text box and select **Entities** in the Dynamic Content window that appears.
134
+
Next, we find the person entity type in the NER output. Within the **Apply to each 2**, select **Add an action**, and create another **Apply to each** action. Select inside the text box and select **Entities** in the Dynamic Content window that appears.
135
135
136
136
:::image type="content" source="../media/tutorials/excel/add-apply-action-2.png" alt-text="Find the person entity in the NER output" lightbox="../media/tutorials/excel/add-apply-action-2.png":::
137
137
@@ -155,21 +155,21 @@ In the **If yes** condition, type in Excel then select **Update a Row**.
155
155
156
156
:::image type="content" source="../media/tutorials/excel/yes-column-action.png" alt-text="Update the yes condition" lightbox="../media/tutorials/excel/yes-column-action.png":::
157
157
158
-
Enter the Excel information, and update the **Key Column**, **Key Value** and **PersonName** fields. This will append the name detected by the API to the Excel sheet.
158
+
Enter the Excel information, and update the **Key Column**, **Key Value** and **PersonName** fields. This appends the name detected by the API to the Excel sheet.
159
159
160
160
:::image type="content" source="../media/tutorials/excel/yes-column-action-options.png" alt-text="Add the excel information" lightbox="../media/tutorials/excel/yes-column-action-options.png":::
161
161
162
162
## Get the phone number
163
163
164
-
Minimize the **Apply to each 3** action by clicking on the name. Then add another **Apply to each** action to **Apply to each 2**, like before. it will be named **Apply to each 4**. Select the text box, and add **entities** as the output for this action.
164
+
Minimize the **Apply to each 3** action by clicking on the name. Then add another **Apply to each** action to **Apply to each 2**, like before. its named **Apply to each 4**. Select the text box, and add **entities** as the output for this action.
165
165
166
166
:::image type="content" source="../media/tutorials/excel/add-apply-action-phone.png" alt-text="Add the entities from the NER output to another apply to each action." lightbox="../media/tutorials/excel/add-apply-action-phone.png":::
167
167
168
-
Within **Apply to each 4**, add a **Condition** control. It will be named **Condition 2**. In the first text box, search for, and add **categories** from the Dynamic content window. Be sure the center box is set to **is equal to**. Then, in the right text box, enter `var_phone`.
168
+
Within **Apply to each 4**, add a **Condition** control. Its be named **Condition 2**. In the first text box, search for, and add **categories** from the Dynamic content window. Be sure the center box is set to **is equal to**. Then, in the right text box, enter `var_phone`.
169
169
170
170
:::image type="content" source="../media/tutorials/excel/condition-2-options.png" alt-text="Add a second condition control" lightbox="../media/tutorials/excel/condition-2-options.png":::
171
171
172
-
In the **If yes** condition, add an **Update a row** action. Then enter the information like we did above, for the phone numbers column of the Excel sheet. This will append the phone number detected by the API to the Excel sheet.
172
+
In the **If yes** condition, add an **Update a row** action. Then enter the information like we did above, for the phone numbers column of the Excel sheet. This appends the phone number detected by the API to the Excel sheet.
173
173
174
174
:::image type="content" source="../media/tutorials/excel/condition-2-yes-column.png" alt-text="Add the excel information to the second if yes condition" lightbox="../media/tutorials/excel/condition-2-yes-column.png":::
175
175
@@ -179,23 +179,23 @@ Minimize **Apply to each 4** by clicking on the name. Then create another **Appl
179
179
180
180
:::image type="content" source="../media/tutorials/excel/add-apply-action-plumbing.png" alt-text="Create another apply to each action" lightbox="../media/tutorials/excel/add-apply-action-plumbing.png":::
181
181
182
-
Next, the flow will check if the issue description from the Excel table row contains the word "plumbing". If yes, it will add "plumbing" in the IssueType column. If not, we will enter "other."
182
+
Next, the flow checks if the issue description from the Excel table row contains the word "plumbing". If yes, it adds "plumbing" in the IssueType column. If not, we enter "other."
183
183
184
-
Inside the **Apply to each 4** action, add a **Condition** Control. It will be named **Condition 3**. In the first text box, search for, and add **Description** from the Excel file, using the Dynamic content window. Be sure the center box says **contains**. Then, in the right text box, find and select `var_plumbing`.
184
+
Inside the **Apply to each 4** action, add a **Condition** Control. Its named **Condition 3**. In the first text box, search for, and add **Description** from the Excel file, using the Dynamic content window. Be sure the center box says **contains**. Then, in the right text box, find and select `var_plumbing`.
185
185
186
186
:::image type="content" source="../media/tutorials/excel/condition-3-options.png" alt-text="Create a new condition control" lightbox="../media/tutorials/excel/condition-3-options.png":::
187
187
188
-
In the **If yes** condition, select **Add an action**, and select **Update a row**. Then enter the information like before. In the IssueType column, select `var_plumbing`. This will apply a "plumbing" label to the row.
188
+
In the **If yes** condition, select **Add an action**, and select **Update a row**. Then enter the information like before. In the IssueType column, select `var_plumbing`. This applies a "plumbing" label to the row.
189
189
190
-
In the **If no** condition, select **Add an action**, and select **Update a row**. Then enter the information like before. In the IssueType column, select `var_other`. This will apply an "other" label to the row.
190
+
In the **If no** condition, select **Add an action**, and select **Update a row**. Then enter the information like before. In the IssueType column, select `var_other`. This applies an "other" label to the row.
191
191
192
192
:::image type="content" source="../media/tutorials/excel/plumbing-issue-condition.png" alt-text="Add information to both conditions" lightbox="../media/tutorials/excel/plumbing-issue-condition.png":::
193
193
194
194
## Test the workflow
195
195
196
196
In the top-right corner of the screen, select **Save**, then **Test**. Under **Test Flow**, select **manually**. Then select **Test**, and **Run flow**.
197
197
198
-
The Excel file will get updated in your OneDrive account. It will look like the below.
198
+
The Excel file gets updated in your OneDrive account. It looks like the below.
199
199
200
200
:::image type="content" source="../media/tutorials/excel/updated-excel-sheet.png" alt-text="Test the workflow and view the output" lightbox="../media/tutorials/excel/updated-excel-sheet.png":::
0 commit comments