How encode mp3 link to base64 in n8n?

i download mp3 file in LINE. then, i need using google gemini to text. But, google gomini need base64 data. how encode mp3 url to base64 in n8n?

Information on your n8n setup

  • **n8n version: 1.92.2
  • **Database (default: SQLite): no
  • **n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • **Running n8n via (Docker, npm, n8n cloud, desktop app): npm
  • **Operating system: windows 10

hello @tytom2003

You can do it with a code node. There are two types of base64 there. For using in the url better to grab the bas64url format, it doesn’t have special symbols, which may be broken when used inside the url address

i want convert mp3 to base64. it not convert mp3 url to base64.
it have mp3 url.

for example:
i want convert the mp3 to base64.
" https://ia801605.us.archive.org/25/items/MLKDream/MLKDream_64kb.mp3 "

Thank you.

then you’ll need to download a file and use that node to convert it to base64

i need using http request node to download the mp3?
" https://ia801605.us.archive.org/25/items/MLKDream/MLKDream_64kb.mp3 "

it depends on where you are getting the file from. If from an external url - then yes.

1 Like

Even in a docker container, it can convert a file in base64

i use the http request node to get mp3. Then, it is success converting to base64.

thank you

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.