Yes that's possible in automator.
There are great websites you can start learning about automator:
The one that balto suggests is good, and there are others:
Then there is this awesome site I found, and he has a lot of tutruals and videos and such:
When you start putting it together, then let us know how this is going and if you still have any questions.