For the crafting bot, you should make it mimic the keys on the first craft you make and then detect if the synthesis fails.
I don't know how hard this is to program but i just use macros atm to craft. I just make them fail proof and craft the same thing like 150 times in a row by saying if the item takes 2 synthesis to craft then ill put 3-4 in there just so i can leave it afk for hours at a time