he molecule contains one chlorine and three fluorines. All four are halogens. But they have completely different jobs. The chlorine belongs to an acid chloride. When an amine attacks the carbonyl, Cl leaves and a new amide bond forms.
The three fluorines? They can stay attached to the aromatic ring and travel into the final molecule. That's exactly what happens in an early published synthesis of lasmiditan, a drug developed for the acute treatment of migraine.