Get File Data action
updated about 1 month ago
Get File Data action enables you to pull in tabular data from an Excel/CSV file and map it to a process variables. This will allow you to use data coming from external files in process flows.
You can proceed with the action configuration by manually creating the structure of the file (header) that will be uploaded.
You need to map the file structure created to a process variable which will give you the possibility to use the data in other actions in process flows.
How to configure the Get File Data action?
Go to the Process Designers section and open a new or an existing process. Actions configuration can be performed once they are dragged and dropped on canvas.
Video on how to configure Get File Data, available here.
Step 1: Drag the Get File Data action from Toolbar and drop it on canvas; click on the action to open the Properties Panel.
Step 2: You can edit the Action Name.
1. File to Process: select the process variable that will fetch your file details when kicking off the process flow. You can select the file type variable from selector (if created upfront) or you can click on "+Create new variable" to create a file type variable;
- mandatory: type = File;
- set as Input.
2. Store data as: select a process variable that will be storing the data at runtime, data that is pulled from the uploaded file. You can select the process variable from selector (if created upfront) or you can click on "+Create new variable" to create a data model type variable;
- defining the process variable is essential as it will store the data when the process in running, and you can use this data further in processing.
- mandatory: type = data model with attributes that will be mapped to your file structure; you will further map columns to selected data model's attributes.
- mandatory: process variable defined will be a list as your file may contain more than 1 entry.
3. Add column: start building the structure of your file by pressing "Add column". In "Column Name" add the name of the corresponding column in the file that will be processed; in "Map Data" add the attribute that will be mapped to the column (attributes of data model selected in Step 1).
Example of configuration:
1. Based on the file that will be used in processing, the first step is to create a data model with attributes following the external file's structure:
- external file structure
- data model created - in this case named "TeamDetails"
If the file that is intended to be imported has duplicate column names only the first one will be imported.
2. Create process variables needed for this action:
3. In process designer, drag and drop a "Get file data" action on canvas and open configuration panel.
4. Configure action:
- File to process: the file type process variable created;
- Store data as: the process variable type data model ("teamdetails" data model created at step1)
- Add columns and map file's header columns to data model's attributes
"Column name" in configuration panel must match the name of the columns in your external file in order to have a correct action configuration.
Save, Validate and Run the process. Upload your file:
Run the process. In "Instances" you can check now the output of the action, data being available in a JSON format. You can now use this process variable further in other actions within actions. This is how "Get file data" action enables you to pull in tabular data from an Excel/CSV file and map it to a process variables. This will allow you to use data coming from external files in process flows.