Spotify Get Playback State
spotify_get_playback_state · Nodes · Media
Reads current Spotify playback state.
Spotify Get Playback State#
Overview#
Fetches the current playback state for the connected Spotify account.
Returns track/device metadata and playback flags in a single output object.
If there is no active Spotify device/session, this node returns a safe default payload
(is_playing: false, track/device fields as null) instead of failing.
When to Use#
- Check if music is currently playing before issuing control actions
- Read current track metadata for notifications or dashboards
- Branch workflow logic based on
is_playing,repeat_state, orshuffle_state
Configuration#
connection (required)
- Spotify connection from workspace Settings → Connections
retry (optional, default: Off)
- Sends a request again after a failure that passes; see Retries. Reading the playback state is a read, sent again freely.
Inputs#
input (required)
- Any value; used for workflow control flow
Outputs#
output
{
"is_playing": true,
"track_name": "Song Name",
"artist_name": "Artist A, Artist B",
"album_name": "Album Name",
"progress_ms": 42135,
"duration_ms": 201000,
"device_name": "MacBook Pro",
"device_type": "Computer",
"shuffle_state": false,
"repeat_state": "off",
"timestamp": 1712345678901
}
No active device/session result:
is_playing: false- most metadata fields
null
Example#
{
"connection": "spotify-main"
}
Tips#
- Pair this node with Spotify Playback Control to avoid no-device playback errors.
- Use
track_name+artist_nameto generate now-playing messages. - Treat
progress_msandduration_msas nullable values.
Inputs
inputRequired
Outputs
output
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection(spotify) | Yes | Spotify connection id ULID from list_connections |
retry | tagged_union | No | Sends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once. |
base_config | record | No | Shared node configuration. failure_mode decides what a failure of this node does to the workflow; leave it at the default stop unless the workflow handles the failure itself on the node's error output (route_to_error) or the node is a rare emergency kill switch (stop_workflow). |