LiveDoc on a website

This guide will walk you through how you can put a custom form on a public or internal website for generating and downloading LiveDocs.
Below are just a few examples of that you can do:

  1. Put a lead gen form on your website and providing the prospect with instantly personalized content
  2. Add a watermark to documents requested from an internal or external site

About

This example, like many examples we provide (or will provide) is hosted on the popular collaboration and hosting platform glitch.com. If you aren't familiar with Glitch, it is a cloud platform co-founded by the people behind Trello and Stack Overflow. Check out some of the links below to learn more.

The Example

The example provided is a "stock ticker" LiveDoc that generates 2 slides: A title slide with the "contact" name on it and a slide with a summary of a given stock and its price history. This is just provided as a simple example so you can try it out and has little to no bearing on you using this example, but if you want to try it out, feel free to go to https://seismic-embedded-livedoc.glitch.me/ and enter a stock ticker such as intc, aapl, msft, etc.. and contact in the inputs and click Generate.

742742

After you click Generate, your browser will download a PPTX file with 2 slides that look similar to below:

19201920 19201920

The Code

The code for this example is available on the glitch.com platform. You can get a remix-able copy of the code at https://glitch.com/edit/#!/seismic-embedded-livedoc.
The README.md in the code walks you through all of the steps to update the code and get it working for your LiveDocs, the basic steps are outlined below:

  1. Update the .env file with your tenant, client_id, client_secret, username, and password. See Authentication Overview for more information on getting set up with a password flow client.
  2. Update ui.js with the libraryContentId and teamsiteId of the LiveDoc you want to have on the webpage
  3. Open your glitch to see the form and generate your LiveDoc

🚧

AdHoc Inputs Only!

The LiveDoc APIs (and this example) only support LiveDocs that only require adHoc inputs. If your LiveDoc requires more complex section selection, it is not a good candidate and should be re-worked to only require adHoc inputs!

Additional Examples

Name

Description

Example

Code

Product Comparison LiveDoc

This builds on this example, but provides a statically configured webpage for a product-comparison LiveDoc

https://livedoc-personalcontent.glitch.me/

https://glitch.com/~livedoc-personalcontent