Contents

Spotify Playback Control

spotify_playback_control · Nodes · Media

Controls Spotify playback.

Spotify Playback Control#

Overview#

Control Spotify playback from a workflow: play, pause, resume, skip next, or skip previous. For play, you can optionally pass a Spotify URI (spotify:track:..., spotify:album:..., spotify:playlist:...).

This node uses the connected Spotify account and returns:

  • success: true/false
  • error: error text when the action fails

Playback control requires a Spotify Premium account. Playback actions also require an active Spotify device.

When to Use#

  • Start a playlist at a scheduled time
  • Pause music during meetings
  • Resume or skip tracks based on automation logic
  • Build assistant-driven music control workflows

Configuration#

connection (required)

  • Spotify connection from workspace Settings → Connections

action (required, default: play)

  • play
  • pause
  • resume
  • skip_next
  • skip_previous

context_uri (optional)

  • Used by play action
  • If omitted, play/resume resumes current playback context

retry (optional, default: Off)

  • Sends a request again after a failure that passes; see Retries. play, pause and resume repeat safely and are sent again freely. skip_next and skip_previous are writes, sent again only when Spotify refused them before acting: the connection never opened, or Spotify answered 425 or 429.

Inputs#

input (required)

  • Any value; used to keep workflow control flow connected

context_uri (optional)

  • Overrides configured context_uri
  • If both input and config are empty, play resumes current playback

Outputs#

success

true

error

"Failed to start playback: No active Spotify device found. Please start playback on a device first."

Common failures:

  • Premium required (403)
  • No active device (404)
  • Rate limit (429)

Route to error output#

With the failure mode set to Route to error output (base_config.failure_mode: "route_to_error"), a failed action fails the node instead of returning success: false. success is skipped, and error carries the node error value (node_id, node_type, message, causes) in place of the text, with the text above in message. The run records the node as failed with its error routed and completes with warnings. On success error is skipped. In every other mode error is the text above.

Example#

{
  "connection": "spotify-main",
  "action": "play",
  "context_uri": "spotify:playlist:37i9dQZF1DXcBWIGoYBM5M"
}

Tips#

  • Use Spotify Get Playback State before control actions to check whether a device is active.
  • Use context_uri input to switch playlists dynamically per workflow run.
  • Handle success = false with an error branch so workflows can recover gracefully.

Inputs

  • inputRequired
  • context_uriOptional

Outputs

  • success
  • error

Configuration

FieldTypeRequiredDescription
connectionconnection(spotify)YesSpotify connection id ULID from list_connections
actionenum(play, pause, resume, skip_next, skip_previous)NoPlayback action to perform
context_uristringNoSpotify URI to play (track, album, or playlist). Optional - if not provided, will resume current playback.
retrytagged_unionNoSends a request again after a failure that passes: a rate limit, a busy server, a dropped connection. Off sends once.
base_configrecordNoShared 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).