Question: do spells provoke attacks of opportunity?
Answer: Spell never provoke, and neither do ranged attacks. You do have Disadvantage on any attack rolls made with ranged attacks and ranged spells while in melee, but that only matters for spells that make any.