Generate a website from your app

Based upon some messing around with html templates as well as fully understanding the requirements for Start expressions per this topic here:

…I have put together a simple example app that, um… generates a website?

https://www.appsheet.com/samples/app-that-generates-a-relativepath-website-using-the-Report-function...

If you copy and customize the example app above, take note that there are three AppSheet “reports” which you can run manually or schedule. They each output to relative paths underneath the app itself in google drive:
“website”
“website/parents”
“website/parents/pages”

In plain terms, the website is a collection of top-level pages, each which has children and grandchildren pages.

This example has only been tested on Google Drive, I have no idea what will happen if you “copy and customize” into a one drive account! Should work though!

I tried to keep the HTML as well as data model extremely simple so as to allow other folks to expand upon it without having to sift through a bunch of canned html.

Let me know if there are issues copying and using it.

11 31 5,727
31 REPLIES 31

@TyAlevizos
Very alike but though we haven’t been updated it for a very long time, our website is a pure AppSheet app running in an iFrame under a domain forwarding > ABLE3 Website
And if I’m not wrong it’s the first sample of this kind Kudos to our Alien Master @Aleksi

Nice. And yes totally understand the approach there.

This one is more about generating modular html output to insert into a web property, e.g. a knowledge base, an employee directory, etc.

Yeah I got your point and it’s a very neat approach actually. Thanks for sharing it with us.

Hi @TyAlevizos

I appreciate for your further clarification, how the app is built and what sort of use cases in mind etc. Honestly, I m left far behind you!

In essence, the app will run the schedule report, then save the HTML files to Google Drive folder, but those are all in the backend service, I could not find any links to those files throuout your sample app.

I m curious about what is going to happen once the HTML file is strored in Google Drive ? Does it mean the Appsheet will “host” the website based on that HTML? It is kinds of “serverless” website (HTML) hosting service, or something like that?

I m not running the “report” on my copied sample app, so still dont have new folders to save the html, meaning, yet i have the HTML files generated by Appsheet report.

Once the report is run on schedule, we will see (hopefully) the html file in G Drive designated foler. Then how does appsheet app user is going to reach out to those file? Appsheet manually constructed file URL ? If so, is that URL is publically shareable with someone else outside the organization? IF we could, then I interpret this app will be website hosting service kinda app.

Anyway, i m at a loss…

@tsuji_koichi you should not be at a loss, because I did not think that far ahead to a finished solution. Once the html files are generated, you have a folder in google drive called “website”. From there, I did… nothing. There would need to be some type of folder-copy or automation to move the content to a website or external location.

This app/idea was mostly a thought experiment on generating content from Appsheet; plus, I needed to learn the details of our html support.

So you’re not missing anything… I am the one who is missing something

you wrote: “I m not running the “report” on my copied sample app, so still dont have new folders to save the html, meaning, yet i have the HTML files generated by Appsheet report.”

AppSheet may have copied all of the content underneath the app folder, that’s probably why you have sample output already.

Ty

Hi @TyAlevizos

Thank you.
Actually, i have workflow, send html attachment to user. On the email body, placing template variable to construct public url or hyperlink with text.
It will open up the saved HTML file on the archive with www.appsheet.com as main domain. For me, I interpret this we are hosting HTML file on Appsheet server. In that sense, you guys are already pushing service to us to host static html pages.

Thank you.

@tsuji_koichi " It will open up the saved HTML file on the archive with www.appsheet.com as main domain." yes I love that model as well! Do you have a public sample of that? It would be good to provide a sanitized example to the public…

I don’t have shareable App but it should be easy to generate. Bear with me a bit, I will come back with a sample app.

Following this thread keenly. Very interested to see where this goes.

Same

This should not be a “website url”, but just a file link URL to reach to the HTML files saved by Appsheet workflow.

In this sample, push the text, image (for logo on HTML). Then fire the workflow/Actions which will generate and save the HTML file. At the same time, create the dynamic link to HTML file in the form of Appsheet URL.

Once the workflow finish jobs, then we have new row in child table, with URL. Hit the link. Open up the HTML file on the new browser tab.

As far as we are able to “access” to the HTML file from basically anywhere, it could be interpretted as “website” although it is purely just link to HTML file.

I tested if this URL is embedable (if it is public website, it could be embedable), but i frame refused to render those HTML.

I named app as “HTML Site builder”

Not sure if you all can access to the file, but this is html file url created through this demo.

https://www.appsheet.com/template/getappfileurl?appName=HTMLSiteBuilder-473552&fileName=Attachments%...

I wished this URL is “embedable” as we expect new appsheet “iframe view” will come in play… Then pass those URL value to iframe view and render appsheet generated HTML/URL into Appsheet. All built-in with and by Appsheet, that was a dream though.

@Aleksi
@Phil

The questions I raised, in terms of “align HTML output contents vertically centering” is basically coming from here.
It is all the time contents are left aligned, this is not looking good, especially working on appsheet as web app on pc.
Hopeful solutions will be out there!

@Koichi_Tsuji How did you accomplish this? I was unable to find your app exaple  "HTML site builder."

How did you accomplish to capture the html file link into the row?

If you are using Azure blob storage, it is already set up for the hosting of static websites directly from storage. I currently host simple HTML changelog files this way, and link to them within the apps…

Really neat idea. I’m envisioning an automated way to upload these documents entirely within the AppSheet environment now.

Another note is that iFrame support for static websites is on AppSheets roadmap. This paired with iFrames may enable some very dynamic views.

Interesting thoughts!

Yeah I agree., i really looking forward to new iframe view to come and play. Tongs of stuffs we can play with it.

Following

@Martin_Pace this is absolutely fascinating…

@tsuji_koichi that’s awesome. Maybe this could be used to print AppSheet content? This was asked many times. With the Workflow “Save File” we can generate PDF, save it to Google Drive and then open it via an Action Button. But this takes about 30 seconds.
Your HTML solution seems to be much faster.

Yes, I believe you are on the right track. No quantitive measures, but generating HTML should be faster than generating PDF. Actually I feel super quick.
We usually send Email with attachment so that the we deliver “print” to the app user. They need to go back and forth between App and Outlook etc.
Just showing new row with hyperlink to “printed” verson of the data, not limited to HTML, but PDF, or even Excel file, this solutions work good.

I m putthing this arrangement to some of the app to keep tracking records (logs) for all the files generated by the workflows.

following

Hey @tsuji_koichi !
Seems like this great trick is now broken:

I guess we could ask them to add .html

Not exacty sure if this is broken or not. AppSheet team may have decided to download HTML file rather than preview it.
In my opinion, HTML should be previewed rather than downloading the html. As logicaly, when the user download the HTML file, then hit the file and open with browser. This is bit awkward to me. Should be displayed (previewed) straight away.

@David_Pond

I agree more now that I’ve been playing with HTML…
I really wish it would open directly…

Thanks for reaching out @tsuji_koichi and thank you @SkrOYC and @Grant_Stead for your comments. We discussed your suggestion as a team and unfortunately it looks like previewing HTML files directly could expose a security vulnerability in AppSheet. I realize this makes things more clunky and I do apologize for the impact to you all here.

No way we would be able to open it externally in like a browser?

I can think of some ways to do that…

Spill the beans!
Lol

As one example congruent to your current setup: generate the .html in AppSheet, post them to an S3 bucket configured to serve html.

Top Labels in this Space