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/ai-services/document-intelligence/includes/logic-app-tutorial/onedrive.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ ms.subservice: forms-recognizer
5
5
ms.topic: include
6
6
ms.date: 07/24/2023
7
7
ms.author: lajanuar
8
-
monikerRange: '<=doc-intel-3.0.0'
8
+
monikerRange: '<=doc-intel-3.1.0'
9
9
---
10
10
11
11
<!-- markdownlint-disable MD041 -->
@@ -118,7 +118,7 @@ Now that you have the Logic App connector resource set up and configured, let's
118
118
119
119
:::image type="content" source="../../media/logic-apps-tutorial/when-file-created.png" alt-text="Screenshot of the When a file is created window.":::
120
120
121
-
:::moniker range="doc-intel-3.0.0"
121
+
:::moniker range=">=doc-intel-3.1.0"
122
122
123
123
4. Next, we're going to add a new step to the workflow. Select the **➕ New step** button underneath the newly created OneDrive node.
124
124
@@ -170,7 +170,7 @@ Now that you have the Logic App connector resource set up and configured, let's
170
170
171
171
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
172
172
173
-
1. Just like with OneDrive, you're asked to sign into your Outlook or Office 365 Outlook account. After you sign in, you see a window where we're going to format the email that with the dynamic content that Document Intelligence extracts from the invoice.
173
+
1. Just like with OneDrive, you're asked to sign into your Outlook or Office 365 Outlook account. After you sign in, you see a window where we're going to format the email with dynamic content that Document Intelligence extracts from the invoice.
174
174
175
175
1. We're going to use the following expression to complete some of the fields:
176
176
@@ -245,17 +245,21 @@ Now that you have the Logic App connector resource set up and configured, let's
245
245
246
246
4. Next, we're going to add a new step to the workflow. Select the **➕ New step** button underneath the newly created OneDrive node.
247
247
248
-
1. A new node is added to the Logic App designer view. Search for "Form Recognizer (Document Intelligence forthcoming)" in the **Choose an operation** search bar and select **Analyze invoice** from the list.
248
+
1. A new node is added to the Logic App designer view. Search for "Form Recognizer (Document Intelligence forthcoming)" in the **Choose an operation** search bar and select **Analyze Invoice** from the list.
249
249
250
250
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-v-2.png" alt-text="Screenshot of Analyze Invoice action.":::
251
251
252
-
1. Now, you see a window where to create your connection. Specifically, you're going to connect your Form Recognizer resource to the Logic Apps Designer Studio:
252
+
1. Now, you see a window where you can create your connection. Specifically, you're going to connect your Form Recognizer resource to the Logic Apps Designer Studio:
253
253
254
254
* Enter a **Connection name**. It should be something easy to remember.
255
255
* Enter the Form Recognizer resource **Endpoint URL** and **Account Key** that you copied previously. If you skipped this step earlier or lost the strings, you can navigate back to your Form Recognizer resource and copy them again. When you're done, select **Create**.
256
256
257
257
:::image type="content" source="../../media/logic-apps-tutorial/create-logic-app-connector.png" alt-text="Screenshot of the logic app connector dialog window.":::
258
258
259
+
> [!NOTE]
260
+
> If you already logged in with your credentials, the prior step is skipped.
261
+
> Continue by completing the **Analyze Invoice** parameters.
262
+
259
263
1. Next, you see the selection parameters window for the **Analyze Invoice** connector.
260
264
261
265
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-parameters.png" alt-text="Screenshot showing the analyze invoice window fields.":::
@@ -273,7 +277,7 @@ Now that you have the Logic App connector resource set up and configured, let's
273
277
274
278
1. In the actions list, scroll down until you find **Send an email (V2)** and select this action.
275
279
276
-
1. Just like with OneDrive, you're asked to sign into your **Outlook** or **Office 365 Outlook** account. After you sign in, you see a window like the following image. In this window, we're going to format the email to be sent with the dynamic content extracted from the invoice.
280
+
1. Sign into your **Outlook** or **Office 365 Outlook** account. After doing so, you see a window where we're going to format the email to be sent with dynamic content extracted from the invoice.
277
281
278
282
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
@@ -42,7 +42,7 @@ Before we jump into creating the Logic App, we have to set up a Sharepoint folde
42
42
43
43
:::image type="content" source="../../media/logic-apps-tutorial/create-folder.png" alt-text="Screenshot of create and name folder window.":::
44
44
45
-
1. You see the new folder in your site library.
45
+
1. You new folder is located in your site library.
46
46
47
47
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-site-library.png" alt-text="Screenshot of the newly created folder.":::
48
48
@@ -92,7 +92,7 @@ At this point, you should have a Document Intelligence resource and a SharePoint
92
92
93
93
:::image border="true" type="content" source="../../media/logic-apps-tutorial/logic-app-designer.png" alt-text="Screenshot of the Logic App Designer start page.":::
94
94
95
-
1. Search for and select **SharePoint** the search bar. Then, select the **When a file is created (properties only)** trigger.
95
+
1. Search for and select **SharePoint**from the search bar. Then, select the **When a file is created (properties only)** trigger.
96
96
97
97
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-setup.png" alt-text="Screenshot of the SharePoint connector and trigger selection page.":::
98
98
@@ -111,26 +111,38 @@ At this point, you should have a Document Intelligence resource and a SharePoint
111
111
> Select the arrow at the end of each listed folder to traverse to the next folder in the path:
112
112
:::image type="content" source="../../media/logic-apps-tutorial/folder-traverse-tip.png" alt-text="Screenshot of how to traverse the folder path.":::
113
113
114
-
:::moniker range="doc-intel-3.0.0"
114
+
:::moniker range=">=doc-intel-3.1.0"
115
115
116
-
4.Next, we're going to add a new step to the workflow. Select the **➕ New step**button underneath the newly created OneDrive node.
116
+
4.Search for and select **SharePoint** from the search bar once more. Then, select the **Get file content**action.
117
117
118
-
:::image type="content" source="../../media/logic-apps-tutorial/one-drive-trigger-setup.png" alt-text="Screenshot of the OneDrive trigger setup.":::
118
+
1. Complete the fields as follows:
119
+
120
+
***Site Address**. Select your SharePoint site.
121
+
***File Identifier**. Select this field. A dynamic content pop-up appears. If it doesn't, select the **Add dynamic content** button below the field and choose **Identifier**.
122
+
***Infer Content Type**. Select Yes.
123
+
124
+
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-get-file-content.png" alt-text="Screenshot of the Get File Content node.":::
125
+
126
+
1. Next, we're going to add another new step to the workflow. Select the **➕ New step** button underneath the newly created SharePoint node.
119
127
120
128
1. A new node is added to the Logic App designer view. Search for "Form Recognizer (Document Intelligence forthcoming)" in the **Choose an operation** search bar and select **Analyze Document for Prebuilt or Custom models (v3.0 API)** from the list.
121
129
122
-
:::image type="content" source="../../media/logic-apps-tutorial/analyze-prebuilt-document-action.png" alt-text="Screenshot of the Analyze Document for Prebuilt or Custom models (v3.0 API) selection button.":::
130
+
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-v-2.png" alt-text="Screenshot of Analyze Invoice action.":::
123
131
124
-
1. Now, you see a window to create your connection. Specifically, you're going to connect your Document Intelligence resource to the Logic Apps Designer Studio:
132
+
1. Now, you see a window where you can create your connection. Specifically, you're going to connect your Document Intelligence resource to the Logic Apps Designer Studio:
125
133
126
134
* Enter a **Connection name**. It should be something easy to remember.
127
135
* Enter the Document Intelligence resource **Endpoint URL** and **Account Key** that you copied previously. If you skipped this step earlier or lost the strings, you can navigate back to your Document Intelligence resource and copy them again. When you're done, select **Create**.
128
136
129
137
:::image type="content" source="../../media/logic-apps-tutorial/create-logic-app-connector.png" alt-text="Screenshot of the logic app connector dialog window":::
130
138
131
-
1. You see the selection parameters window for the **Analyze Document for Prebuilt or Custom Models (v3.0 API)** connector.
139
+
> [!NOTE]
140
+
> If you already logged in with your credentials, the prior step is skipped.
141
+
> Continue by completing the **Analyze Invoice** parameters.
132
142
133
-
:::image type="content" source="../../media/logic-apps-tutorial/prebuilt-model-select-window.png" alt-text="Screenshot of the prebuilt model selection window.":::
143
+
1. Next, you see the selection parameters window for the **Analyze Document for Prebuilt or Custom models (v3.0 API)** connector.
144
+
145
+
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-parameters.png" alt-text="Screenshot showing the analyze invoice window fields.":::
134
146
135
147
1. Complete the fields as follows:
136
148
@@ -139,13 +151,11 @@ At this point, you should have a Document Intelligence resource and a SharePoint
139
151
***Document/Image URL**. Skip this field for this project because we're already pointing to the file content directly from the OneDrive folder.
140
152
***Add new parameter**. Skip this field for this project.
141
153
142
-
:::image type="content" source="../../media/logic-apps-tutorial/add-file-content.png" alt-text="Screenshot of add file content window.":::
143
-
144
154
1. We need to add a few more steps. Once again, select the **➕ New step** button to add another action.
145
155
146
-
1.In the **Choose an operation** search bar, enter *Control* and select the **Control** tile.
156
+
1.*Control* and select the **Control** tile.
147
157
148
-
:::image type="content" source="../../media/logic-apps-tutorial/select-control-tile.png" alt-text="Screenshot of the control tile from the Choose an Operation menu.":::
158
+
:::image type="content" source="../../media/logic-apps-tutorial/select-control-tile.png" alt-text="Screenshot of the control tile from the Choo. In the **Choose an operation** search bar, entese an Operation menu.":::
149
159
150
160
1. Scroll down and select the **For each Control** tile from the **Control** list.
151
161
@@ -163,7 +173,7 @@ At this point, you should have a Document Intelligence resource and a SharePoint
163
173
164
174
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
165
175
166
-
1.Just like with OneDrive, you're asked to sign into your Outlook or Office 365 Outlook account. After you sign in, you see a window where we're going to format the email that with the dynamic content that Document Intelligence extracts from the invoice.
176
+
1.Sign into your Outlook or Office 365 Outlook account. After doing so, you see a window where we're going to format the email with dynamic content that Document Intelligence extracts from the invoice.
167
177
168
178
1. We're going to use the following expression to complete some of the fields:
169
179
@@ -232,6 +242,87 @@ At this point, you should have a Document Intelligence resource and a SharePoint
232
242
> * This current version only returns a single invoice per PDF.
233
243
> * The "For each loop" is required around the send email action to enable an output format that may return more than one invoice from PDFs in the future.
234
244
235
-
---
245
+
:::moniker-end -->
246
+
247
+
:::moniker range="doc-intel-2.1.0"
248
+
249
+
4. Search for and select **SharePoint** from the search bar once more. Then, select the **Get file content** action.
250
+
251
+
1. Complete the fields as follows:
252
+
253
+
* **Site Address**. Select your SharePoint site.
254
+
* **File Identifier**. Select this field. A dynamic content pop-up appears. If it doesn't, select the **Add dynamic content** button below the field and choose **Identifier**.
255
+
* **Infer Content Type**. Select Yes.
256
+
257
+
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-get-file-content.png" alt-text="Screenshot of the Get File Content node.":::
258
+
259
+
1. Next, we're going to add another new step to the workflow. Select the **➕ New step** button underneath the newly created SharePoint node.
260
+
261
+
1. A new node is added to the Logic App designer view. Search for "Form Recognizer (Document Intelligence forthcoming)" in the **Choose an operation** search bar and select **Analyze invoice** from the list.
262
+
263
+
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-v-2.png" alt-text="Screenshot of Analyze Invoice action.":::
264
+
265
+
1. Now, you see a window where to create your connection. Specifically, you're going to connect your Form Recognizer resource to the Logic Apps Designer Studio:
266
+
267
+
* Enter a **Connection name**. It should be something easy to remember.
268
+
* Enter the Form Recognizer resource **Endpoint URL** and **Account Key** that you copied previously. If you skipped this step earlier or lost the strings, you can navigate back to your Form Recognizer resource and copy them again. When you're done, select **Create**.
269
+
270
+
:::image type="content" source="../../media/logic-apps-tutorial/create-logic-app-connector.png" alt-text="Screenshot of the logic app connector dialog window.":::
271
+
272
+
> [!NOTE]
273
+
> If you already logged in with your credentials, the prior step is skipped.
274
+
> Continue by completing the **Analyze Invoice** parameters.
275
+
276
+
1. Next, you see the selection parameters window for the **Analyze Invoice** connector.
277
+
278
+
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-parameters.png" alt-text="Screenshot showing the analyze invoice window.":::
279
+
280
+
1. Complete the fields as follows:
281
+
282
+
* **Document/Image File Content**. Select this field. A dynamic content pop-up appears. If it doesn't, select the **Add dynamic content** button below the field and choose **File content**. This step is essentially sending the file(s) to be analyzed to the Document Intelligence prebuilt-invoice model. Once you see the **File content** badge show in the **Document /Image file content** field, you've completed this step correctly.
283
+
* **Document/Image URL**. Skip this field for this project because we're already pointing to the file content directly from the OneDrive folder.
284
+
* **Include Text Details**. Select **Yes**.
285
+
* **Add new parameter**. Skip this field for this project.
286
+
287
+
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-analyze-invoice.png" alt-text="Screenshot showing the analyze invoice window fields.":::
288
+
289
+
1. We need to add the last step. Once again, select the **➕ New step** button to add another action.
290
+
291
+
1. In the **Choose an operation** search bar, enter *Outlook* and select **Outlook.com** (personal) or **Office 365 Outlook** (work).
292
+
293
+
1. In the actions list, scroll down until you find **Send an email (V2)** and select this action.
294
+
295
+
1. Sign into your **Outlook** or **Office 365 Outlook** account. After doing so, you see a window where we're going to format the email to be sent with dynamic content extracted from the invoice.
296
+
297
+
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
298
+
299
+
1. We're almost done! Type the following entries in the fields:
300
+
301
+
* **To**. Enter your personal or business email address or any other email address you have access to.
236
302
237
-
:::moniker-end
303
+
* **Subject**. Enter ***Invoice received from:*** and then append dynamic content **Vendor name field Vendor name**.
304
+
305
+
* **Body**. We're going to add specific information about the invoice:
306
+
307
+
* Type ***Invoice ID:*** and append the dynamic content **Invoice ID field Invoice ID**.
308
+
309
+
* On a new line type ***Invoice due date:*** and append the dynamic content **Invoice date field invoice date (date)**.
310
+
311
+
* Type ***Amount due:*** and append the dynamic content **Amount due field Amount due (number)**.
312
+
313
+
* Lastly, because the amount due is an important number we also want to send the confidence score for this extraction in the email. To do this type ***Amount due (confidence):*** and add the dynamic content **Amount due field confidence of amount due**. When you're done, the window looks similar to the following image.
314
+
315
+
:::image border="true" type="content" source="../../media/logic-apps-tutorial/send-email-fields-complete.png" alt-text="Screenshot of the completed Outlook fields.":::
316
+
317
+
> [!TIP]
318
+
> If you don't see the dynamic content display automatically, use the **Search dynamic content** bar to find field entries.
319
+
320
+
1. **Select Save in the upper left corner**.
321
+
322
+
:::image type="content" source="../../media/logic-apps-tutorial/logic-app-designer-save.png" alt-text="Screenshot of the Logic Apps Designer save button.":::
323
+
324
+
> [!NOTE]
325
+
>
326
+
> * This current version only returns a single invoice per PDF.
327
+
> * The "For each loop" around the send email action enables an output format that may return more than one invoice from PDFs in the future.
0 commit comments