Help

How do run scripting app whenever a new record is created?

Topic Labels: Scripting extentions
Solved
Jump to Solution
3839 10
cancel
Showing results for 
Search instead for 
Did you mean: 
Rohith_S
6 - Interface Innovator
6 - Interface Innovator

Hello,

So, I need to convert attachment file URL to base64 string, as btoa() function does not work in automation script, I am running a scripting app that converts URL to Base64 string and the output of the scripting app will be entered into a new column I created as “base64 string” and using this value in the automation script.

My question is how do I run scripting app every time a record is created?

Or even better is there any way to convert attachment URL to base64 in the automation script?

10 Replies 10

If you have an image in base64 format and want it to be an attachment in Airtable, you can use an conversion service (like CloudConvert) to convert the raw text into an image file, and then upload the image file into an attachment field.

But it sounds like this is not what the OP wants to do.

It sounds like the OP’s customer will be uploading photos to an attachment field. Scripting app always needs to be run manually, so this won’t work unless you are okay with having a big delay until someone can push that button. Also, the base64 version of an image is likely too large to fit in a long text field. You would have to generate a text file with the base64 info at a public url, and then move that file to a different attachment field. That’s too complicated.

Interestingly enough, the code int the Web Dev link that Bill shared actually works in Scripting app, although the editor complains that it doesn’t know what a FileReader is. On the other hand, the exact same code doesn’t work in an automaton script. You can create the FileReader, but FileReader.readAsDataUrl is not supported.

This sounds like the best option.