Product Hunt 🎉 We are featured on Product Hunt! Use code for 1,000 free execution credits.
Tutorial

How to Share Spotify Listening Activity on Nostr

Build your decentralized music identity by automatically scrobbling your currently playing Spotify tracks to Nostr.

Music is a deeply social experience. By connecting your Spotify listening activity to Nostr, you can effortlessly share your favorite tracks, albums, and current vibes with your decentralized social graph.

In this tutorial, we will use a third-party webhook scrobbler (or IFTTT/Zapier) combined with NostrBridge to format and broadcast a beautifully crafted "Now Playing" note every time you save a new track or complete a song on Spotify.

Prerequisites

  • A Spotify account.
  • An automation tool account (like IFTTT, Zapier, or a dedicated scrobbling service that supports generic webhooks).
  • A NostrBridge account.

Step 1: Create a Rule in NostrBridge

First, let's configure the destination for your Spotify activity on NostrBridge.

  1. Log into the NostrBridge Client Dashboard.
  2. Click on Create New Rule.
  3. Select Spotify (or Custom Webhook if your scrobbler uses an arbitrary schema) from the Providers list.
  4. Set the Event Kind to Kind 1 (Short Text Note).
  5. Select your preferred signing method.

Step 2: Configure the Message Template

Use Liquid templating to extract track details and make your Nostr note look great. Enter the following in the template editor:

🎵 Now Playing: "{{ payload.track.name }}" by {{ payload.track.artists[0].name }}
💿 Album: {{ payload.track.album.name }}

Listen here: {{ payload.track.external_urls.spotify }}
#nowplaying #spotify #music #nostr

Note: The exact liquid path (e.g., payload.track.name) will depend on the exact payload structure sent by your automation tool. You can use the NostrBridge Execution Logs to inspect incoming payloads and adjust your template accordingly.

Step 3: Connect Spotify to your Automation Tool

Because Spotify doesn't offer direct push webhooks for end-users, we use an aggregator like IFTTT.

  1. Copy your unique NostrBridge Endpoint URL from your newly created rule.
  2. Log into IFTTT and click Create.
  3. For the If This trigger, search for Spotify and select a trigger like New saved track or a scrobble equivalent.
  4. For the Then That action, search for Webhooks and select Make a web request.
  5. In the Webhook settings:
    • URL: Paste your NostrBridge Endpoint URL.
    • Method: POST
    • Content Type: application/json
    • Body: Construct a JSON object using IFTTT ingredients, like:
      { "track": { "name": "<<<{{TrackName}}>>>", "artists": [{ "name": "<<<{{ArtistName}}>>>" }], "external_urls": { "spotify": "<<<{{TrackURL}}>>>" } } }
  6. Save and turn on the Applet.

Step 4: Jam Out and Verify

Trigger the event on Spotify (e.g., by liking a track). Within moments, the automation tool will push the JSON payload to NostrBridge, which compiles your template and broadcasts the note!

You are now seamlessly sharing your musical journey on the decentralized web.

Ready to automate Nostr?

Join NostrBridge today and connect your favorite apps.

Start Bridging for Free