We will use a Consumable Item and if this one is used, a Crafting Recipe will be unlocked.
Read more about Consumable Items!
We have already created a Crafter, which contains a locked Recipe (Tutorial) with the unlockItemID 8.
1. Create a new Gameplay Tag and call it Item.ConsumableType.CrafterRecipe.
2. Create a new Consumable Item with the ID 8.
Set the ItemType to Item.Type.Consumables and set the Consumable Type to Item.ConsumableType.CrafterRecipe.
You can setup everything else however you want.
In this Tutorial you can read more on how to create Items.

If you want to use a other Item ID, you have to set inside your Crafter Data Table the unlockItemID to the new one!
3. Without PlayerTemplate:
Open the Interface Function SP8_UseConsumable and do following:
Check if the Consumable Type is the Type Item.ConsumableType.CrafterRecipe. (You can use a switch as well)
If yes, get the Item from the Inventory.
Get the Structure out of the Item Data Table. You can use GetItemByItemDT and call UnlockCrafterRecipe with the Item ID of the Item.
If it worked, remove the Item from the Inventory.

4. With PlayerTemplate:
Go inside your Player BP to Class Defaults and set the Variable Consumable Type Unlock Crafter Recipe to the Gameplay Tag Item.ConsumableType.CrafterRecipe.

That’s it, now if the Player uses the Consumable Item, he will unlock the Recipe (if not already unlocked) and the Item will be removed.
You can listen to the Crafting Recipe Unlocked Dispatcher on the Crafter Component and make the Recipe visible.