Contents

Spotify Add To Queue

spotify_add_to_queue · Nodes · Media

Adds a Spotify item to the playback queue.

Spotify Add To Queue#

Overview#

Adds a Spotify track URI to the current playback queue for the connected account. Returns a confirmation object with success and the track_uri used.

track_uri can come from input (input.track_uri) or node configuration. Input value takes precedence.

Adding to queue requires Spotify Premium and an active Spotify device.

When to Use#

  • Queue a track returned by Spotify Search
  • Build request-based music workflows (chat/command → queue)
  • Insert alert or transition songs into an active session

Configuration#

connection (required)

  • Spotify connection from workspace Settings → Connections

track_uri (optional)

  • Spotify track URI, e.g. spotify:track:4iV5W9uYEdYUVa79Axb7Rh
  • If omitted, provide it via input socket

retry (optional, default: Off)

  • Sends a request again after a failure that passes; see Retries. Adding to the queue is a write, sent again only when Spotify refused it before acting: the connection never opened, or Spotify answered 425 or 429.

Inputs#

input (required)

  • Any value; used for workflow control flow

track_uri (optional)

  • Track URI override
  • Node fails if both input and config URIs are missing/empty

Outputs#

output

{
  "success": true,
  "track_uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh"
}

Typical errors:

  • Missing track_uri
  • Premium required (403)
  • No active device (404)

Example#

{
  "connection": "spotify-main",
  "track_uri": "spotify:track:4iV5W9uYEdYUVa79Axb7Rh"
}

Tips#

  • Feed track_uri directly from Spotify Search output for dynamic queueing.
  • Trim and validate URIs upstream if they come from user input.
  • Follow with Spotify Get Queue to confirm queue order.

Inputs

  • inputRequired
  • track_uriOptional

Outputs

  • output

Configuration

FieldTypeRequiredDescription
connectionconnection(spotify)YesSpotify connection id ULID from list_connections
track_uristringNoSpotify track URI to add to queue (e.g. spotify:track:...)
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).