Hi, I met n8n a few days ago and I’m so happy about it. Fantastic solution.
I would like to convert a text to base64, like the example below: 140ff034-412e-3411-a366-6f11hk61976f:734eb138-8bb4-323c-ddbc-89d95faf401a. I tried to use crypto node, but it doesn’t work, I believe it is due to use md5. Is there any other way to do this?
Hi @Lucas, welcome to the community! Hope you’re well?
As you have noticed, the Crypto node would not cover just de- or encoding base64.
So you would need to convert a string using either JavaScript snippet (e.g. through the Set or Function Item node) or using any binary on your server via the Execute Command node. A JavaScript-based workflow could look like so (you can just copy the below JSON code right into your n8n canvas to see the workflow):
This sets a clear text message in the Set node and then converts it to base64 in the Function Item node.