Skip to main content

Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision

Workflow preview

Workflow preview
100%
Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

Who is this for Space Enthusiasts & Music Lovers : Discover new music paired with stunning cosmic visuals. Community Managers : specific Slack channels with engaging, creative daily content. n8n Le...

Best for

  • Content Creation automation workflows
  • Multimodal AI automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.scheduletrigger, n8n-nodes-base.code, n8n-nodes-base.nasa, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.spotify, n8n-nodes-base.slack, n8n-nodes-base.stickynote

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Takumi Oku.

Original n8n.io source

1.1 Workflow description

Title
Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision
Workflow name
Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision

Who is this for

  • Space Enthusiasts & Music Lovers: Discover new music paired with stunning cosmic visuals.
  • Community Managers: specific Slack channels with engaging, creative daily content.
  • n8n Learners: Learn how to chain Image Analysis (Vision), Logic, and API integrations (Spotify/Slack).

How it works

  1. Schedule: The workflow runs every night at 10 PM.
  2. Mood Logic: It checks the day of the week to adjust the energy level (e.g., higher energy for Friday nights, calmer vibes for Mondays).
  3. Visual Analysis: OpenAI (GPT-4o) analyzes the NASA APOD image to determine its color palette, mood, and subject matter, converting these into musical parameters (Valence, Energy).
  4. Curation: Spotify searches for a track that matches these specific parameters.
  5. Creative Writing: OpenAI generates a short poem or caption linking the image to the song.
  6. Delivery: The image, track link, and poem are posted to Slack, and the track is automatically saved to a designated Spotify Playlist.

Requirements

  • NASA API Key (Free)
  • OpenAI API Key (Must have access to GPT-4o model)
  • Spotify Developer Credentials (Client ID and Client Secret)
  • Slack Workspace and Bot Token

How to set up

  1. Set up your credentials for NASA, OpenAI, Spotify, and Slack in n8n.
  2. Create a specific Playlist in Spotify and copy its Playlist ID.
  3. Copy the Channel ID from the Slack channel where you want to post.
  4. Paste these IDs into the respective nodes (marked with <__PLACEHOLDER__>) or use the Set Fields node to manage them globally.

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Daily Schedule

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.2

Block 2 - Determine Mood Bias

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 3 - Get NASA Picture

Type / Role
n8n-nodes-base.nasa - nasa
Config choices
Version 1

Block 4 - Analyze Image for Music

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2

Block 5 - Find Matching Track

Type / Role
n8n-nodes-base.spotify - spotify
Config choices
Version 1

Block 6 - Generate Caption

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2

Block 7 - Post to Slack

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.3

Block 8 - Save to Playlist

Type / Role
n8n-nodes-base.spotify - spotify
Config choices
Version 1

Block 9 - Template Description

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 10 - Step 1 Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 11 - Step 2 Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 12 - Step 3 Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 13 - Step 4 Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

3. Summary Table

Workflow Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision
Complexity intermediate
Nodes 13
Categories Content Creation, Multimodal AI
Author Takumi Oku
Published 27 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/11300/11300.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Turn NASA astronomy pictures into matching Spotify tracks using GPT-4o Vision do?

Who is this for Space Enthusiasts & Music Lovers : Discover new music paired with stunning cosmic visuals. Community Managers : specific Slack channels with engaging, creative daily content. n8n Le...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Content Creation, Multimodal AI use case.