The Azure Flute, Oak's Letter, and other such items must be received from a PokeMart in order for them to work in-game. To receive them from the PokeMart, you'll need a Wondercard of the event.
Wondercards for these events are available as .PGT files in the English events section of the site. However, they can't be sent through the GTS. You'll need either a flashcart, an USB adapter for gamecarts, or an Action Replay device in order to send those Wondercards to your game. If you have any of these devices, let me know which specific device you have, and I can help you put the Wondercard in your game. If you don't have any of these devices but would consider purchasing one, please let me know and I can give you some recommendations.