In Mac Automator when you want to use keystrokes in AppleScript like:
on run {input, parameters}
tell application "System Events" to keystroke input
end run
You may got an error said "com.automator.runner.xpc is not allowed to send keystrokes".
I found a lots of questions in stackoverflow and can't get an right answer.
In short:
You have to add the application which you want to run the script to Accessibility
.
For example, if you want to run the script in Chrome, then add Chrome to your Accessibility
, even not need to add Automator.