Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an Automator service that adds selected photos to iPhoto. I would like it to also add a specific keyword to these photos.

How can I do this?

I found this question, but the only answer does not set the keywords via automator.

share|improve this question
up vote 3 down vote accepted

If you are using the “Import to iPhoto” Automator action, that returns a list of iPhoto photos you can process. Just add an “Applescript” action after your import action with the following script:

tell application "iPhoto"
    repeat with importedPhoto in (input as list)
        select importedPhoto
        assign keyword string "your keyword"
    end repeat
end tell

– that should do the trick.

share|improve this answer
Thanks, this did indeed do the trick. You left out the word string after keyword, though. I went ahead and edited it in to help future visitors. – Lawrence Johnston May 9 '12 at 0:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.