To do this:
- Open Automator.
- Press command N (or go to File > New)
- Select the Application option.
- Click the Choose button.
- Click the red Record button (located at top right of the toolbar)
- Now carry out one of the tasks you want to automate (i.e. switch over to Sketch, click on the Plugins menu, etc)