Automator: How do I use the Choose from List action?

The trick is to use an AppleScript variable!

The other suggested answers work, but the simplest and most straightforward way is to use an AppleScript variable to define the list choices.

A text variable can store only one item of plain text, but an AppleScript variable can be structured as an array, which is exactly what you need to define a list.

enter image description here

  1. In the Variables Library, under Utilities, drag an AppleScript variable into the Workflow above the Choose from List action.

  2. Edit the Variable Options and define its Script as an array of text strings, containing your desired list of choices.


Here is the solution to select only one line in a list.

Remove ("Get Specified Text" and "Choose from List") actions.

Add the "Run AppleScript script" action. 1- Cut the text in the action. 2- Copy/paste this text in the action.

on run
    choose from list {"TXT", "RTF", "RTFD", "HTML"} with prompt "Please make your selection" without multiple selections allowed and empty selection allowed
    return the result as string
end run