Automation: machines perform tasks automatically but they either, more or less, repeat the same operation or take direction from humans who set parameters. For example many pharmacies have automatic systems to retrieve boxes of drugs. The pharmacist enters the drug name and quantity and the automatic system selects the right box from stores and delivers it to the counter.
Artificial intelligence usually regarded as capable of learning and responding flexibly. It can uncover rules and associations which humans have not discovered. For example, analysing shopping habits to learn which customers are susceptible to particular special offers.