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/falseerror: 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)
playpauseresumeskip_nextskip_previous
context_uri (optional)
- Used by
playaction - If omitted,
play/resumeresumes current playback context
retry (optional, default: Off)
- Sends a request again after a failure that passes; see Retries.
play,pauseandresumerepeat safely and are sent again freely.skip_nextandskip_previousare 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,
playresumes 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_uriinput to switch playlists dynamically per workflow run. - Handle
success = falsewith an error branch so workflows can recover gracefully.
Inputs
inputRequiredcontext_uriOptional
Outputs
successerror
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
connection | connection(spotify) | Yes | Spotify connection id ULID from list_connections |
action | enum(play, pause, resume, skip_next, skip_previous) | No | Playback action to perform |
context_uri | string | No | Spotify URI to play (track, album, or playlist). Optional - if not provided, will resume current playback. |
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). |