My magnolia tree is secreting a sticky substance that attracts black insects?
What you're describing is Magnolia Scale, a very common problem for this species. Unfortunately, there is no way to control this pest until late this summer or into fall, when the current generation dies and the larvae emerge (if the tree is small enough, you can manually remove the feeding scales by gently scraping them off, or 'smushing' them). For severe infestations, we recommend a spring oil treatment, and a second year of fall treatments.