Using Run Flow For CSV Step
  • 12 Mar 2021
  • 2 Minutes to read
  • Dark
    Light

Using Run Flow For CSV Step

  • Dark
    Light

Article summary

Overview

The Run Flow For CSV step allows designers to build custom logic for each row in a CSV/Excel file. In this tutorial, the Run Flow For CSV step will be used to change a CSV field into an account.

Example

  1. Begin in a Designer Folder, select CREATE FLOW from the Global Action Bar.
  2. In the Create Flow dialog window, select the default Flow, name it Replace Row, and select CREATE to proceed to the Flow Designer.
  3. In the Flow Designer, from the Toolbox > FAVORITE STEPS drag and drop a Create Data step to the workspace and connect it to the Start step. 
  4. In the Properties panel of the Create Data step, under DATA > Data to Create, select SHOW EDITOR. 
  5. In the Data Definitions window, input a data definition with the Name [File] and the Type [FileData].
  6. Select Edit and upload a relevant CSV file with a Constant input mapping. Select CLOSE when complete.
    In this example, the example CSV file can be found below:
  7. From the Toolbox > DATA > EXCEL & CSV category, drag and connect a Run Flow For CSV step to the Create Data step. 
  8. Navigate to the Properties panel > CONFIGURATION > DataFormat drop down list, select Csv, then check the IgnoreFirstRow boolean. 
  9. In the OutputType drop down list, select All/Search... and type in Account. Select DecisionsFramework Account. Leave the Separator as Comma. 
  10. Navigate to INPUTS > File Input, change the input mapping to Select From Flow and select the output of the Create Data stepClick DONE.
    In this example, the output of the Create Data step is named File.
  11. Click EDIT FLOW to continue configuring this step. 
  12. In the new Flow Designer, connect the Start step to the End step.
  13. Select the End step. Under INPUTS > Output Data, change the default Unknown mapping to Build Data.
    1. Notice the appearance of Properties, select the Pencil icon to choose properties relevant to the CSV file. 
      In this example, EmailAddress, First Name, and Last Name are the selected properties.
    2. For each new property, change the mapping type to Select From Flow and select the corresponding RowData.
      For the CSV file used in this example, First Name is the first field, so the input for "First Name" should be RowData.Field01.TextValue, the input data for "Last Name" is RowData.Field02.TextValue, and the input data for "EmailAddress" is RowData.Field03.TextValue.
  14. Save and Close this Flow Designer.
  15. Connect the Run Flow For CSV step to the End step. 
  16. Save the Flow.

Debug

  1. Select Debug from the Top Action Panel. 
  2. Click START DEBUGGING. 
  3. Once the Flow is complete, select View Input/Output Data on the Run Flow For CSV step. Notice the input was a CSV file and for each row in the file, an Account has been passed out.

Was this article helpful?