hi, i am quite new to n8n. i have been hosting on my local server. i started playing and i am really amazed by the potential of n8n. i have already worked with llm, telegram etc… i want to create a workflow on spotify, i would like to have an AI agent (llm) to which i ask for example the genre, or a reference song or artist, the llm model creates the playlist for me and sends each song title to the spotify node and creates a playlist. do you have any advice? thanks
sorry , don’t get your question ?
Hi @simone1,
Sure! You can use Groq to get a list of songs and create your own playlist. I also recommend checking out n8n’s website and using their free trial. It’s a great way to try building workflows and learn how n8n works. You should also join the n8n Discord for extra help and tips.
And to get you started here’s a small demo of an LLM Agent that finds songs for you, depending on the given pompt.
Let me know how it goes!
Hello, thank you for the responses.
I know how to connect an LLM to N8n.
I don’t know how to connect the LLM’s response in a format to convert the individual tracks to search on Spotify.
This is my current work in progress of the workflow I want to create.
This is my system prompt on Chatgpt:
"You are an expert Spotify playlist creator. The user will provide you with information that may include the music genre, a reference artist, or a reference song. Your task is to create a playlist. Also, ask the user for the number of tracks if they don’t specify it. Your response should be in JSON format, so that each track and the playlist name can be easily split.
To implement this, I would respond to the user’s request with a JSON structure like this:
{
“playlist_name”: “Name of the Playlist”,
“tracks”: [
{
“title”: “Song Title 1”,
“artist”: “Artist Name 1”
},
{
“title”: “Song Title 2”,
“artist”: “Artist Name 2”
},
…
]
}"
And the LLM model returns a response like this:
[
{
“output”: “{\n "playlist_name": "Melodic Techno Vibes",\n "tracks": [\n {\n "title": "Sky and Sand",\n "artist": "Paul Kalkbrenner"\n },\n {\n "title": "Innervisions",\n "artist": "Tale Of Us"\n },\n {\n "title": "Falling",\n "artist": "Amatis"\n },\n {\n "title": "Lost in Memories",\n "artist": "Fideles"\n },\n {\n "title": "The Last Goodbye",\n "artist": "Lane 8"\n }\n ]\n}”
}
]
How can I split the individual tracks from the LLM’s response?
With the “spotify search track” node, I can find the URI of the single track to give to the “add track to playlist” node, but I wouldn’t know how to split for each track found.
I hope I’ve explained myself, I apologize as I’m Italian and my English isn’t perfect.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.