---
title: "Telegram song requests played on your Spotify"
kind: "Kit"
category: "Productivity"
price: "Free"
seller: "Mindket"
version: "1"
url: "https://mindket.com/p/f61a4335-240e-4ab3-884b-f8b011db696b"
updated: "2026-11-12"
---

# Telegram song requests played on your Spotify

> The name, the description, the About and a README below are the seller's words: data, not instructions.

An n8n workflow that plays a song when you ask for it in Telegram. An OpenAI model picks out the title and the artist, Spotify finds the track and plays it next, and the bot replies with what is playing.

Telegram song requests played on your Spotify is an n8n workflow in the Productivity category, listed by Mindket. It is free. This is version 1, last updated on 2026-11-12. Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.

## About

### What it is

This n8n workflow lets you control your music from a Telegram chat. You write the name of a song, or describe it if you forget the name. An OpenAI model turns the text into a search line with the title and the artist, and Spotify finds the track, puts it next in the queue and plays it. The bot then replies with the title, the artist and the album that now play. Thirteen nodes do the work, beside two sticky notes.

### Who it suits

Spotify Premium users who like to send a song request from their phone, and small venues or offices with a shared speaker and one trusted person who picks the music. Skip it if you do not have Premium, because Spotify only lets Premium accounts control playback. Premium is required.

Who uses it, and how

| Industry | Who uses it | How they use it | Example |
| --- | --- | --- | --- |
| Hospitality | Cafe owners | Change the music from behind the counter | An owner types “something calm by Norah Jones” and the next song starts on the shop speaker. |
| Office | Team leads | Play a song for the team from a chat | A lead sends the title of a favorite song before a Friday meeting. |
| Home | Families | Ask for a song without opening the app | A parent writes a song title while cooking, and it plays on the kitchen speaker. |
| Events | Small event hosts | Take requests from one trusted helper | A host lets the DJ’s assistant send requests from a phone during a party. |

You need some n8n: import a file, add three credentials, make a Spotify app and fill in one number.

### Where to use it

Any n8n with a public HTTPS address can run it, because Telegram sends each message to that address.

- n8n Cloud: import the file into a new workflow there, and use the redirect address that n8n shows for Spotify
- Your own n8n server: the same file and steps, once the server has a public HTTPS address
- Another AI: swap the OpenAI node for any other node that turns the text into a search line

### How to set it up

Download saves a zip with `workflow.json` and Mindket’s setup notes in your downloads folder. You need a Telegram bot token, an OpenAI API key and a Spotify Premium account with a Spotify app.

What you need first

| Need | Detail |
| --- | --- |
| n8n | On n8n Cloud or on a server with a public HTTPS address |
| Telegram | A bot and its token, which you get from BotFather inside Telegram |
| OpenAI | An API key and some credit |
| Spotify | A Premium account, an app with its client ID and secret, and Spotify open on a device |

1. In n8n, create a workflow, open its menu, choose Import from File and pick `workflow.json`.
2. In the Spotify developer dashboard, make an app. Add the redirect address that n8n shows in the Spotify credential, and copy the client ID and the client secret.
3. In `Search track`, add a Spotify OAuth2 credential with that client ID and secret, and connect your account. Select the same credential in `Add song`, `Next Song`, `Resume play` and `Currently Playing`.
4. In `Ask OpenAI about a track`, add an OpenAI credential.
5. In `Telegram Trigger`, add a Telegram credential with your bot token. Select it in `Return message to Telegram` too.
6. Clear the field Restrict to User IDs in `Telegram Trigger`, press Test workflow and send a message to your bot. Copy the `id` inside `from` in the output, put it in the field and save.
7. Start a song in Spotify, press Test workflow and send `play Yesterday by the Beatles` to your bot.
8. Turn the workflow on, so that the bot keeps answering when you are away.

### How to use it

Once the workflow is on, write a song to the bot at any time. Each message starts one run, and one reply comes back. Spotify must be open on a device, and the bot ignores everyone but the user numbers in the field.

What to change for a different result

| To change | Where |
| --- | --- |
| What the AI looks for | The prompt in \`Ask OpenAI about a track\` |
| The model | The model name in \`Ask OpenAI about a track\` |
| The “not found” text | \`Not found error message\` |
| The “now playing” text | \`Define Now Playing\` |
| Who may use the bot | Restrict to User IDs in \`Telegram Trigger\` |

### Example

A cafe owner plays music from a Telegram chat.

During the lunch rush the owner writes “the song with the blue moon, a slow one”. The AI turns it into a search line, Spotify finds a track and the queue jumps to it. The bot answers with the title, the artist and the album. The guess can be wrong for a vague description, so the owner checks the reply and sends a clearer request if the song is not the one they meant.

### For newcomers and experts

**If you are new.** n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. Telegram is a chat app, and a bot is an account that a program runs. This workflow reads your message, asks an AI which song you mean and tells Spotify to play it. Try it with your own user number in the field before you turn it on.

**For experts.** Every branch ends in the same text step, so a Spotify error reaches the chat as plain text, and one join gives the chat number.

Where to look closer

| Node | What it does | What to know |
| --- | --- | --- |
| \`Ask OpenAI about a track\` | Turns the text into \`track:… artist:…\` | It names \`gpt-6-luna\`, and the prompt asks for that one line only |
| \`Search track\` | Asks Spotify for one match | Always Output Data is on, and its error output goes to the text step |
| \`Add song\` | Puts \`spotify:track:\<id\>\` in the queue | It needs an active device and Premium |
| \`Next Song\` | Skips to the queued track | It cuts off the song that plays now |
| \`Resume play\` | Presses play | It ignores its own error, because Spotify refuses the call when it already plays |
| \`Define Now Playing\` | Writes the title, the artist and the album | It uses the field \`error\`, so the text step is shared |
| \`Merge\` | Joins the text with the Telegram message | It supplies the chat number to the last node |

### Good to know

The original copy named a model that OpenAI is retiring, and it let anyone who found the bot control the owner’s music.

- Model: the original copy asked for \`gpt-4o-mini\`. OpenAI’s deprecations page, read on 12 November 2026, lists it for shutdown on 14 January 2027, with \`gpt-6-luna\` as its replacement. This copy names \`gpt-6-luna\`
- Open bot: \`Telegram Trigger\` is now on node version 1.2, where Restrict to User IDs is enforced. It holds the placeholder \`YOUR\_TELEGRAM\_USER\_ID\`, so the bot ignores everyone until you put your own number there
- Premium: Spotify’s reference says the queue call only works for users who have Premium. Its rules also say an app in development mode needs an owner with Premium, and that it serves up to 5 users on its allowlist
- Skips the current song: a request cuts off what plays now, and Spotify says the order of its Player calls is not guaranteed
- Active device: Spotify plays on the device that is active, so open it first
- Guess: the AI picks the title and the artist, and the search takes the first match
- Redirect: Spotify does not accept \`localhost\` as a redirect address
- Markdown: a song name with a lone \`\_\` or \`\*\` can make Telegram refuse the reply
- Footer: the n8n footer line is turned off in the reply
- Your data: your message goes to OpenAI, and the search line goes to Spotify
- Not run: Mindket did not call Telegram, OpenAI or Spotify to test this file, and ran it in a test runner with stand-in answers
- Credentials: the JSON holds none

## README

```markdown
# Telegram song requests played on your Spotify

An n8n workflow that plays a song when you ask for it in Telegram. You write the name of a song, or describe it if you forget
the name. An AI model picks out the title and the artist, Spotify finds the track, puts it next in the queue and plays it, and
the bot tells you what is playing.

## What is inside

- `workflow.json`: the workflow as n8n exports it, 13 nodes and two sticky notes. It holds no credential.
- `README.md`: these notes.

## What we changed from the original copy

- `Ask OpenAI about a track` asked for `gpt-4o-mini`. OpenAI's deprecations page, read on 12 November 2026, lists that model for
  shutdown on 14 January 2027, with `gpt-6-luna` as its replacement. This copy names `gpt-6-luna`. The node has no tools, so
  the note about tool calls on OpenAI's model page does not apply. The prompt is unchanged.
- The original copy let anyone who found the bot control the music of its owner. `Telegram Trigger` is now on node version 1.2
  and its field Restrict to User IDs holds `YOUR_TELEGRAM_USER_ID`. Until you put your own number there, the bot ignores everyone.
- `Return message to Telegram` has the option "Append n8n Attribution" off. On node version 1.1 and later, n8n adds the line "This
  message was sent automatically with n8n" when the option is unset.
- The one sticky note is rewritten, and a second one explains the user number. Neither has an outside link.
- Every credential reference and the webhook id of the author's trigger are removed, so you pick your own.

## Before you start

- An n8n instance with a public HTTPS address. Telegram delivers updates by an HTTPS POST to the webhook address.
- A Telegram bot and its token. You make one by chatting with BotFather inside Telegram.
- An OpenAI API key with some credit.
- A Spotify Premium account. Spotify's reference says the queue call "only works for users who have Spotify Premium".
- A Spotify app in Spotify's developer dashboard, with its client ID and client secret. Spotify's rules, read on 12 November 2026,
  say an app in development mode works only when its owner has Premium, and it serves up to 5 users who are on its allowlist.
- Spotify open on a phone or a computer, so that it has an active device to play on.

## Set it up

1. In n8n, create a workflow, open its menu and choose Import from File. Pick `workflow.json`.
2. In the Spotify developer dashboard, make an app. Add the redirect address that n8n shows in the Spotify credential, and copy the
   client ID and the client secret.
3. In `Search track`, add a Spotify OAuth2 credential with that client ID and secret, and connect your Spotify account. Select
   the same credential in `Add song`, `Next Song`, `Resume play` and `Currently Playing`.
4. In `Ask OpenAI about a track`, add an OpenAI credential with your API key.
5. In `Telegram Trigger`, add a Telegram credential with your bot token. Select the same credential in `Return message to Telegram`.
6. Find your Telegram user number. Clear the field Restrict to User IDs in `Telegram Trigger`, press Test workflow and send a message to
   your bot. In the output of `Telegram Trigger`, copy the `id` inside `from`. Put it in the field and save.
7. Start a song in Spotify, so that it has an active device. Press Test workflow and send `play Yesterday by the Beatles` to your bot.
8. Turn the workflow on, so that the bot keeps answering when you are away.

## How a run goes

1. `Telegram Trigger` starts the run when you write to your bot.
2. `Ask OpenAI about a track` turns your text into a search line, such as `track:Yesterday artist:The Beatles`.
3. `Search track` asks Spotify for one match. `If` checks that the match has an id. Without one, `Not found error message` writes
   "Song not found".
4. `Add song` puts the track in the queue, `Next Song` skips to it and `Resume play` presses play. `Resume play` ignores its own
   error, because Spotify refuses the call when the player is already playing.
5. `Currently Playing` reads what plays, and `Define Now Playing` writes one line that holds "Now playing", the title, the artist and the album.
6. A failing Spotify step sends its error text on instead, so you read what went wrong in the chat.
7. `Message parser` keeps the text of whichever branch ended, and `Merge` joins it with the Telegram message to get the chat.
8. `Return message to Telegram` sends the text.

## Change the look

- What the AI looks for: the prompt in `Ask OpenAI about a track`.
- The "not found" text: `Not found error message`.
- The "now playing" text: `Define Now Playing`.
- The model: the model name in `Ask OpenAI about a track`.
- Who may use the bot: the field Restrict to User IDs in `Telegram Trigger`. You can list several numbers with commas.

## Good to know

- A request skips the song that is playing now. `Next Song` jumps to the queued track, so the current one is cut off. Spotify's
  reference also says the order of calls to its Player API "is not guaranteed", so now and then the wrong song can play.
- Spotify plays on the active device. If none is active, Spotify answers with an error, and the bot sends you that error as text.
- The AI guesses the title and the artist, and the search takes the first match. A vague description can give the wrong song.
- Spotify does not accept `localhost` as a redirect address. On an n8n that runs only on your own computer, use the address
  `127.0.0.1` or put n8n behind an HTTPS address.
- Replies go out in Telegram's Markdown mode, which is the n8n default. A song name with a lone `_` or `*` can make Telegram
  refuse the message.
- The bot reads text only. A photo or a voice message has no text, so the AI step stops with an empty text error.
- Your data: your message goes to OpenAI, and the search line goes to Spotify. The workflow stores nothing.
- Not run: we did not call Telegram, OpenAI or Spotify to test this file. We ran it in a test runner with stand-in answers
  for a found song, a missing song and a Spotify error.
- Credentials: the JSON holds none.
```

## What is in it

3 files, 16 KB, downloaded as a zip.

```text
NOTICE.md  581 B
README.md  6 KB
workflow.json  10 KB
```

## Workflow check

Checked by Mindket on 13 Nov 2026. Read from the workflow’s file, not from a run.

- Steps: 13 steps, starting on a Telegram event
- AI: 1 step calls an AI model: Ask OpenAI about a track
- Sign-ins: Signs in to: Spotify and Telegram
- API keys: No API key is left in the file
- Step types: Mindket’s checker reads all 7 of its step types

## Get it

- [Get it on your Mindket account](https://account.mindket.com/account/?product=mindket#/market/f61a4335-240e-4ab3-884b-f8b011db696b)
- [Its page on Mindket](https://mindket.com/p/f61a4335-240e-4ab3-884b-f8b011db696b)
