How to generate audio files using Zapier automation?

Hey everyone! I’m stuck on a Zapier automation project. I want to create an MP3 file or an HTML file with an audio tag from base64 data. The goal is to store it on Google Drive.

I’ve tried:

  1. Using Google Drive action to make a text file
  2. Calling Google API to change mime type (but it needs a new upload)
  3. Using the Zapier code module (facing import issues)
  4. Exploring other Zapier apps for workarounds

My plan is to type something in Slack, send it to Google’s TTS API, receive the base64 response, and then convert it into a shareable file that can be posted back in Slack. I’m really out of ideas and would appreciate any suggestions on how to tackle this. Thanks for your help!

have u tried using webhooks? u could set up a simple server that handles the audio conversion and file creation. zapier can send the text to ur server via webhook, then ur server does the heavy lifting and sends the file url back. this way u bypass zapiers limitations. might be worth a shot!

I’ve actually tackled a similar project using Zapier, and I can share what worked for me. Instead of trying to handle the audio conversion within Zapier itself, I found it more effective to use a combination of Zapier and an external service.

Here’s what I did:

I used Zapier to send the text to a cloud function (AWS Lambda in my case, but Google Cloud Functions would work too). This function handled the text-to-speech conversion and file creation. Then, I had the function upload the file directly to Google Drive and return the file ID.

Zapier then picked up this file ID and used it to construct a sharing link, which I could post back to Slack.

This approach bypasses Zapier’s limitations with file handling and gives you more control over the conversion process. It does require some coding knowledge, but it’s much more reliable than trying to force Zapier to handle audio files directly.

Hope this helps give you a new direction to explore!

Have you considered using Integromat (now Make) instead of Zapier for this task? I recently switched to it for a similar audio processing workflow and found it much more capable.

Integromat has built-in modules for handling base64 data and creating files directly. You could use their HTTP module to call Google’s TTS API, then use the ‘Create a file’ Google Drive module to save the audio. It even lets you specify the MIME type.

For sharing, you can use Integromat’s Google Drive ‘Get a shareable link’ module. Then just post that link back to Slack.

This approach requires no custom code and is more straightforward than wrestling with Zapier’s limitations. Might be worth exploring if you’re open to trying a different automation platform.