Help

Re: Is it possible to create a new attachment HTML file from a script automation?

Solved
Jump to Solution
1916 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Jacque_Boltik
5 - Automation Enthusiast
5 - Automation Enthusiast

I have a script that generates the complete contents of an HTML file. I’d like to output this HTML file as an attachment in a field.

Is it necessary to call off to an outside service in order to create an attachment with that HTML content?

I don’t need the URL of the attachment to persist very long. The usecase is I need a non-technical person to be able to download the HTML file after it is generated with variables that person has just specified.

I have a version of this working using GCP, but I’m wondering… can be done entirely within Airtable?

1 Solution

Accepted Solutions
kuovonne
18 - Pluto
18 - Pluto

Yes. The only way to create an attachment without human interaction requires the file to be available at a public url. The only way to get script-generated content to a public url is with a third party service.

See Solution in Thread

5 Replies 5
kuovonne
18 - Pluto
18 - Pluto

Yes. The only way to create an attachment without human interaction requires the file to be available at a public url. The only way to get script-generated content to a public url is with a third party service.

Thank you for your reply. I spent too long thinking perhaps I could find a work around… Other responses of yours on this forum have been helpful as well, much appreciated! :rocket:

How would you recommended outputting the returned value of an automated script into a text field? So the text field will have the contents of the full string generated by the script. N

I’m using regex in the HTML content so it’s treated as a string / text field.

Thank you!

If the text is less than 100,000 characters, you can just write it to a long text field.

If the text is longer, it won’t fit in a single text field.

Also note that if your users copy the text when selecting the field as a whole, they may end up with extra quote marks in the text. In order to be sure that the text field doesn’t have these extra quotes they need to expand the long text field, select the text inside the long text field and then copy.

Ah it’s longer than 100,000 characters…. Thank you for the saved frustration!

The version I have working hosts urls on Google and has a Vercel front end where people can download a html file and see a preview on the web prior. Since it’s not hard to build that functionality outside of Airtable, I’ve been getting increasingly frustrated trying to make it work 100% Airtable. Now I know it’s not possible for the two reasons they have been tripping me up:

  1. I can’t populate a field in Airtable without an external to Airtable public hosted url for the attachment

  2. there’s a file size limit of 100,000 and no simple batch and concat in a script workaround

Thank you for taking the time to clarify.