|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:
- Navigate to ThoughtTrace Automate and select 'Create Recipe'
- 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:
- Select 'ThoughtTrace - User' as the app for trigger step. You may have to type it into the search option to locate it.
- For the Trigger action, select 'Document Created'
- 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.
- 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.
- 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.
- 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.
- Add a new step and select 'IF condition'
- 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'.
- Following the 'Yes; path, add a new action and use 'ThoughtTrace - User' as the app and then select 'Add Facts' as the action.
- 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.
- A field will appear below, add the desired value to the fact. Here is an example of what this step should look like:
- The recipe is complete! Here is an example of the completed recipe:
- 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.