A series of primary alcohols and aldehydes were treated with iodine in ammonia water under microwave irradiation to give the intermediate nitriles, which without isolation underwent [2+3] cycloadditions with dicyandiamide and sodium azide to afford high yields of the corresponding triazines and tetrazoles, including the alpha-amino- and dipeptidyl tetrazoles in high optical purity.