This recipe will check for the existence of "key" attributes on documents at the time they are uploaded into Thomson Reuters Document Intelligence. If the “key” attributes do not exist, a tag will be applied to the document(s) and the user who initiated the upload will receive an email to notify them that “key” attributes are missing. |
Recipe Notes and Optional Enhancements
What You'll Need
Time Required: 10 - 15 minutes
Skill Level: Intermediate
- Access to your Thomson Reuters Document Intelligence workspace
- Permission to upload documents into your Thomson Reuters Document Intelligence workspace
- Permission to edit documents in your Thomson Reuters Document Intelligence workspace
Create a new Recipe
- Navigate to Document Intelligence Automate. Create a new Project, or select an existing Project, then choose Create > Recipe.
- Name the Recipe, select the Location (it should default to the project that was open), select Trigger from an app, and then click Start Building.
Build the Recipe
- Select Thought Trace – API Client as the app for the trigger. (You may have to type it into the search bar to locate it.)
-
- Select Document created for the trigger action and select a connection to use. If a connection is not set up yet, select New connection and enter the same credentials that are used to sign into the Thomson Reuters Document Intelligence platform.
-
- Select Upload for the creation reason and then select the desired document type(s) you would like the recipe to trigger on within the Document type field.
- In this example, we will use the Oil and Gas Lease document type.
- Select Upload for the creation reason and then select the desired document type(s) you would like the recipe to trigger on within the Document type field.
- Next, the recipe needs to check what attributes exist on the document that triggered the recipe. Add a new step by clicking the '+' icon and select Action in an app.
-
- Select Thought Trace – API Client as the app and List Document Attributes as the action.
-
- In the Document ID field, add the Document ID datapill from the step 1 (trigger) output and select the attributes that need to be checked within the Attributes field.
- In this example, we will use the Lease: Code attribute.
- In the Document ID field, add the Document ID datapill from the step 1 (trigger) output and select the attributes that need to be checked within the Attributes field.
- Now, the recipe needs to check if the attribute selected during step 2 exists on the document that is being uploaded. Add a new step and select IF condition.
-
- In the Data field, enter the Lease: Code datapill from the step 2 output and then select is present within the Condition field.
- If the attribute already exists, the recipe needs to end.
- If the attribute does not exist, the recipe needs to proceed.
- In the Data field, enter the Lease: Code datapill from the step 2 output and then select is present within the Condition field.
- Following the Yes path, add a new step by clicking the '+' icon and select STOP job so that the recipe will end if the attribute already exists.
-
- In the STOP job window, mark the stopped job as Successful.
- Delete any steps that still appear after STOP job on the Yes path.
- In the STOP job window, mark the stopped job as Successful.
- Following the No path, add a new step and select Action in an app.
-
- Select Thought Trace – API Client as the app and Add Tags as the action.
- In the Document ID field, add the Document ID datapill from the step 1 (trigger) output and select the tag that needs to be applied to the document within the Tags field.
- In this example, we will use the Missing Lease Code tag.
- Next, the recipe needs to add the user who performed the upload that triggered the recipe within the Assigned To field. Add a new step and select Action in an app.
-
- Select Thought Trace – API Client as the app and Custom action as the action.
- In the Request Type field, select POST.
- In the Path field, paste https://api.thoughttrace.com/documents/00000/users and then replace the 00000 portion of this URL with the Document ID datapill from the step 1 (trigger) output.
- In the Body Input field, select the Actioned by ID datapill from the step 1 (trigger) output and then enclose the datapill with brackets.
- Once complete, you need to change the Body Input type from Text to Formula.
- In the Output field, select Use JSON and then remove the curly brackets and paste ["00000000-0000-0000-0000-000000000000"] into the JSON window before selecting Next and Generate schema.
- Your final JSON sample should appear as ["00000000-0000-0000-0000-000000000000"].
- Next, the recipe needs to pull back the email address of the user who uploaded the document that triggered the recipe. Add a new step and select Action in an app.
-
- Select Thought Trace – API Client as the app and Custom action as the action.
- In the Request Type field, select GET.
- In the Path field, paste https://identity.thoughttrace.com/api/users/00000 and then replace the 00000 portion of this URL with the Actioned by ID datapill from the step 1 (trigger) output.
- In the Output field, select Use JSON and then paste "email": "string" between the curly brackets in the JSON window before selecting Next and Generate schema.
- Your final JSON sample should appear as {"email": "string"}.
- After this, the recipe needs to send an email to the user who uploaded the document that triggered the recipe. Add a new step and select Email by Workato. You may have to type it into the search bar to locate it.
-
- In the To field, select the Email datapill from the step 7 output then, within the Subject field, input a subject line you would like to see on the message that’s sent to the user who uploaded the document that triggered the recipe.
- In this example, we will use Missing Lease Code: TRDI Data Integrity Notification as the subject.
- In the Message field, input a template for the message you would like to see within the body of the email that’s sent to the user who uploaded the document that triggered the recipe.
- See below for an example of an HTML message template that leverages user-defined text as well as datapills from previous steps within the recipe.
- In the To field, select the Email datapill from the step 7 output then, within the Subject field, input a subject line you would like to see on the message that’s sent to the user who uploaded the document that triggered the recipe.
- Finally, add a new step and select STOP job.
-
- In the STOP job window, mark the stopped job as Successful.
- The recipe is complete! Here is an example of the completed recipe:
NOTE:
This recipe is built to run to completion on documents that are added to your Thomson Reuters Document Intelligence workspace with a user-assigned document type via the document upload screen. If you are performing an upload of documents with user-assigned document types via a process that requires API Credentials (Client ID & Client Secret), such as a bulk upload via the data utility, then the recipe will kick back an error after applying tags to your documents (step 5) since the upload will be attributed to the API Client being leveraged instead of a specific user. If you’re allowing AI to identify/classify your documents upon upload and would still like this recipe to run once that process is complete, then you will need to adjust the recipe to account for this within the initial trigger.
Optional Enhancements:
- Instead of Email by Workato, Automate can also send messages in Teams, Slack, Outlook, etc.
- Adjust your recipe to:
- check for multiple key attributes rather than a single key attribute
- check for key attributes across multiple document types rather than a single document type
- trigger when a new document is created via splitting
- designate a specific user to assign documents to and send a message to when uploads are performed via a process that requires API Credentials
Comments
0 comments
Please sign in to leave a comment.