Announcements

Help Wizard

Step 1

NEXT STEP

FAQs

Please see below the most popular frequently asked questions.

Loading article...

Loading faqs...

VIEW ALL

Ongoing Issues

Please see below the current ongoing issues which are under investigation.

Loading issue...

Loading ongoing issues...

VIEW ALL

n8n with spotify

n8n with spotify

Plano

Livre 

País

Brasil

Sistema operacional

(Windows 10)

 

Minha pergunta ou problema

Olá a todos, estou usando n8n(dev) para automatização e gostaria de obter os parâmetros ''preview_url'', mas é nulo. Qual é o problema? Por que não tenho o valor? 

Reply
2 Replies

Hey @lliara 

The issue you're facing occurs because the preview_url field is returning null in the Spotify API response. This can happen for several reasons:

  1. Track has no available preview

    • Spotify does not always provide a preview_url for all songs. Some tracks simply do not have this option.
    • Solution: Manually check if the tracks you're trying to fetch have an available preview in the Spotify API.
  2. Regional restrictions

    • Some tracks may have preview_url blocked in certain countries.
    • Solution: Check if your account’s country is allowed to access these previews. Try making API calls using a VPN from a different country to test.
  3. API issues or account permission

    • If the account used for the request has limitations, the API may not return all information.
    • Solution: Ensure that you're using a valid Spotify API key with sufficient permissions.
  4. n8n configuration issue

    • The preview_url might be getting filtered out or not extracted correctly in your n8n workflow.
    • Solution: Confirm that the JSON path ($.json.track.preview_url) is correct and try debugging with a "Set" node to see the raw response values.
  5. Try another audio source

    • If preview_url is always null, an alternative might be looking for another streaming service or using the Spotify API to find alternative audio samples.

Let me know if you need more help! 

 

Cheers,

ribezaz

ribezazSpotify Star
Help others find this answer and click "Accept as Solution".
If you appreciate my answer, maybe give me a Like.
Note: I'm not a Spotify employee.

Hey @ribezaz thank you for your attention! 😃
I managed to get values ​​for each of the tracks. But for that, I used a version of n8n that uses the cloud.

*See the png.
a get preview url.png
Turns out I can't afford n8n cloud, so I need it to work on my local setup.
Is this a factor that impacts and why? What could be the solution to run with n8n locally?

Suggested posts

Let's introduce ourselves!

Hey there you,   Yeah, you! 😁   Welcome - we're glad you joined the Spotify Community!   While you here, let's have a fun game and get…

ModeratorStaff / Moderator/ 4 years ago  in Social & Random