This workflow corresponds to n8n.io template #11300 — we link there as the canonical source.
This workflow follows the OpenAI → Slack 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 →
{
"id": "guWrCHB4d2x9klso",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Create Spotify playlist from NASA Astronomy Picture of the Day",
"tags": [],
"nodes": [
{
"id": "4df56db4-e10a-4d8b-813c-347974870f8c",
"name": "Daily Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
-880,
112
],
"parameters": {
"rule": {
"interval": [
{
"triggerAtHour": 22
}
]
}
},
"typeVersion": 1.2
},
{
"id": "ffaf3ba5-0dab-459d-83f5-f3adf6d9570b",
"name": "Determine Mood Bias",
"type": "n8n-nodes-base.code",
"position": [
-672,
112
],
"parameters": {
"jsCode": "const day = new Date().getDay();\nlet moodBias = \"\";\n\nif (day === 5) {\n moodBias = \"It's Friday night! Prefer higher tempo and energy. (min_energy: 0.6)\";\n} else if (day === 1) {\n moodBias = \"It's Monday. Need healing and calm vibes. (max_energy: 0.5)\";\n} else {\n moodBias = \"Standard mode. Just match the image.\";\n}\n\nreturn { mood_bias: moodBias };"
},
"typeVersion": 2
},
{
"id": "de74946a-f011-40df-bd98-efcfcc78336d",
"name": "Get NASA Picture",
"type": "n8n-nodes-base.nasa",
"position": [
-448,
112
],
"parameters": {
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "cb509926-da12-4ef2-b803-f2d889247f83",
"name": "Analyze Image for Music",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-224,
112
],
"parameters": {
"text": "Analyze this cosmic image and generate Spotify parameters based on the mood and visual elements.",
"modelId": {
"__rl": true,
"mode": "id",
"value": "gpt-4o"
},
"options": {},
"resource": "image",
"imageUrls": "={{ $('Get NASA Picture').item.json.url }}",
"operation": "analyze"
},
"typeVersion": 2
},
{
"id": "42171195-22b2-482e-947b-7b0e3e288ee4",
"name": "Find Matching Track",
"type": "n8n-nodes-base.spotify",
"position": [
0,
112
],
"parameters": {
"resource": "track",
"operation": "getRecommendations"
},
"typeVersion": 1
},
{
"id": "6d8842d4-ab82-4e9e-9b88-6e5f1eb4ffdb",
"name": "Generate Caption",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
224,
112
],
"parameters": {
"operation": "message"
},
"typeVersion": 2
},
{
"id": "f40f33b8-ceab-496e-bf1e-3bdbdbf72e28",
"name": "Post to Slack",
"type": "n8n-nodes-base.slack",
"position": [
528,
112
],
"parameters": {
"text": "=\ud83c\udfb5 *Cosmic Synesthesia DJ* \ud83c\udfb5\n\n\ud83d\uddbc\ufe0f *Visual:* {{ $(\"Get NASA Picture\").item.json.title }}\n( {{ $(\"Get NASA Picture\").item.json.url }} )\n\n\ud83c\udfbc *Track:*\n*{{ $(\"Find Matching Track\").item.json.tracks[0].name }}*\nby {{ $(\"Find Matching Track\").item.json.tracks[0].artists[0].name }}\n\n\ud83d\udcac *Lyrics / Poem:*\n>>> {{ $(\"Generate Caption\").item.json.message.content }}\n\n\ud83c\udfa7 <{{ $(\"Find Matching Track\").item.json.tracks[0].external_urls.spotify }}|Listen on Spotify>",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Slack channel ID or name__>"
},
"otherOptions": {}
},
"typeVersion": 2.3
},
{
"id": "19f13534-c3de-4a56-a793-c17c32b14f88",
"name": "Save to Playlist",
"type": "n8n-nodes-base.spotify",
"position": [
736,
112
],
"parameters": {
"id": "<__PLACEHOLDER_VALUE__Your Cosmic Archive Playlist ID__>",
"trackID": "={{ $('Find Matching Track').item.json.tracks[0].uri }}",
"resource": "playlist",
"additionalFields": {}
},
"typeVersion": 1
},
{
"id": "d9fd45c8-72a2-4b5c-b5f8-40cfd6120d1c",
"name": "Template Description",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1632,
-288
],
"parameters": {
"color": 6,
"width": 674,
"height": 662,
"content": "## \ud83c\udfb5 Create Spotify playlist from NASA Astronomy Picture of the Day\nTransform the universe into music. This workflow analyzes the **NASA Astronomy Picture of the Day (APOD)** and uses **AI Vision** to curate a matching **Spotify** track, creating a daily cosmic soundtrack.\n\n### How it works\n1. **Daily Trigger**: Runs every night at 10 PM.\n2. **Mood Logic**: Checks the day of the week (e.g., energetic Fridays, calm Mondays).\n3. **Visual Analysis**: OpenAI Vision analyzes the NASA image and the day's mood to generate audio parameters (Energy, Valence).\n4. **Curation**: Spotify finds a track matching these parameters.\n5. **Creative Writing**: OpenAI writes a short poem/caption linking the image and song.\n6. **Notification**: Posts the image, song, and poem to **Slack**.\n7. **Archive**: Saves the track to a specific Spotify playlist.\n\n### Requirements\n- **NASA API Key** (Free)\n- **OpenAI API Key** (GPT-4o supported)\n- **Spotify App Credentials** (Client ID/Secret)\n- **Slack Bot Token**\n\n### Setup\n- Create a Spotify Playlist and paste the ID into the **Save to Playlist** node.\n- Add your Slack Channel ID to the **Post to Slack** node."
},
"typeVersion": 1
},
{
"id": "a4f17907-fcde-4528-a9cb-88783803ec96",
"name": "Step 1 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-912,
-80
],
"parameters": {
"color": 7,
"width": 176,
"content": "### 1. Schedule & Mood\nDetermine if the music should be energetic (Friday) or chill (Monday)."
},
"typeVersion": 1
},
{
"id": "bd834153-fe32-4b12-8fcf-3b60af7b57d1",
"name": "Step 2 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-272,
-80
],
"parameters": {
"color": 7,
"width": 196,
"content": "### 2. Visual Analysis\nFetch the daily image and use AI to interpret it as musical parameters."
},
"typeVersion": 1
},
{
"id": "546f0ed5-0d25-4f65-9e56-88d03319abcf",
"name": "Step 3 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
-80
],
"parameters": {
"color": 7,
"width": 180,
"content": "### 3. Curation & Creativity\nFind the best track on Spotify and generate a poetic description."
},
"typeVersion": 1
},
{
"id": "8e61300a-36db-46cf-8cd5-a9a376caa1f5",
"name": "Step 4 Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
688,
-80
],
"parameters": {
"color": 7,
"width": 180,
"content": "### 4. Notify & Save\nSend the result to Slack and archive the track to your playlist."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "009fa046-6782-4427-b246-afafc57a7a77",
"connections": {
"Post to Slack": {
"main": [
[
{
"node": "Save to Playlist",
"type": "main",
"index": 0
}
]
]
},
"Daily Schedule": {
"main": [
[
{
"node": "Determine Mood Bias",
"type": "main",
"index": 0
}
]
]
},
"Generate Caption": {
"main": [
[
{
"node": "Post to Slack",
"type": "main",
"index": 0
}
]
]
},
"Get NASA Picture": {
"main": [
[
{
"node": "Analyze Image for Music",
"type": "main",
"index": 0
}
]
]
},
"Determine Mood Bias": {
"main": [
[
{
"node": "Get NASA Picture",
"type": "main",
"index": 0
}
]
]
},
"Find Matching Track": {
"main": [
[
{
"node": "Generate Caption",
"type": "main",
"index": 0
}
]
]
},
"Analyze Image for Music": {
"main": [
[
{
"node": "Find Matching Track",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
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…
Source: https://n8n.io/workflows/11300/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
Who is this for Entrepreneurs looking for verified technology to license. R&D Teams tracking aerospace innovation. Content Creators covering tech trends. How it works Fetch: Gets the latest patents fr
A scheduled process aggregates content from eight distinct data sources and standardizes all inputs into a unified format. AI models perform sentiment scoring, detect conspiracy or misinformation sign
AI-powered priority re-evaluation every 2 hours. Analyzes new signals, meeting decisions, emails, and blockers, then runs 3 AI passes (Impact, Urgency, Final Ranking) to suggest re-ranking. Only updat
Imagine a dedicated financial expert tirelessly working behind the scenes, sifting through every transaction, every investment move, and every accounting entry. That's exactly what this automated syst
This workflow automatically collects the latest technology news, filters for emerging topics, and uses AI to score relevance and generate clean, ready-to-share content. It helps you focus on high-impa