Automate Recipe: Add missing facts at Upload

This recipe will add facts to documents at the time they are uploaded. This specific recipe will add a 'Workflow Status' fact if one was not added at the time of upload.

 

What you'll need:

Time Required: 5 - 10 minutes

Skill Level: Beginner

  • Permission to upload into your ThoughtTrace Workspace
  • A Select List Fact Type.

 

Create a new Recipe:

  1. Navigate to ThoughtTrace Automate and select 'Create Recipe'
    mceclip1.png

  2. Name the Recipe, select the Location (it should default to the project that was open), and select 'Trigger from an app'. Then click 'Start Building'

 

Build the Recipe:

  1. Select 'ThoughtTrace - User' as the app for trigger step. You may have to type it into the search option to locate it. 
  2. For the Trigger action, select 'Document Created' 
    mceclip0.png
  3. Select a connection to use. If one is not setup yet, select 'Create Connection' and enter in the same credentials that are used to sign into the ThoughtTrace Platform.
  4. For Creation Reason, select 'Upload'. Leave the Document Type field blank.
    • If the Document Type field is filled in, this recipe will only trigger when a document with that document type is uploaded.
  5. Next, the recipe needs to check what facts exist on the document that triggered the recipe. Add a Add a new action and select 'ThoughtTrace - User' as the app.
    mceclip1.png

  6. Select 'List Facts'. In the Document ID field add the Data Pill from the Trigger Action. For the Facts field select the fact that needs to be checked. In this example, we will use the 'Workflow Status' fact. To follow along exactly, use a fact with a 'Select List' data type.
    mceclip2.png
  7. Add a new step and select 'IF condition'
    mceclip3.png
  8. Now, the recipe needs to check if the fact that needs to be added exists. If it already exists, the recipe needs to end. If the fact does not exist, the recipe needs to proceed. Enter the 'Workflow Status' data pill from the 2nd action as the Data Field, and the Condition should be 'is not present'.
    mceclip4.png
  9. Following the 'Yes; path, add a new action and use 'ThoughtTrace - User' as the app and then select 'Add Facts' as the action.
  10. For the Document ID field, add the Data Pill for Document ID from the Trigger action. For the Facts field, select the fact that needs to be applied to the uploaded document. In the case of this recipe, 'Workflow Status' will be selected.
  11. A field will appear below, add the desired value to the fact. Here is an example of what this step should look like:
    mceclip5.png
  12. The recipe is complete! Here is an example of the completed recipe:
    mceclip7.png

 

Optional Enhancements:

  • If the data that needs to be present on the document isn't standard, send a notification to Slack/Teams/Email that a document was uploaded without appropriate metadata with a link to the document.
  • Check for multiple facts rather than just a single fact.
Was this article helpful?
0 out of 0 found this helpful