Skip to content

Commit 0b1d6b7

Browse files
committed
add v2.1 sharepoint
1 parent df563c2 commit 0b1d6b7

File tree

6 files changed

+120
-25
lines changed

6 files changed

+120
-25
lines changed

articles/ai-services/document-intelligence/includes/logic-app-tutorial/onedrive.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.subservice: forms-recognizer
55
ms.topic: include
66
ms.date: 07/24/2023
77
ms.author: lajanuar
8-
monikerRange: '<=doc-intel-3.0.0'
8+
monikerRange: '<=doc-intel-3.1.0'
99
---
1010

1111
<!-- markdownlint-disable MD041 -->
@@ -118,7 +118,7 @@ Now that you have the Logic App connector resource set up and configured, let's
118118

119119
:::image type="content" source="../../media/logic-apps-tutorial/when-file-created.png" alt-text="Screenshot of the When a file is created window.":::
120120

121-
:::moniker range="doc-intel-3.0.0"
121+
:::moniker range=">=doc-intel-3.1.0"
122122

123123
4. Next, we're going to add a new step to the workflow. Select the **➕ New step** button underneath the newly created OneDrive node.
124124

@@ -170,7 +170,7 @@ Now that you have the Logic App connector resource set up and configured, let's
170170

171171
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
172172

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.
174174

175175
1. We're going to use the following expression to complete some of the fields:
176176

@@ -245,17 +245,21 @@ Now that you have the Logic App connector resource set up and configured, let's
245245
246246
4. Next, we're going to add a new step to the workflow. Select the **➕ New step** button underneath the newly created OneDrive node.
247247
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.
249249
250250
:::image type="content" source="../../media/logic-apps-tutorial/analyze-invoice-v-2.png" alt-text="Screenshot of Analyze Invoice action.":::
251251
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:
253253
254254
* Enter a **Connection name**. It should be something easy to remember.
255255
* 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**.
256256
257257
:::image type="content" source="../../media/logic-apps-tutorial/create-logic-app-connector.png" alt-text="Screenshot of the logic app connector dialog window.":::
258258
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+
259263
1. Next, you see the selection parameters window for the **Analyze Invoice** connector.
260264
261265
:::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
273277
274278
1. In the actions list, scroll down until you find **Send an email (V2)** and select this action.
275279
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.
277281
278282
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
279283

articles/ai-services/document-intelligence/includes/logic-app-tutorial/sharepoint.md

Lines changed: 107 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Before we jump into creating the Logic App, we have to set up a Sharepoint folde
4242

4343
:::image type="content" source="../../media/logic-apps-tutorial/create-folder.png" alt-text="Screenshot of create and name folder window.":::
4444

45-
1. You see the new folder in your site library.
45+
1. You new folder is located in your site library.
4646

4747
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-site-library.png" alt-text="Screenshot of the newly created folder.":::
4848

@@ -92,7 +92,7 @@ At this point, you should have a Document Intelligence resource and a SharePoint
9292

9393
:::image border="true" type="content" source="../../media/logic-apps-tutorial/logic-app-designer.png" alt-text="Screenshot of the Logic App Designer start page.":::
9494

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.
9696

9797
:::image type="content" source="../../media/logic-apps-tutorial/sharepoint-setup.png" alt-text="Screenshot of the SharePoint connector and trigger selection page.":::
9898

@@ -111,26 +111,38 @@ At this point, you should have a Document Intelligence resource and a SharePoint
111111
> Select the arrow at the end of each listed folder to traverse to the next folder in the path:
112112
:::image type="content" source="../../media/logic-apps-tutorial/folder-traverse-tip.png" alt-text="Screenshot of how to traverse the folder path.":::
113113

114-
:::moniker range="doc-intel-3.0.0"
114+
::: moniker range=">=doc-intel-3.1.0"
115115

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.
117117

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.
119127

120128
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.
121129

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.":::
123131

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:
125133

126134
* Enter a **Connection name**. It should be something easy to remember.
127135
* 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**.
128136

129137
:::image type="content" source="../../media/logic-apps-tutorial/create-logic-app-connector.png" alt-text="Screenshot of the logic app connector dialog window":::
130138

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.
132142
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.":::
134146

135147
1. Complete the fields as follows:
136148

@@ -139,13 +151,11 @@ At this point, you should have a Document Intelligence resource and a SharePoint
139151
* **Document/Image URL**. Skip this field for this project because we're already pointing to the file content directly from the OneDrive folder.
140152
* **Add new parameter**. Skip this field for this project.
141153

142-
:::image type="content" source="../../media/logic-apps-tutorial/add-file-content.png" alt-text="Screenshot of add file content window.":::
143-
144154
1. We need to add a few more steps. Once again, select the **➕ New step** button to add another action.
145155

146-
1. In the **Choose an operation** search bar, enter *Control* and select the **Control** tile.
156+
1. *Control* and select the **Control** tile.
147157

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.":::
149159

150160
1. Scroll down and select the **For each Control** tile from the **Control** list.
151161

@@ -163,7 +173,7 @@ At this point, you should have a Document Intelligence resource and a SharePoint
163173

164174
:::image type="content" source="../../media/logic-apps-tutorial/send-email.png" alt-text="Screenshot of Send an email (V2) action button.":::
165175

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.
167177

168178
1. We're going to use the following expression to complete some of the fields:
169179

@@ -232,6 +242,87 @@ At this point, you should have a Document Intelligence resource and a SharePoint
232242
> * This current version only returns a single invoice per PDF.
233243
> * 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.
234244
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.
236302
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.
328+
:::moniker-end
44.8 KB
Loading
32.8 KB
Loading
-850 Bytes
Loading

articles/ai-services/document-intelligence/tutorial-logic-apps.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ms.topic: tutorial
1010
ms.date: 07/18/2023
1111
ms.author: bemabonsu
1212
zone_pivot_groups: cloud-location
13-
monikerRange: '<=doc-intel-3.0.0'
13+
monikerRange: '<=doc-intel-3.1.0'
1414
---
1515

1616
# Create a Document Intelligence Logic Apps workflow
@@ -20,8 +20,8 @@ monikerRange: '<=doc-intel-3.0.0'
2020
<!-- markdownlint-disable MD024 -->
2121
<!-- markdownlint-disable MD004 -->
2222
<!-- markdownlint-disable MD032 -->
23-
:::moniker range="doc-intel-3.0.0"
24-
[!INCLUDE [applies to v3.0](includes/applies-to-v3-0.md)]
23+
:::moniker range=">=doc-intel-3.0.0"
24+
[!INCLUDE [applies to v3.1 and v3.0](includes/applies-to-v3-1-v3-0-v2-1.md)]
2525
:::moniker-end
2626

2727
:::moniker range="doc-intel-2.1.0"

0 commit comments

Comments
 (0)