This guide will walk you through how to build the following community library recipe from scratch:
If you would like to start with the completed recipe, you can refer to this article for instructions on how to copy a recipe from the community library: Using a Recipe from the Hive Automate Library
Build it Yourself:
Instructions to build a recipe that listens for a submission from a specific form, reads the label on the action card created, and automatically updates the action according to your needs. This example routes the card to the correct project, and will assign the card to the correct person.
Create Recipe:
In Hive go to Apps:
Make sure Hive Automate is enabled for your workspace. Then click Open.
*Note: If you are turning this on for the first time and don’t have the Add-on yet, you will be given a two week trial of this feature and given 500 automation tasks to use during the trial.
Go to My Recipes
Click Create in the top right corner and select Recipe
Set up your recipe by giving it a Name, and picking a location for the recipe to save in your Hive Automate folder structure. For this recipe the starting point we want is: Trigger from an app. Click Start Building.
Trigger:
When a Hive Form is submitted it generally does one of two things. It either creates an action, or a project in Hive. The creation of that action or project is what we want our recipe to listen to. Click on the empty Trigger step:
App:
A new panel will open on the right side of your screen asking you to choose an app. Search for Hive and select the Hive connector:
Connection:
It will then ask you to select your connection for the selected app. Choose the connection you want to use:
If you don’t have a Hive connection setup you can refer to the following article: Setting up your Hive connection
Setup:
For this guide we will focus on the trigger event New Action. If our form is set up to create a new action card then all of the information mapped from the form is added to the card on creation. That means we can use all of that information to create automations in Hive Automate.
Here in the setup we have a decision to make. How do we want the recipe to know which new cards in our workspace should be affected by this recipe? There are many ways to do this but we recommend the following two options as they are the easiest to set up.
Option 1: New actions in specific project
In the setup of the trigger you can simply pick the specific project you would like this recipe to listen to. This configuration above will tell the recipe that it should listen for all new action cards created in the project selected in that drop down menu.
Option 2: New actions in any project
The second option would be to set up a trigger condition based on some attribute of the new action card instead of a specific project. In the configuration of your form there is the ability to map the Form Name to the title of the submitted card. If you have selected that option you can have the trigger listen for if the title of the new action contains a specific string. You would configure the Value above to match the name of your Hive Form.
You could of course do a combination of both options listed above, so that you only listen for actions in a specific project, that also have a specific form name in the title. You can add conditions as well if you would like to narrow the trigger down further for more advanced requirements.
Last step here is we want to add the following conditional:
This conditional just ensures that we are only listening to parent action cards. If you are applying a template in the form that includes subactions it would cause the recipe to run when it saw all those new subactions created as well.
Actions:
Now that the trigger is configured to listen for a specific event, we need to tell the recipe what actions in the workflow we want to happen. Click the + button under the word Actions and let's take a look at our options for creating actions:
Here we have a few options of what we can do with our workflow. The first four listed are the most commonly used:
Action in an app: Take a step to do something in one of the connectors.
IF condition: Add a section to the recipe that only will occur if the condition is satisfied.
IF/ELSE condition: Add two sections to the recipe where only the top section will occur if the condition is satisfied, and only the bottom if the condition is not satisfied.
Repeat action: Add a section to the recipe that will loop through a list of items.
IF Condition:
The workflow we are trying to implement does require that we take another Action in an app, but we don’t know what action to take yet. Let's start with the IF condition, to make sure we change the right thing, on the right Hive action card. Click IF condition.
Your recipe will now have 2 new action steps. The parent step is for setting up the conditional, and the child step is blank for you to choose what to do inside the IF conditional. We can check for all kinds of attributes that the new action card has. Some ideas would be: Title, description, due-date, assignee, created by, custom fields, or labels.
For this guide we are going to look at labels. Label data on an action card is given as a list of Label IDs. We can use this list to check if it contains a specific Label ID. Essentially saying if the new action card has a specific label on it, then the IF condition is true:
Hive - Update Action:
This step in the recipe is nested inside the IF condition from above so that it will only run if the condition was true. We are going to go ahead and click action step 3 and select Hive as our connector again. Then select Update record:
Once the action is selected you will be brought to the setup tab. The two mandatory fields here are the type of Object, and then the ID for that object. For this workflow we want to update the Hive action card that triggered the recipe, so we pick Action as our object, and then pass the data pill ID from step 1 into the Action ID we want to edit:
Now the recipe knows what record to update inside the IF condition. From here you can select any changes to that Hive action card that you would like. This is essentially where you are creating the mapping in the recipe. For the specific label, what changes are you looking to automatically apply? The most common fields to change would be the Assignee or the Project you want this action card to go to. Simply pick the values from the following drop downs that you would like. If you want to see a full list of fields available to edit you can click on the optional fields button at the bottom:
Congratulations! You now have one mapping completely set up. How do we go about configuring other mappings? Hive Automate has a copy and paste feature that can make the subsequent mappings go much faster:
Simply hover your mouse to the right of the Action step you wish to copy. Click the three horizontal dots, and click Copy. If you copy a conditional bucket it will automatically copy everything inside it as well.
Once copied you can then paste the selection. Hover your mouse around the area of your recipe where you want to paste the copied step(s):
Click the paste button shown above and a copy of the IF section will appear. From here all you need to do is change the Label ID inside the condition step, and change the update action in Hive step to map the correct Assignee, Project, or any other fields you might have set up. You can continue the copy/paste process until all of the logic you want is complete.
We always recommend testing your recipes before starting them by hitting the Test button in the top right corner. This will turn the recipe on for one submission to test functionality. Simply hit the test button and submit a form to make sure it functions as you intended.
Once you are finished remember to Save your recipe and hit Exit. Back on the main recipe page you can now Start your recipe and Hive Automate will handle all future submissions that meet the trigger criteria.