Flow Tutorial 1 - Filter Customer Information in Dropbox

This tutorial includes a video and written guide to walk you through building an automation Flow from start to finish.


The Problem to Solve

You want to automatically separate customers from non-customers in your data and record at what time this occurs. 

Required Materials

To follow along with this tutorial, you will need:

A Dropbox account from https://www.dropbox.com/login

Download: Demo Customer Data for Dropbox (CSV format)

For best results, use the Chrome browser

Video - Set Up: Start and Stop a Hero_Flow Environment

Video - Filter Customer Information in Dropbox

Guide Outline

The steps to complete for this guide are as follows:

  1. Basics for Automations

  2. Create or log into a Dropbox account.

  3. Upload demo data for this example to Dropbox.

  4. Create a Connection in Hero_Flow to Dropbox.

  5. Create an Input in Hero_Flow to Define Input Data.

  6. Create two Outputs in Hero_Flow for the Output Data.

  7. Build an automated Flow in Flow_Studio.

  8. Run the Flow.

  9. Confirm Success. 

  10. Stop or Delete the Environment.

Basics for Creating Automations

The basics for building an automation are completing the following steps:

  1. Define the input data and how to access it. In this example, a .csv file in Dropbox with demo customer data.

  2. Define the expected output data. In this example, two .csv files in Dropbox with filtered demo customer data.

  3. Create your automation Flow in our point-and-click interface (Flow_Studio) by connecting your input and output.

Start a Hero_Flow Environment

  1. Log into your Hero_Cloud account from https://cloud.automationhero.ai/

  2. Your Environments page is displayed. Click Create Environment.

  3. Enter the cluster name as one word between 8 and 20 characters.

  4. Select the cluster size. (For testing purposes, Automation Hero recommends starting with 2 compute and 1 UI node.)

  5. Select the Cloud region closest to you. If you are based in the EU, select Dublin to respect GDPR. 

  6. Mark the box that you acknowledge that paid resources will be created during the new cluster provisioning. Click OK.

  7. A verification box is displayed. To complete the environment creation process, click OK.

  8. It may take up to 10 minutes for your environment to be created. When successfully created, you will receive an email notification. 

  9. When the process has completed, your new environment's status is marked with a green circle.

  10. You can create multiple environments in your Hero_Cloud account. 

  11. Once the environment is created, click the environment’s name to launch Hero_Flow in that environment.

Set Up Dropbox 

Hero_Flow has many prebuilt connectors included to create connections to your data. This example uses a connector for the file system app Dropbox.

  1. Go to Dropbox.com and login or create a Dropbox account.

  2. After signing in, go to https://www.dropbox.com/developers/apps and click the button Create app.

  3. On the Create a New App page:

    1. Select the option Dropbox API.

    2. Select the option App folder.

    3. Enter a name for the app. In this example, the name "Hero_Flow" is entered.

    4. Click Create app.

  4. In the Dropbox Hero Flow settings:

    1. Make a note of your App key and App secret.

    2. Enter your Hero_Flow redirect URI for the OAuth 2 setting.

      How to find the redirect URI for the OAuth2 setting:

      1. Open Hero_Flow to the Home screen on your computer.

      2. Copy the URL in your address bar except the text "home".
      3. In the Dropbox field Redirect URIs, paste the copied Hero_Flow URL without the tab name after the automationhero.ai/ and add the text "oauth2" at the end.
    3. Click Add.

Keep this browser tab open to reference your App key and App secret when prompted for this information in Hero_Flow.

Create a Connection to Dropbox

  1. Log into your Hero_Flow environment. 

  2. Click Connections.

  3. Click CREATE NEW CONNECTION.

  4. When creating a new connection:

    1. Enter a name for the connection. (Example: Dropbox Connection)

    2. Select File System for the Connection type.

    3. Select DropBox File System for the Input file system.

    4. Enter your Dropbox App Key and App Secret.

    5. Click the button SIGN IN WITH DROPBOX. (When successful, your User Name is automatically filled in.)

  5. Click Continue to to confirm that you trust the app (Hero_Flow)

  6. Click Allow to create a new folder for your app in Dropbox.

  7. Go to Dropbox.com:

    1. Click the folder titled Apps.

    2. Click the name of the folder you created for Hero_Flow.

    3. Click the option New Folder.

    4. Enter a name for the new folder. In this example it is called DemoData.

  8. In the DemoData folder, upload the Dropbox_Demo_Data.csv file.

  9. Go back to Hero_Flow.

    1. In the File path field, enter the folder name you created in the app. (Example: /DemoData)

      1. The file path must start with a slash character "/"

      2. The file path is case sensitive.

    2. Click TEST CONNECTION.

    3. A notification box is displayed showing that the connection was successful.

    4. Click OK to finish saving the connection.

Create an Input for the Data

  1. From the Hero_Flow dashboard, click Inputs.

  2. Click CREATE NEW INPUT.

  3. When creating a new Input:

    1. Enter a name for the Input. (Example: Dropbox Input)

    2. Select the Dropbox Connection.

    3. Enter the file path to the data. (Example: /Dropbox_Demo_Data.csv)

    4. Click the icon next to Fields mapping table.

      Fields mapping table displays all the data column names and column types from your Input data.

      With this feature you can review, add, and remove columns to read and analyze in Hero_Flow.

  4. Click Yes to load the table fields.

  5. All the fields are found from the demo data file.

    1. Change the data type form the Active Customer field from String to Boolean.

    2. Click OK to finish saving the Input.

Create a Output

Outputs are used to write analyzed data results from Flows out of Hero_Flow.

  1. From the Hero_Flow dashboard, click Outputs.

  2. Click CREATE NEW OUTPUT.

  3. When creating a new Output:

    1. Enter a name for the Output. (Example: Customers)  This Output is being created to write out data to Dropbox of records for customers.

    2. Select the Dropbox Connection.

    3. Enter the file path for the data. (Example: Customers.csv) This is the name of the file created Dropbox for the results.

    4. Click ADD FIELD to add all the fields for the output data.

  4. Enter all the fields and their corresponding data types from the Input: Enter the field Processed for the field where you want the timestamp value. Click OK.

  5. Create a second Output for non-customer data. The first Output can be cloned, as most of the fields are identical. Click the settings icon and then click CLONE.

  6. Click YES, CLONE to confirm.

  7. Click the settings icon of the cloned Output and then click EDIT.

  8. Enter a new Output name. (Example: No_Customers)

    1. Enter a new File path. (Example: No_Customers.csv) This is the second file created in Dropbox for the results.

    2. Click OK.

  9. There are now two completed Outputs to write data to Dropbox.

Build the Automation Flow

  1. From the Hero_Flow dashboard, click on Flows.

  2. Click CREATE NEW FLOW.

  3. Enter a name for the Flow. (Example: Dropbox Flow) Click OK.

  4. You are now in the Flow_Studio. Click Add Input to bring in your data.

  5. Select the Dropbox Input. Click OK.

  6. The Input data has now been added. Click the plus icon (+) to add an function that can filter the data.

  7. Search for the function IsTrue under the Filter heading and select it. This function filters for selected Boolean columns with the value TRUE. Click OK.

  8. Select the argument Active Customer (BOOLEAN). Click OK.

  9. Click the branch icon to add a second analytical branch to the Flow.

  10. Search for the function IsFalse under the Filter heading and select it. This function filters for selected Boolean columns with the value FALSE. Click OK.

  11. Select the argument Active Customer (BOOLEAN).  Click OK.

  12. Two analytical branches have been created to filter data based on the column that defines if the record is a customer or not. Click the plus icon (+) to add another function that can timestamp the process.

  13. Search for the function Now under the Creators heading and select it. This function adds a timestamp to a specified column. Click OK.

  14. Enter the name for the column that records timestamp data. (Example: Processed) Click OK.

    The Output field name must be the same as entered for the timestamp field name in the Outputs.

  15. Repeat the process of creating a timestamp for the second branch. Click the plus icon (+) on the second branch to add another function that can timestamp the process.

  16. Search for the function Now under the Creators heading and select it. This function adds a timestamp to a specified column.  Click OK.

  17. Enter a name for the column that records timestamp data. (Example: Processed) Click OK.

    The Output field name must be the same as entered for the timestamp field name in the Outputs.

  18. Click Add Output on the branch that contains the function IsTrue.

  19. Select the Output for the customer data. Click OK.

  20. Select all the corresponding fields from the Input to match with the Output. Click OK.

  21. Click Add Output on the branch that contains the function IsFalse.

  22. Select the Output for the non-customer data. Click OK.

  23. Select all the corresponding fields from the Input to match with the Output.  Click OK.

  24. The Flow has been completed. Click SAVE.

Schedule and Run the Automation Flow

Now that the automation Flow has been built, it can be scheduled and run to produce results.

  1. From the Hero_Flow dashboard, click on Flows.

  2. Click the settings icon and then click Schedule.

  3. Select the schedule type Now and click SAVE.

  4. The Flow runs immediately and process all the data. 

Confirm Success

  1. Open the Hero_Flow folder within your Dropbox Apps folder and the two new files created from the Outputs are available.

    1. The Customers.csv file contains all the data for user records marked as active customers and the timestamp the action occurred.

    2. The No_Customers.csv file contains all the data for user records marked as non-customers and the timestamp the action occurred.

Stop or Delete the Environment 

Running an environment costs money by the hour. Reduce costs by stopping or deleting an environment you are not actively using.

  1. Navigate back to your cloud home screen.
  2. Click the settings icon next to the name of your environment.
  3. Choose Stop or Delete to stop or delete the environment.