Automator fails. Is there a better solution?
You can add certs to a keychain with the command line tool security

It's been a while since I've used it, but IIRC the command would be:

security add-trusted-cert -r trustRoot -k /path/to/keychain /path/to/cert

Read the man page:

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/security.1.html