I had unprotected sex a day before my menstrual bleeding, hw safe is that?

Pretty safe. If you have regular cycles, then you were at a safe time in your cycle and pregnancy is unlikely. The chance for sexually transmitted disease is always a risk without using protection.