It's Ramadan now, so I am fasting but I have a cold so my nose is always leaking with fluid (mucus, clear liquid). Does this invalidate my fast and prayers because uncleanness is coming out of me? I take my medicine after I break my fast (after maghrib) and before I start fasting (before fajr).
This is not much sure about your situation because there is no such intentions. This cold flu or any other allergies comes from Allah commandment so this is not invalidate your fast. This is all about intentions.
No amount of phlegm breaks the fast unless it is intentionally swallowed. Open to correction.