Create a new Automater flow Add 'Service'. Service receives 'no input' in 'iTerm'. Add 'Run AppleScript'.