Not Shazam! from wiki: Shazzan was a Saturday morning cartoon, created by Alex Toth and produced by Hanna-Barbera Productions in 1967 for CBS. The series followed the adventures of two teenage siblings (Chuck and his sister Nancy) traveling around a mystical Arabian world, mounted on Kaboobie the flying camel. During their journey they face several dangers, but they're always helped by Shazzan, a genie with magical powers out of this world.
This cartoon seems related to the Arabian Knights animated segment on the Banana Splits children show which ran in the late 1960s-1970s in the US. Shazzan is made by the animated power duo of Hanna-Barbera and has several Nights-esque themes and elements throughout the show.
Here is the episode: "A 1001 Tricks" on youtube: