Fake.app: How to loop thru the rows in a CSV file and use the data in my Workflow?
The best approach is to use the Repeat With Action with the lines in file option selected. This allows you to read the CVS file on disk and iterate thru the rows as Fake Variables. You can then access these Fake Variables in other Actions which can fill out the web form (or whatever you need).



As seen in the screenshot above, I'm using a Do JavaScript action to initially fetch the current line Variable and then split it into an array of comma separated values.

var line = fake.get('line');


Then I use Fake's JavaScript API to set individual variables for each column:

var row = line.split(',');
fake.set('first', row[0]);
fake.set('last', row[1]);


Then use other Fake Actions to work with the data you've fetched. In this case, I'll fill out a simple web form using the Set Value of HTML Element Action. In this Action's text fields you can access Fake Variables with this special syntax:

${first}