Skip to main content
Best answer

Generating an embeddable HTML file

  • December 10, 2021
  • 7 replies
  • 1393 views

The ideal end goal is to take some record data stored in a relational database and use it to modify the HTML structure of a file. Then the html code will be saved as an .HTML file and embedded on another page via iframe. We need the embed link to be reachable via Zapier, as changes occur quite often.

 

I’ve found Google Drive and Dropbox block files from being embedded (displays as just text) and Amazon S3 buckets don’t have an embed link after you upload into them. Does anyone have any advice on where we could send our generated .html files to for embedding?

Best answer by BAMMichaelBest answer by BAMMichael

Solved, spoke with a CS friend and he directed me to add a bucket policy edit to allow all Read-Only access to work without a security token. At this point, the file URL becomes “amazon link” / “filename.extension” and we can fill in the rest from there.

View original
Did this topic help you find an answer to your question?
This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 31050 replies
  • December 10, 2021

Hi @BAMMichael 

Does the HTML have to be saved as a file or can the HTML be saved in a database field?

 

You could use an operational database app such as Airtable.https://zapier.com/apps/airtable/integrations#triggers-and-actions

Airtable has a Long Text field: https://support.airtable.com/hc/en-us/articles/360042311934-Long-text-field

Airtable Long Text fields currently has a limit of 100k characters


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 31050 replies
  • December 10, 2021

@BAMMichael

You can use Dropbox Find File action which has a setting to include file contents.

NOTE: You may have an issue with the Zap if the .html file contents are large in size.

 

 


  • Author
  • Beginner
  • 3 replies
  • December 10, 2021

We use Knack, which unfortunately screens through the html code and removes basically anything that isn’t a text format.

 

Tried Dropbox, it does not support embedding html files. I need the <iframe> to show a file, not the txt contents of it.


  • Author
  • Beginner
  • 3 replies
  • December 10, 2021

If we click the “Open” button on the file in an Amazon S3 Bucket, it does open correctly. Issue is that Zapier doesn’t have any way to obtain this value.


Troy Tessalone
Forum|alt.badge.img+14
  • Zapier Expert
  • 31050 replies
  • December 10, 2021

@BAMMichael 

You may have to explore using the S3 API to retrieve files: https://docs.aws.amazon.com/AmazonS3/latest/API/API_GetObject.html

App APIs can be used in Zaps with the Code app or Webhooks app.

Code: https://zapier.com/apps/code/help

Webhooks: https://zapier.com/apps/webhook/help


  • Author
  • Beginner
  • 3 replies
  • Answer
  • December 13, 2021

Solved, spoke with a CS friend and he directed me to add a bucket policy edit to allow all Read-Only access to work without a security token. At this point, the file URL becomes “amazon link” / “filename.extension” and we can fill in the rest from there.


christina.d
Forum|alt.badge.img+9
  • Zapier Staff
  • 2653 replies
  • December 14, 2021

Thanks for sharing your solution with the rest of the community, @BAMMichael! Glad you were able to get this sorted. 🎉