Essentially what you need to do is rename the main() function defined in the first script, then call that within the iterator in the second. You'll need to pass the Account name to this newly name function and think about how you're going to record that in the spreadsheet (you could use named sheets, for example).