This question has been answered by Jeff Badger on the Ask the Expert session. The answer is as follows:
Yes, you can control what an automation does with an external configuration file. It is not recommended to store username or password in a clear text format though. You can use the ASOManager component to store multiple login credentials for a single application. This will allow you to reference them in your automations but keep them secure.