Developer & DevOps

Monitor Spotify Playback via MQTT and Log Track Data

26 nodes 300 150 Automatic trigger
Download

Workflow Description

An automation template that listens to Spotify playback events through MQTT triggers, processes incoming data with filters and conditional logic, and logs music information while executing custom actions based on playback state.

How it works

  1. 1.Receive playback state signals from MQTT broker
  2. 2.Parse and split incoming data using splitOut node
  3. 3.Apply filters and conditional logic to categorize events
  4. 4.Execute HTTP requests based on playback status
  5. 5.Log relevant track and playback details

Use cases

  • Track favorite songs and collect listening statistics automatically
  • Trigger external workflows when specific music genres or artists start playing
  • Document listening patterns and usage analytics for personal insights

Requirements

  • Active Spotify account connection configured
  • Running MQTT broker with proper credential setup
  • Understanding of conditional logic and data filtering

Service Value

Ready-made workflow template for automation delivery and service execution.

Apps Used

If Mqtt Trigger

Details

Trigger Automatic trigger
Nodes 26
Apps 2
Views 300
Downloads 150

How to Use

  1. 1.Click "Download Template"
  2. 2.Open your n8n dashboard
  3. 3.Go to Workflows > Import from File
  4. 4.Select downloaded file and configure credentials

Nodes Used (26)

/

Spotify Next

If

#1

Spotify Resume

If

#2

Spotify Pause

If

#3

Sticky Note

Sticky Note

#4

Spotify API - Volume up 5pct

HTTP Request

#5

Spotify API - Volume down 5pct

HTTP Request

#6

Sticky Note8

Sticky Note

#7

Spotify API - Get Available Devices

HTTP Request

#8

Extract Individual Devices

Split Out

#9

Select Device by Name to get device_id

Filter

#10

Custom Function 1 - P1

HTTP Request

#11

Custom Function 2 - P2

If

#12

Custom Function 1 - P3

If

#13

Spotify API - Activate Target Playback Device

HTTP Request

#14

Route to Requested Function

Switch

#15

Custom Function 2 - P1

If

#16

Filter

Filter

#17

Globals

Set

#18

Custom Function 2 - P3

If

#19

Oops. How was this reached?

No Op

#20

Spotify API - Get Device Status

HTTP Request

#21

Already playing on Target Device?

If

#22

Is Playing?

If

#23

Spotify Prev

If

#24

MQTT Trigger - Remote Switch

Mqtt Trigger

#25

Remote Action -> Function Router

Switch

#26