Goals
-
Create and use matched entity
-
Create and use form to initiate process
-
Be able to Test items
-
Be able to sort through history
Certification and walkthrough
Module pre-work: Check to see that the Data Sets for Email-Name and Email-Team are in the Enterprise Components section, or manually create two tables that are similar to the ones below
Pre-filled data source Email-Name:
| Name |
jeff@tonkean.com | Jeff |
rory@tonkean.com | Rory |
ben.wallace@tonkean.com | Benny |
Pre-filled data source Email-Team:
| Team |
jeff@tonkean.com | Finance |
rory@tonkean.com | Sales |
ben.wallace@tonkean.com | Ops |
Training and verification steps:
In this training, we’ll create a new Module. We’re going to learn how to create and open forms, and use the input to link to two data sources. This input will look up on the table, and pull the correct data from another table. This becomes very powerful when connecting multiple cloud services and data sources together to streamline your processes.
Create a form:
-
To start out, create a new Ops Module called “Find Team from Name”
-
Add a Manual Input Source
-
On the “Start Here”, click Manual, which means either form or external input to initiate the flow
-
-
Create a Form and have it take “Input Name” for the Flow
-
Click on the “Forms” icon
on the left, and select +New -> Create Form
-
Click the pen next to New Form, and name this for Input Name
-
Enter any description and optional Tonk command (this allows you to use this form in slack), you can also change colors and add an image to the form too.
-
Click on Builder near the top next
-
Create a form called “Input Name” with a field called “Input Name”
-
On the Builder page, you can create a form, and later even link or route forms to other forms. Another cool fact, you can build forms into your chats (like Slack) so that users never need to leave their preferred interface. For now, let’s start with one input, under “Store Value in Field”, click the drop down below, and scroll down to “New Field”
-
Under New Field, you can choose the different types of fields available to the form, for now we’ll leave this as Text, and name this field “Input Name”, click Save in the top right corner
-
You now have your first form! This can be viewed via the “Link” button or through the slack /tonk command with the form name:
-
-
This is called a “Create Form” because it can start a process, an “Update Form” can be called within a workflow, but we’ll get to that in future modules.
-
Remember the location of the link to the Input Name form, we’ll be using it later. Next, let’s build a matched entity
Linking two data tables
-
We’re going to utilize the two data sources of Email-Name and Email-Team, on the
fields panel, click “Add Matched Entity”
-
Create a Matched Entity linking Name to Input Name
-
Select the Email-Name Data Source from the Menu, you can rename this as well
-
Now select the conditions for this to match, click on “Set New Condition”, and in “Search data field”, select the Name field. Now set this Equal to the Input Name field that you created for the form
-
-
Click Save, and on the
fields menu on the left add fields Email and Name
-
Click + Add Field, then select Email and Name, you can now use these fields anywhere in the workflow
-
-
Now create another matched entity by clicking
-
We now want to match Email-Team with Email of Email-Name
-
In the Add Matched Entity Screen, select the Email-Team data source (we can rename this to Email Team)
-
-
Once again, click on “Set New Condition”, select the matching field to be Email, and match this to the Email from the Email-Name data source field that we unlocked earlier. Click on Save, and make sure to Add “Email” and “Team” fields in the left fields panel like we have done for the previous objects
-
Now all the fields we want are available and connected via Matched Entities
Add a cool notification
-
We’ll just do a simple notification to let us know if this worked. After the “Item is Added” trigger, click on the + sign
and add a Send Notification. Send this to yourself with your preferred method (Email or Messaging tool), and in the message select “Input Name” as well as “Team” in your message
-
Under Email Subject, type Input Name: and the insert field button
add Input Name
-
Under Content of the email (or Message), click on the insert field button and add Input Name and Email Team - Team field also as shown in the picture above
-
What we will see is if inputting a Name successfully ties all the data sources together to grab the Team. We can run the form off the link or we can use the built in Test feature. Let’s try the Test feature to get the hang of that
Test your module using the Test feature
-
On the main workflow page, in the top right, you should see a “Build” on or off switch, make sure that is flipped on
-
Next, click on Test, this can be used whenever Build is on and will take on any changes in the flow
-
On the pop-up, in the future you can select items that have already been taken by the data source, since we have a manual data source, we will be using the form, click “Using Create Form”
-
Select the Input Form you created, then click the Open Test Create Form button
-
On the Form, type in the name Jeff
-
When you click submit, you should get a confirmation on the screen, check your email or slack (whichever you chose earlier) for the message:
Note, this is how you can connect many data sources together, as long as you have an identifier (even with multiple conditions), you can use that linked data across these workflows. You can even add error handling such as if the name was not found, then do another branch
-
Back on your workflow page, you can click on “History” on the top right
-
This History will show you every transaction that flows through each environment, Success or Fail
-
By clicking on each action result you can see where data has changed or to debug errors
Just for your information, you are able to launch these forms from the workflow via slack buttons too, here is an example in a flow: