Lines In collection is contained in Keyboard Maestro's For Each action.
(Search for “For Each” using the “Insert Action by Name” menu item or ^⌘A in the Keyboard Maestro editor with editing enabled.)
Lines In collection allows each line from the specified source to be processed.
Lines may be read from the System Clipboard, from a Named Clipboard, from a variable, or from a file.
It is also possible to include or ignore blank lines.
A basic example:
For a more complex example (and downloadable macro) see this page on the Keyboard Maestro forum: