Automate Spotify Control with IKEA Remote & n8n Workflow

This automation empowers music lovers to control Spotify playback using an IKEA 5-button remote. It routes MQTT messages from the remote to execute precise Spotify actions like volume adjustments, playback control, and favorite playlist playback, saving time and simplifying music management.
spotify
httpRequest
mqttTrigger
+7
Workflow Identifier: 2078
NODES in Use: Spotify, HTTP Request, Sticky Note, SplitOut, Filter, Set, Switch, If, MQTT Trigger, NoOp
Automate Spotify with n8n and IKEA

Press CTRL+F5 if the workflow didn't load.

Learn how to Build this Workflow with AI:

What This Workflow Does

This workflow connects an IKEA 5-button remote to Spotify playback by reading messages sent via MQTT and using Spotify’s API to control music.

It stops the user from needing to switch apps or devices for music control.

The result is easy play, pause, skip, volume change, and playlist starting with simple button presses.


Tools and Services Used

  • n8n Automation Platform: Runs and manages the workflow.
  • Spotify API with OAuth2: Controls playback and retrieves devices and playlists.
  • MQTT Broker (Zigbee2MQTT): Receives messages from the IKEA remote.
  • IKEA 5-button Remote: Sends MQTT messages when buttons are pressed.
  • n8n Nodes: Includes Spotify, HTTP Request, MQTT Trigger, Switch, Filter, Set, SplitOut, NoOp, and Sticky Notes.

How This Workflow Works

Inputs: MQTT messages from IKEA remote buttons and Spotify API data such as available devices and current playback status.

Processing Steps:

  • MQTT Trigger node listens for remote button presses.
  • Set node holds constants like target Spotify device name and favorite playlist.
  • Switch node routes messages based on button actions.
  • HTTP Request nodes query Spotify for devices and playback status.
  • Filter node selects the user’s target playback device ID.
  • HTTP Request node activates the correct playback device.
  • Switch routes commands like play/pause, next/previous, volume up/down, or custom playlist triggers.
  • Spotify nodes and HTTP Request nodes perform those commands by calling Spotify’s API.

Output: Spotify music playback changes happen on the selected device as per remote button presses, with volume adjusted by steps, playback toggled, and playlists started instantly.


Beginner Step-by-Step: How to Use This Workflow in n8n

1. Download and Import Workflow

  1. Click the Download button on this page to get the workflow file.
  2. Open your n8n editor where you manage workflows.
  3. Click the menu, select “Import from File,” and choose the downloaded workflow.

2. Configure Credentials and Settings

  1. Add your Spotify OAuth2 credentials in the appropriate HTTP Request node and Spotify node.
  2. Set up MQTT credentials so the MQTT Trigger node can connect to your broker.
  3. In the Set node named “Globals,” check and update device names or playlist names to match your actual setup.

3. Test the Workflow

  1. Press buttons on your IKEA remote within MQTT range and watch the executions in n8n for errors or successes.
  2. Confirm playback changes happen on your target Spotify device.

4. Activate Workflow

  1. Turn the workflow switch to ON in n8n editor to start automatic listening and responding to remote buttons.
  2. Keep the n8n instance running; for self hosting, see self-host n8n for help.

Customization Ideas

  • Change the Spotify device or playlist names in the Globals node to your own speakers and favorite playlists.
  • Adjust volume step size by editing JavaScript expressions in volume up/down HTTP Request nodes.
  • Add extra button functions or messages if your remote sends custom events.
  • Filter devices by ID instead of name for quicker device selection if device IDs are static.

Troubleshooting Common Issues

  • Error 401 Unauthorized: Check Spotify OAuth2 credentials are valid and refresh them.
  • No Devices Found: Confirm Spotify app is open on the target device and that device names match exactly in Globals.
  • Volume API Call Fails: Verify JavaScript clamps are correct in volume HTTP Request nodes to keep volume between 20 and 100.
  • Buttons Not Working: Check MQTT Trigger is receiving messages and Switch node routing matches exactly the MQTT payload strings.

Production Checklist

  • Test MQTT message arrival from the IKEA remote in MQTT Trigger node.
  • Make sure Spotify OAuth credentials are active and complete access is granted.
  • Confirm device and playlist names exactly match in the Globals Set node.
  • Verify all button routes in Switch nodes correspond to correct MQTT message strings.
  • Check Spotify API response success in HTTP Request nodes during control tests.
  • Save a backup of your workflow before enabling live operation.

Summary

✓ You get simple music controls directly from your IKEA remote.

✓ The workflow turns MQTT messages into Spotify commands automatically.

✓ Volume adjusts smoothly by 5% steps with safeguards.

✓ You can start favorite playlists with a hold button press.

→ This saves time and avoids juggling apps or devices for music.


Automate Spotify with n8n and IKEA

Visit through Desktop to Interact with the Workflow.

Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.
Author
Written By
Vikash Kumar
Building AI agents, n8n workflows and end-to-end automation for 30+ Brands across India, the US, Europe, Dubai & Australia. 7+ years of Experience saving founders real hours every week - no code required.

Frequently Asked Questions

Yes. Any remote that sends MQTT messages with clear payloads can be configured by adjusting the switch routing in n8n to handle those messages.
No. OAuth2 credentials are securely stored in n8n. All Spotify API calls are properly authenticated.
API calls will fail with 401 errors. Renew the OAuth2 credentials in n8n to restore workflow functionality.
It uses an HTTP Request to fetch all devices, filters to the device name set in the Globals node, then sends a request to activate playback on that device.

Related Workflows

Automate Twist Channel Creation and Messaging with n8n

This workflow automates creating and updating a channel in Twist and sending a personalized message to specific users. It eliminates manual setup errors and saves time managing Twist communications.

Automate Ideogram Image Generation with Google Sheets & Gmail

This workflow automates graphic design image generation via Ideogram AI, storing image data in Google Sheets and Google Drive, with email alerts via Gmail. It saves designers hours by automating image creation, remixing, review, and record-keeping.

Automate IT Support with Slack and OpenAI in n8n

Streamline IT support by automating Slack message handling using n8n and OpenAI. This workflow handles Slack DMs, filters bots, queries a Confluence knowledge base, and delivers AI-generated responses, improving support efficiency and response time.

Automate Crypto Analysis with CoinMarketCap & n8n AI Agent

Discover how this unique n8n workflow leverages CoinMarketCap’s multi-agent AI to deliver precise, real-time cryptocurrency insights directly via Telegram. Manage crypto data analysis efficiently with automated multi-source API integration.

Automate Gumroad to Beehiiv Subscriber Sync with n8n

Learn how to automatically add new Gumroad sales customers as Beehiiv newsletter subscribers using n8n automation. This workflow saves time by syncing sales data to Google Sheets CRM and notifying your Telegram channel instantly.

Generate On-Brand Blog Articles Using n8n and OpenAI

This workflow automates the creation of on-brand blog articles by analyzing existing company content using n8n and OpenAI. It extracts article structures and brand voice to produce consistent draft articles, saving significant content creation time.
1:1 Free Strategy Session
Your competitors are already automating. Are you still paying for it manually?

Do you want to adopt AI Automation?

Every hour your team does repetitive work, you're burning real money.
While you wait, faster businesses are cutting costs and moving quicker.
AI and automations aren't the future anymore — they're the present.

Book a live 1-on-1 session where we show you exactly which of your daily tasks can be automated — and what it’s costing you not to.