Replacing multiple text strings from a CSV, then generate a new CSV

I’m attempting to make a scenario like this:

  • Retrieve a CSV file with 13 columns from an FTP server
  • Parse the CSV out
  • In one of these fields, replace strings with other, corresponding strings. For example, 123=abc, 456=def, 789=ghi, etc.
  • Create the new CSV with the value updated
  • Upload the CSV file to another FTP site

I can’t figure out a good way to replace each string in that one column with a corresponding string. There’s clearly a replace function that can be used, but how would you do it with about 10 different possibilities and replacements?

The easiest way to use the SWITCH module or SWITCH function to achieve this.

Learn here: https://www.make.com/en/help/functions/general-functions#switch--expression--value1--result1---value2--result2---------else--

https://www.make.com/en/help/tools/tools#switch

Get in touch,
Manish Mandot

1 Like