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?appGuidString=0c5446f7-b032-48e4-9936-869688877152

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! :slight_smile: 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.

6 Likes

@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 :hugs: Kudos to our Alien Master @Aleksi

3 Likes

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.

3 Likes

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…

3 Likes

@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 :slight_smile:

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

2 Likes

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.

5 Likes

Interesting thoughts! :thinking:

1 Like

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

1 Like

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.

4 Likes

@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.

1 Like

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

3 Likes

Same

Following

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”

2 Likes

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%2FChangeReport12.html

2 Likes

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.

2 Likes

@Martin_Pace this is absolutely fascinating…

@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!

2 Likes