This is what it is designed for so should work fine. Just ensure you have that neutral wire.
I would go the same way but I don’t have the 240v near the window and I dont like external wires. I am still looking for a good solar powered unit where the solar panel is hidden behind the blind and the wires are very small.