I’m trying to pass an image from a URL to a POST Webhook. The API endpoint will only accept an image payload in Base64. Looking to use Code by Zapier to accomplish the translation, but I’m coming up short. Has anyone managed to devise a similar solution?
Converting an image to Base64
Best answer by ikbelkirasanBest answer by ikbelkirasan
Hi
const response = await fetch(inputData.url);
const content = await response.buffer();
const data = content.toString("base64");
output = [{ data }];
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.