The CSV Action
The CSV action block parses CSV-formatted text into an array of objects.- Input: Takes a raw CSV string in the
valuefield. If empty, it usesblock.outputfrom the previous step. - Output: The resulting array is stored in a variable of your choice (via
varName). - Header Mapping: Automatically uses the first row of the CSV as keys for the objects.
Common Use Cases
- Bulk Registration: Drive a signup task with a CSV list of user details.
- Automated Search: Perform searches for a list of keywords or product SKUs.
- Data Enrichment: Update a local dataset by visiting URLs and extracting information.
Workflow Example
- Extract Data: Use a JavaScript block to read a CSV file’s content or fetch it from a URL.
- Parse CSV: Add a CSV action, setting the
varNametobulkData. - Iterate: Use a Foreach action with the selector
bulkData(or a variable reference). - Execute: Inside the loop, use
{$loop.item.column_name}to access specific fields for each row.
Tips
- Quoting: Ensure your CSV data uses standard quoting if fields contain commas or newlines.
- Empty Rows: Figranium automatically filters out empty rows to prevent execution errors.