Hello and welcome to the forum. Sorry you are having this experience and it is excellent you've already spoken to your doctor. If it continues, please do so again. Heart palpitations are actually fairly common. Many things can cause them from stress and anxiety if the sertraline isn't working as well as it should to the sertraline itself. There is a wide list that can cause this. While it can be related to heart disease, I assume since you've spoken to your doctor, you've been examined and this is ruled out? If not, please take that step. An EKG, electrocardiogram or wearing a holter monitor would hopefully answer that question if your doctor feels it is appropriate to take that action. Otherwise, if you have this less and less as you've decreased your sertraline dose, then that may just be the answer you needed. Time will tell for that. But I'd avoid caffeine, take steps to de stress by doing things like meditation and yoga or tai chi, etc. Normally these palpitations while frightening are not serious health concerns. Here is more information https://www.webmd.com/heart-disease/guide/what-causes-heart-palpitations#1
Let us know how you are doing.