Hey everyone! I’m stuck on a Zapier automation project. I want to create MP3 files or HTML files with audio tags from base64 data. The goal is to store these on Google Drive.
I’ve tried:
- Using Google Drive actions to make text files
- Changing MIME types through Google API (no luck due to restrictions)
- Using Zapier’s code module (import limitations)
- Exploring other Zapier apps for workarounds
The big picture: I’m aiming to set up a workflow where I type in Slack, it goes to Google’s TTS API, and then I get a link to the audio file back in the Slack channel.
Anyone have ideas on how to make this work? I feel like I’m missing something simple. Thanks for any help you can offer!
I’ve actually tackled a similar project recently and can share what worked for me. Instead of creating the audio files directly in Zapier, I used a cloud storage service API as an intermediary step.
I began by setting up a webhook in Zapier to receive the base64 data. Then I used Zapier’s Code action to decode the base64 content and prepare it for upload. After that, I uploaded the file via the Dropbox API (or a similar service like Box or AWS S3) and created a Zap to move the file from Dropbox to Google Drive.
This approach bypassed the limitations I encountered with direct file creation in Google Drive. Although it is a bit more complex, it proved to be reliable and scalable. I hope this method helps guide you through your project.
Having worked on similar automation projects, I can suggest an alternative approach that might solve your issue. Consider using a serverless function service like AWS Lambda or Google Cloud Functions as an intermediary step.
You can set up a Zap that sends the base64 data to the serverless function. The function can then decode the base64, create the audio file, and upload it directly to Google Drive using their API. This method bypasses Zapier’s limitations while still maintaining a streamlined workflow.
For the Slack integration, you can have Zapier listen for specific messages, trigger the serverless function, and then post the resulting Google Drive link back to Slack. This approach offers more flexibility and processing power than trying to do everything within Zapier itself.
It might require a bit more setup initially, but it should provide a robust solution for your audio file generation and storage needs.
have u considered using a cloud storage API like S3 or Azure Blob? they’re pretty flexible for handling binary data. u could send the base64 there first, then use their APIs to convert and store as MP3. might be easier than trying to do everything in zapier.