Task: Control your Spotify Player with your Terminal

n8n workflow JSON:
{"id":"2","name":"spotify-cli","nodes":[{"name":"Webhook","type":"n8n-nodes-base.webhook","position":[550,200],"webhookId":"55f2dcb2-f29f-48c4-b48c-a78cc9c875a9","parameters":{"path":"55f2dcb2-f29f-48c4-b48c-a78cc9c875a9","options":{"rawBody":false},"httpMethod":"POST","responseMode":"lastNode"},"typeVersion":1},{"name":"Spotify","type":"n8n-nodes-base.spotify","position":[950,300],"parameters":{"operation":"={{$node[\"Webhook\"].json[\"body\"][\"body\"]}}"},"credentials":{"spotifyOAuth2Api":"spotify"},"typeVersion":1},{"name":"IF","type":"n8n-nodes-base.if","position":[750,200],"parameters":{"conditions":{"string":[{"value1":"={{$node[\"Webhook\"].json[\"body\"][\"body\"]}}","value2":"startMusic"}]}},"typeVersion":1},{"name":"Get ID","type":"n8n-nodes-base.spotify","position":[950,100],"parameters":{"operation":"currentlyPlaying"},"credentials":{"spotifyOAuth2Api":"spotify"},"typeVersion":1},{"name":"Play Music","type":"n8n-nodes-base.spotify","position":[1150,100],"parameters":{"id":"={{$node[\"Get ID\"].json[\"item\"][\"album\"][\"uri\"]}}","operation":"startMusic"},"credentials":{"spotifyOAuth2Api":"spotify"},"typeVersion":1},{"name":"Set","type":"n8n-nodes-base.set","position":[1350,100],"parameters":{"values":{"string":[{"name":"song","value":"={{$node[\"Get ID\"].json[\"item\"][\"name\"]}}"},{"name":"artist","value":"={{$node[\"Get ID\"].json[\"item\"][\"artists\"][0][\"name\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1},{"name":"Get ID1","type":"n8n-nodes-base.spotify","position":[1150,300],"parameters":{"operation":"currentlyPlaying"},"credentials":{"spotifyOAuth2Api":"spotify"},"typeVersion":1},{"name":"Set1","type":"n8n-nodes-base.set","position":[1350,300],"parameters":{"values":{"string":[{"name":"song","value":"={{$node[\"Get ID1\"].json[\"item\"][\"name\"]}}"},{"name":"artist","value":"={{$node[\"Get ID1\"].json[\"item\"][\"artists\"][0][\"name\"]}}"}]},"options":{},"keepOnlySet":true},"typeVersion":1}],"active":true,"settings":{},"connections":{"IF":{"main":[[{"node":"Get ID","type":"main","index":0}],[{"node":"Spotify","type":"main","index":0}]]},"Get ID":{"main":[[{"node":"Play Music","type":"main","index":0}]]},"Get ID1":{"main":[[{"node":"Set1","type":"main","index":0}]]},"Spotify":{"main":[[{"node":"Get ID1","type":"main","index":0}]]},"Webhook":{"main":[[{"node":"IF","type":"main","index":0}]]},"Play Music":{"main":[[{"node":"Set","type":"main","index":0}]]}}}