Tools / Compare Lists
Free forever

What the two lists share.
And what each one has alone.

A Flow often has the values you care about in two places: a text field, a multi-select picklist, or a collection built a few elements earlier. This action compares them and hands back the overlap and the leftovers.

Install in production Install in sandbox Source on GitHub ↗

DEMO

Uses Lightning Flow iFrame

Try
Use the demo on this page. Apple, banana, and cherry start selected, and banana and date start on the other list.
Install
Production and sandbox. Unlocked package. Add the action Compare Lists in the Flow that already has the values.
Get help
Setup notes are in the support docs. Source is on GitHub.
How a match is decided

Exact, or at least this many in common.

Set Exact Match? to true when both lists must contain the same values. Order does not matter. Set it to false and use Number of Required Matches when a partial overlap is enough. That number is a minimum: one shared value satisfies a minimum of 1, and a minimum of 2 needs two.

The lists

List 1 is apple, banana, cherry. List 2 is banana, date. They share banana.

Exact match

Is Matched is false. Cherry is only in the first list, and date is only in the second.

Minimum of 1

Is Matched is true. Raise the minimum to 2 and it becomes false, because only banana is shared.

Inputs

Text, a collection, or both.

A multi-select picklist is already a semicolon-separated string. A loop builds a text collection. Pass either shape on each side. If you pass both on the same side, the action combines them, trims spaces, drops blanks, and counts each value once before it compares.

Input What to pass
List 1 and List 2 One value, or several separated by semicolons. A checkbox group and a multi-select picklist both come out of a screen in that shape.
List 1 Collection and List 2 Collection A text collection. Each item is one value, even if the text contains a semicolon. Leave a side empty when you only want the distinct values of the other list.
Exact Match? Required. True when both lists must hold the same values, ignoring order. When this is true, the minimum count is ignored.
Number of Required Matches Used when Exact Match is false. Is Matched is true when the shared count is at least this number. A blank number is treated as zero, so any overlap, including none, counts as matched.
Outputs

The yes or no, and the values behind it.

Use Is Matched on a decision. Use the value lists when the next step needs the actual items: assign them, loop them, or write them back to a field. Matching is case-sensitive, so Red and red stay apart.

Output What you get
Is Matched True for an exact match, or when the shared count meets the minimum you set.
Number of Matches How many distinct values appear in both lists. This is the count you compared to the minimum.
Matching Values Those shared values, sorted. In the example above, banana.
Unique Values List 1 Values in the first list that are not in the second. Apple and cherry in the example. If List 2 is empty, this is the distinct list of List 1.
Unique Values List 2 Values in the second list that are not in the first. Date in the example.
Bonus

Deduplicate one collection.

Pass a single text collection as List 1 Collection and leave List 2 empty. Unique Values List 1 comes back with each value once. Spaces around a value are removed, blanks are dropped, and red and Red stay separate. Apple, banana, apple, cherry becomes apple, banana, cherry.

Install

Install the package, then add the action.

Choose Install for All Users. In the Flow, search for Compare Lists.

Get Notified: Let me know about product and tool updates.