The call came as Hungary's Viktor Orban urged Zelensky to allow inspectors to visit a damaged pipeline in Ukraine that carries the Russian oil to try to get it restarted.
"The president is talking to the Prime Minister of Slovakia, Robert Fico," Ukrainian leader Volodymyr Zelensky's office said in a statement.
"The president is inviting him to Ukraine to discuss all the existing issues."
Fico later said he had "accepted this invitation", but would prefer a meeting in the European Union. He did not give a date for the visit.
He also said that during the call, "I had the distinct impression that Ukraine has no interest in restoring oil transit through its territory."
Slovakia and Hungary, which still rely on Russian energy imports, have accused Ukraine of delaying repairs to the damaged Druzhba pipeline -- which runs from Russia through Ukraine to the two countries.
Kyiv says the pipeline was shut down after being damaged during a Russian attack near the Ukrainian city of Brody on January 27.