1. Knowledge Base
  2. AI Blocks and Flows

How do I create a Flow

A step by step guide to help you create Flows in Levity

Flows are the way to combine your AI Blocks with a working solution.

Create an AI Block

If you haven't already done so, the first step will be to create an AI Block. You can review the steps here. If you already have an AI Block that you'd like to use, continue with this guide.

Option #1 - Flows From a Template

There are two ways to create a Flow in Levity. The easiest way is with a Template. These are pre-configured recipes that allow you to easily click and create a common workflow. 

This feature will be rolling out soon, so please check back for the full guide.

Option #2 - Flows From Scratch (Blank Flows)

This option is a little more involved, but ensures you can build out exactly what you need. To get started from scratch, first, log in to your Levity account and click on FLOWS on the left menu, then click the New blank flow button in the top right. You will then see this screen:

Before we do anything else, we want to rename our Flow to something we can recognize later. Click in the top right to change it from Untitled so something more fun.

Next, it's time to build the Flow out.

The Trigger App signals the start of the Flow - this is the App or input that will provide the data to be passed through the AI Block. Examples of this include incoming emails, Dropbox uploads, or form responses. 

Click on the Trigger App box to bring up the App selection panel, and choose one of the options as necessary. For this example, we're going to be connecting Google Sheets.

Note: You will want to get your source file set up prior to running through the Trigger App connection steps. For Google Sheets, this means creating the Sheet and naming the header rows.

The connection steps from here will depend on your selection, and the system will walk you through each step. Here are the basic connection steps for Google Sheets:

1. Connect the Google Sheets account, and authenticate the connection

2. Select the Spreadsheet to pull from (you will need to have this already created in your Google account for it to show up on the list)

3. Select the specific Sheet that you wish to use - this will usually be the default first sheet called Sheet1, unless you customized your spreadsheet differently.

Once you complete this connection, you'll see a message that you've completed all the steps. Now it's time to connect our Trigger App to the AI Block we've already created (see this guide if you've yet to do that step) - click the + icon to the right of the Trigger App icon:

You should see a new addition pop out to the right of your Trigger App. Click on the empty block:

From here, we're going to select the AI Block we want to use.

Once you click on your chosen block, the first piece of information it will ask for is the Input. This is the piece of information from the Trigger App that you want to be input into the AI Block for processing, for example, the Google Sheets column that contains the text to be analyzed by AI.

Select your data and click the Save button.

Next, we need to choose the Output. This is how you outline what the AI Block should do with the data once it has analyzed it. For example, you might want to send the categorized book reviews to your marketing team to use accordingly.

There are two types of output you can choose here:

Single Output would be the workflow described above, where only one course of action needs to happen, regardless of what the AI Block categorizes the data as.

Multi Output would be a conditional workflow. For example, send positive sentiment book reviews to the marketing team, but send negative sentiment book reviews to the customer service team.

At this stage in the setup, you will also want to set the Human Review needed. You can leave this at the standard settings if you are unsure, you're always able to adjust it later if you need to fine tune things.

Click the Save button up the top. Now you need to decide the final part of the Flow - what happens now a categorization is made. For us, we want to route our data to two different places depending on the sentiment. Click the + sign next to the sentiment, then click on the grey STEP 2 block to set this up (if you chose Multi Output like below, you'll need to repeat this step for each label):

This step follows much the same pattern as above - select which App you wish to send the data to, and complete the specific settings for that App. For example, we want to route both sentiments to different Slack channels:

Once you have completed the setup for this final part of the Flow, you're ready to switch it on and get it working:

We recommend adding a piece of test data to your Trigger App to make sure your new setup works. You can then click the Run flow manually button to test it out.

Well done, you now have a working Flow! This process has a lot of steps, so feel free to reach out to our customer team if you have any questions. You can do this by clicking Chat with us in the Resource Center popup in the bottom right corner.