Built-in apps
CSV
7 min
true 107 unhandled content type unhandled content type you do not need to establish a connection to use the csv app csv modules you can use the following modules to build your {{scenario plural lowercase}} aggregators create csv merges selected text items and returns them in the csv format the create csv aggregator lets you create csv text from received text values true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example export google contacts to a csv file the create csv module provides you with a list of options as checkboxes if you are selecting contact's id and full name, then the results are returned in a text format export google contacts to a csv file create csv (advanced) merges selected text items and returns them in the csv format employs data structure to define csv columns in the resulting csv file the create csv (advanced) aggregator lets you create a csv text from received text values it employs a data structure that defines the csv columns in the resulting csv file once defined, the columns appear as fields in the csv module setup, available for mapping true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example export google contacts to a csv file the create csv (advanced) module provides you with the option to create a data structure with the aggregating fields you needed if you are defining a data structure with full name and email then the results are returned in a text format export google contacts to a csv file advanced transformers parse csv parses a csv file the parse csv transformer lets you parse a csv text from a received text value or a file if your data comes in binary form (typically from a file), you have to use the tostring() function to convert the binary data to string true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type example transforming complex data to csv for example, you would like to export your google contacts to a csv file with two columns "full name" and "email" the output bundle from the google contacts > get contacts from a group module has the following structure (see on the right) the email addresses are stored inside the emails\[] item, which is an array of collections, each collection containing two items label and email if you employ the simple create csv module, you are offered a list of checkboxes corresponding to a bundle's top level items if you attempt to tick full name and emails items, the create csv module will produce the following output, which is probably not what you wished for "emails","fullname" "\[object object]","shon winer" "\[object object]","lizeth fulmore" "\[object object]","hilario gullatt" "\[object object]","abby eisenbarth" since the item full name is of simple type text it is exported just fine but the item emails , which is of a complex type array of collections, is exported as \[object object] that is how collections and arrays are transformed to text by default to export content of the email item of the first collection of the emails\[] array instead, it is necessary to employ the create csv (advanced) module the module will enable you to define individual columns of your csv file and map items to them, including the nested ones insert the module create csv (advanced) in a {{scenario singular lowercase}} and open its configuration click the add button next to the data structure field to create a new data structure input a name for the data structure and click the add item button to add the individual columns if you wish to export two columns "full name" and "email", the resulting data structure would look like this once you have successfully defined the data structure, fields corresponding to each individual column should appear in the configuration of the create csv (advanced) module so you can map the items take the first item from the emails\[] array and map its item email to the field/column email run the {{scenario singular lowercase}} since the item emails\[1] email mapped to column email is of simple type text, it will be exported correctly now "full name","email" "shon winer","shon\@winer com" "lizeth fulmore","lizeth\@fulmore com" "hilario gullatt","hilario\@gullatt com" "abby eisenbarth","abby\@eisenbarth com" adding a data structure you can add the data structures by clicking add item in the specification field one item represents one column adding a data structure fill in the details in the add item dialog true left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type left unhandled content type