AutomationFlowsData & Sheets › Distribution to Streaming Platforms

Distribution to Streaming Platforms

02 - Distribution to Streaming Platforms. Uses postgres, httpRequest. Webhook trigger; 6 nodes.

Webhook trigger★★★★☆ complexity6 nodesPostgresHTTP Request
Data & Sheets Trigger: Webhook Nodes: 6 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Postgres recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "02 - Distribution to Streaming Platforms",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "audio-processed",
        "responseMode": "onReceived"
      },
      "name": "Webhook: audio.processed",
      "type": "n8n-nodes-base.webhook",
      "position": [
        250,
        300
      ],
      "id": "node-trigger"
    },
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT distribute_to_streaming FROM track_settings WHERE track_id = '{{ $json.track_id }}'"
      },
      "name": "Check: Distribution Opt-In",
      "type": "n8n-nodes-base.postgres",
      "position": [
        500,
        300
      ],
      "id": "node-check-optin"
    },
    {
      "parameters": {
        "conditions": {
          "boolean": [
            {
              "value1": "={{ $json.distribute_to_streaming }}",
              "value2": true
            }
          ]
        }
      },
      "name": "If: Opted In",
      "type": "n8n-nodes-base.if",
      "position": [
        750,
        300
      ],
      "id": "node-if-optin"
    },
    {
      "parameters": {
        "url": "https://api.distrokid.com/v1/upload",
        "method": "POST",
        "authentication": "headerAuth",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "track_url",
              "value": "={{ $json.r2_url_processed }}"
            },
            {
              "name": "title",
              "value": "={{ $json.title }}"
            },
            {
              "name": "artist",
              "value": "={{ $json.creator_name }}"
            },
            {
              "name": "genre",
              "value": "={{ $json.vibe_packet.primary_vibe }}"
            },
            {
              "name": "cover_art_url",
              "value": "={{ $json.cover_art_url }}"
            }
          ]
        }
      },
      "name": "DistroKid: Upload",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1000,
        200
      ],
      "id": "node-distrokid"
    },
    {
      "parameters": {
        "url": "={{ $env.BRAIN_URL }}/events/core",
        "method": "POST",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "event",
              "value": "distribution.submitted"
            },
            {
              "name": "payload",
              "value": "={{ { track_id: $json.track_id, creator_id: $json.creator_id, platforms: ['spotify', 'apple_music', 'youtube_music'], eta_hours: 24 } }}"
            }
          ]
        }
      },
      "name": "Brain: Emit distribution.submitted",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1250,
        200
      ],
      "id": "node-brain-dist"
    },
    {
      "parameters": {
        "url": "={{ $env.THINKZONE_API_URL }}/v1/tools",
        "method": "POST",
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "tool",
              "value": "notify_owner"
            },
            {
              "name": "message",
              "value": "Track '{{ $json.title }}' by {{ $json.creator_name }} submitted for distribution to Spotify, Apple Music, YouTube Music. ETA: 24 hours."
            }
          ]
        }
      },
      "name": "Notify: Creator",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        1500,
        200
      ],
      "id": "node-notify"
    }
  ],
  "connections": {
    "Webhook: audio.processed": {
      "main": [
        [
          {
            "node": "Check: Distribution Opt-In",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check: Distribution Opt-In": {
      "main": [
        [
          {
            "node": "If: Opted In",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "If: Opted In": {
      "main": [
        [
          {
            "node": "DistroKid: Upload",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "DistroKid: Upload": {
      "main": [
        [
          {
            "node": "Brain: Emit distribution.submitted",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Brain: Emit distribution.submitted": {
      "main": [
        [
          {
            "node": "Notify: Creator",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "tags": [
    "disco-bass",
    "distribution"
  ]
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

02 - Distribution to Streaming Platforms. Uses postgres, httpRequest. Webhook trigger; 6 nodes.

Source: https://github.com/think-zone/creator-os/blob/main/n8n-workflows/02-distribution.json — original creator credit. Request a take-down →

More Data & Sheets workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Data & Sheets

CMM. Uses httpRequest, postgres, redis. Webhook trigger; 90 nodes.

HTTP Request, Postgres, Redis
Data & Sheets

Scraping. Uses httpRequest, postgres, @apify/n8n-nodes-apify, respondToWebhook. Webhook trigger; 61 nodes.

HTTP Request, Postgres, @Apify/N8N Nodes Apify
Data & Sheets

Workflow B — AI Listing Engine. Uses httpRequest, postgres, errorTrigger. Webhook trigger; 47 nodes.

HTTP Request, Postgres, Error Trigger
Data & Sheets

LogSentinel Workflow. Uses postgres, emailSend, httpRequest. Webhook trigger; 44 nodes.

Postgres, Email Send, HTTP Request
Data & Sheets

Post-Prayer. Uses postgres, httpRequest. Webhook trigger; 44 nodes.

Postgres, HTTP Request