"Reversed" crafting system

Hello!

I’m trying to create a potion crafting table, there are 3 slots to place items on the table and when all 3 slots have an item placed on them, the table will search to see if the ingredients go together to make a potion.

I currently have a data table setup with a single crafting recipe.

How do I go about getting the table to search all crafting recipes for a correct combination and spawning the correct potion?

I have been very stuck trying to find useful tutorials so any help will be greatly appreciated!