Using For Each Excel Or CSV Row Step

Last Updated: 07/15/2016 Introduced in Verision: 2.0

This tutorial demonstrates how to use For Each Excel Or CSV Row step. This step can be found in Data > List > Excel and CSV category in the ToolBox.

Example:

In this example we are going to create a Flow that creates new Accounts using data from the Excel file. Also, this Flow will show a pop-up Notification for each Account that was created from the Excel file.

Accounts that are currently exist in the Portal are as following…

 currentAccountsInSystem

We begin in the Designer Folder with clicking Create Flow on the Folder Actions panel.

 createFlow

Next, we Name the Flow and click Create to proceed to the Flow Designer.

 nameFlow

In the Flow Designer we need to create a Data that will hold our Excel File. We add Create Data step from Favorite Steps category in the Flow Designer Wizard.

 addCreateDataStep

In the resulting Data Definitions window we click Add New to define new Data.

 addNewData

Then, in the Add DataDefinitions window we Name our Data and select its Type FileData. Click Ok to save and close Add DataDefinitions window.

 dataDefinition

Back in the Data Definitions window we click Add to continue…

 dataDefined

Next, we can pick an Excel file for Create Data step. The Excel file for this example looks as following. It has 3 columns with First Name, Last Name, and Email Address.

 excelFile

In the Flow Designer we select Create Data step on the workspace and Step Information Layer pops up. We use Value picker for the ExcelFile data in the Inputs section to pick our Excel File. Then, we click Add Step to continue designing our Flow.

 addExcelToTheData

Next, we add For Each Excel Or CSV Row step from All Steps [Catalog] > Data > List > Excel and CSV category in the Flow Designer Wizard.

 addForEachStep

To configure Data for this step we select Show Mapping Editor from step’s Options Menu.

 showMappingForForEach

In the Mapping Editor we connect ExcelFile output from Create Data step to the File Input field. Then, we click Ok to save and close Mapping Editor.

 mappingForForEach

Back in the Flow Designer we select For Each Excel Or CSV Row step on the workspace to pop up Step Information Layer. Then, in Input Data section from the Input File Type dropdown we select Excel_xlsx because our Excel File has .xlsx extension.

 inputFileType

On the Next Row outcome from For Each Excel Or CSV Row step we add Create Account step from Integrations > All Integrations > Accounts category in the Flow Designer Wizard.

 addCreateAccountStep

Then, we Show Mapping Editor for the Create Account step…

 showMappingForCreateAccount

In the Mapping Editor we expand Current Row outcome from the For Each Excel Or CSV Row step. We connect Text Value from the Field03 to the emailAddress field, and Text Value from the Field01 to the password field. Then, we save and close Mapping Editor.

 mappingForCreateAccount

Back in the Flow Designer we add Show Popup step from Favorite Steps in the Flow Designer Wizard to the Done outcome from Create Account step.

 addShowPopUp

We call Mapping Editor for the Show Popup step to configure its Data.

 showMappingForPopUp

In the Mapping Editor we use Constant text for the Subject field and Text Merge.Plain Mapping type for the Message field. Then, we click Show Editor for the Message field.

 showEditorForPopUp

In the Merge Text Editor we use TextValues from Fields in the Current Row to reflect an information about currently added Account. When finished, we click Ok to save and close Text Merge Editor. Then, we can save and close Mapping Editor.

 messageEditorForPopUp

Back in the Flow Designer we connect steps in our Flow in the following manner, and click Debug Flow link to test the Flow.

Note that in Decisions version 3.5 and above, you’ll need to click Test Flow to access the Debugger.

3.5 Test Flow Shot

 debugFlow

Our flow executes in the Debugger with no errors and we can see Pop-up Notifications indicating that 4 new Accounts were added…

 flowDebugged

We close the Debugger and the Flow Designer. In the Portal we navigate to the System > Security > Accounts Folder, and confirm that four new Accounts were added to the Portal.

 newAccountsAdded

 

 

 

 

Additional Resources