← All N8N workflows
Media & contentFilterHTTP RequestIfMqtt TriggerNo Op

Receive MQTT message from IKEA 5-button Switch, and route actions.

Configured with Filter, HTTP Request, Mqtt Trigger, Split Out, and additional nodes. Review the connections and setup before adapting this template.

Workflow preview
Files / mediaSpotify NextSpotifyFiles / mediaSpotify ResumeSpotifyFiles / mediaSpotify PauseSpotifyWeb / APISpotify API - Volume up5pctHTTP RequestWeb / APISpotify API - Volumedown 5pctHTTP RequestWeb / APISpotify API - GetAvailable DevicesHTTP RequestTransformExtract IndividualDevicesSplit OutRoutingSelect Device by Nameto get device_idFilterWeb / APICustom Function 1 - P1HTTP RequestFiles / mediaCustom Function 2 - P2SpotifyFiles / mediaCustom Function 1 - P3SpotifyWeb / APISpotify API - ActivateTarget Playback DeviceHTTP RequestRoutingRoute to RequestedFunctionSwitchFiles / mediaCustom Function 2 - P1SpotifyRoutingFilterFilterTransformGlobalsEdit FieldsFiles / mediaCustom Function 2 - P3SpotifyRoutingOops. How was thisreached?No OpWeb / APISpotify API - GetDevice StatusHTTP RequestRoutingAlready playing onTarget Device?IfRoutingIs Playing?IfFiles / mediaSpotify PrevSpotifyTriggerMQTT Trigger - RemoteSwitchMqtt TriggerRoutingRemote Action ->Function RouterSwitch

Node categories in this workflow

  • Files / media
  • Web / API
  • Transform
  • Routing
  • Trigger

Icons describe general node roles, inferred from node types. Inspect the parameters for the configured action.

Drag to pan; use + and − to zoom. Reconstructed from the exported node positions; nothing runs here. Dashed lines represent non-main connections. Full node names and notes appear below.

How it works

The exported workflow contains the following configured nodes. Their connections are shown above; inspect the JSON for the complete logic, expressions, and external actions.

Workflow node names, types, and operations
NodeCategoryTypeOperation
Spotify NextFiles / mediaSpotifynextSong
Spotify ResumeFiles / mediaSpotifyresume
Spotify PauseFiles / mediaSpotifypause
Spotify API - Volume up 5pctWeb / APIHTTP RequestPUT
Spotify API - Volume down 5pctWeb / APIHTTP RequestPUT
Spotify API - Get Available DevicesWeb / APIHTTP RequestSee node parameters
Extract Individual DevicesTransformSplit OutSee node parameters
Select Device by Name to get device_idRoutingFilterSee node parameters
Custom Function 1 - P1Web / APIHTTP RequestPUT
Custom Function 2 - P2Files / mediaSpotifySee node parameters
Custom Function 1 - P3Files / mediaSpotifynextSong
Spotify API - Activate Target Playback DeviceWeb / APIHTTP RequestPUT
Route to Requested FunctionRoutingSwitchSee node parameters
Custom Function 2 - P1Files / mediaSpotifyplaylist / getUserPlaylists
FilterRoutingFilterSee node parameters
GlobalsTransformEdit FieldsSee node parameters
Custom Function 2 - P3Files / mediaSpotifystartMusic
Oops. How was this reached?RoutingNo OpSee node parameters
Spotify API - Get Device StatusWeb / APIHTTP RequestSee node parameters
Already playing on Target Device?RoutingIfSee node parameters
Is Playing?RoutingIfSee node parameters
Spotify PrevFiles / mediaSpotifypreviousSong
MQTT Trigger - Remote SwitchTriggerMqtt TriggerSee node parameters
Remote Action -> Function RouterRoutingSwitchSee node parameters

Setup

  1. Download the JSON and import it into an isolated n8n instance. Leave the workflow inactive.
  2. Connect your own credentials through n8n’s credential store. Replace REPLACE_WITH_* values with your resource identifiers.
  3. Inspect API destinations, Code nodes, database queries, file paths, and outbound actions.
  4. Run with synthetic data and harmless destinations. Enable triggers only after checking the actual outputs.

Requirements

An n8n instance with the listed node types and compatible versions. Service-connected workflows may require accounts, credentials, or paid APIs.

Credential types declared in the source

  • mqtt
  • spotifyOAuth2Api

Workflow notes

Receive MQTT message from IKEA 5-button Switch, and route actions.

Receive MQTT message from IKEA 5-button Switch, and route actions.

Purpose and structure

This folder contains the Receive MQTT message from IKEA 5-button Switch, and route actions. workflow. Its executable nodes use filter, httpRequest, if, mqttTrigger, noOp, set, splitOut, spotify, switch. The table and connection map below are derived from the JSON, not an inferred guarantee of behavior.

Setup

Import inactive. Configure your own credentials and replace REPLACE_WITH_* values. Review external destinations and Code nodes before running.

Entry points

MQTT Trigger - Remote Switch

Verification

Sanitized source candidate; not runtime-tested. This overview is generated from node metadata. Read the folder README for the connection map, credential types, and license.

Attribution

https://github.com/Zie619/n8n-workflows/blob/94007c1445d9258a7da116646b79473e7c7c3282/workflows/Splitout/0560_Splitout_Filter_Import_Webhook.json MIT; preserve source notices.

Canvas section labels

These name areas of the original canvas; they do not include explanatory instructions.

  • Receive MQTT message from IKEA 5-button Switch, and route actions.
  • Find the target player device (or spotify device group) by name, and activate it.

More in Media & content