Yes, it is possible to connect Spotify to iMovie. However, there are a few steps you need to follow to achieve this.
First, open the Spotify application and navigate to the song or playlist that you want to use in iMovie. Once you've selected the track, pause it and then open iMovie.
Within iMovie, locate the project you're working on and select the section where you want to add the Spotify track. Then, navigate to the "Audio" tab and click on the "iTunes" option.
Once the iTunes dialog box appears, select the "Spotify" option from the drop-down list. Your Spotify playlists should then appear, and you can choose the one you want to use in iMovie.
Finally, select the track you want to use and drag it into your iMovie project. You can then edit the track as you see fit and play it alongside your video content.