The invitation to the Ukrainian leader came from the President of Indonesia, who is currently the head of the G20.

Indonesian President Joko Vidodo, who heads the G20, has invited Ukrainian leader Volodymyr Zelensky to take part in the G20 summit.
Zelensky announced this on Twitter.
“He held talks with Indonesian President Joko Widodo. He thanked for the support of sovereignty and territorial integrity 🇺🇦, in particular for a clear position in the UN. They discussed food security. I am grateful for the invitation to participate in the G20 summit”, – Zelensky said.
We will add that Joko Vidodo is the current head of the G20. One of the G20 countries is russia, which invaded the territory of sovereign Ukraine on the night of February 24.
The G20 leaders will meet on November 15-16 in Bali.
We will remind, in the end of March Biden offered to take away in russia a place in “Big twenty”. He agrees with the Prime Minister of Australia, who has no desire to “sit at the same table with putin.” And recently, the Bloomberg portal reported that the United States was trying to persuade Indonesia not to invite putin to the summit.