Base64 Encode/Decode Operation
Have you tried encoding or decoding strings using base64 in Directus flows? This extension solves the problem with a simple operation.
Have you tried encoding or decoding strings using base64 in Directus flows only to find atob and Buffer are not defined? This extension solves the problem with a simple operation.
Install this extension via the Directus Marketplace or npm i @timio23/directus-operation-base64 then add the operation to your Flow. Simply add the string or variable to the payload and the response will be encoded or decoded depending on your chosen method.
Usage
- Add a new operation and select Base64 Encode/Decode from the list
- Choose whether to Encode or Decode a string
- Populate the payload
The response will be the result in plain text.
Here is the link on NPM
Conclusion
This extension address a very simple problem and has significant advantages especially when dealing with 3rd party APIs. A great example of this is the Github Content API.
How to post Directus content to a Github repo
Create content in Directus and automatically upload it to Github with Directus Flows.

