Q: Is it important to have an "intention" when giving Zakat just as we make an intention before praying salah?

A: As Zakat is an act of worship, to have an intention (niyyat) is a condition of its validity. The majority of scholars from the 4 schools of jurisprudence are in agreement on this matter. The intention must be there at the time of paying the Zakat.
According to the Hanafis, Malikis and Shafiis the intention can also be made at the time of setting money aside for the payment of Zakat.
There is nothing specific to say when making this intention. It suffices to merely have the thought in your mind.
If a person makes a donation without having the intention for Zakat, then this donation will not be counted as Zakat. If later they make the intention for this donation to count towards their Zakat, it will still not be valid. The liability of the Zakat will remain until they make the donation again with the “Zakat intention”.

And Allah knows best!

Mufti Billal Omarjee