google-apps-scriptweb-applicationswarningsgoogle-apps-for-education

How to remove Warning "This application was created by another user, not by Google" in Google Apps for Education


We set up a Google Apps Script-based Intranet in our organization, which benefits from Google Apps for Education. We've been using for months:

Everything worked ok up to now.

However today (July 7th. 2017) the HTML pages to be shown to the intranet users include an inconvenient Warning added by Google at the top claiming that This application was created by another user, not by Google., which is really annoying. I understand that this warning must be shown when the Script is created by an unkown users. But in my case, I (the admin) is offering the Script to the users of my organization.

The conclusion in other past threads is that going Google Business or Education everything gets fixed. Unfortunately, it's not true anymore.

Does anybody know how to avoid such warning in Google Apps Script for the users of our domain that run our own coded scripts?


Solution

  • Simply embed the google web app into an iframe on your website. Make sure that your doGet function returns setXframeOptionsMode(HtmlService, XFrameOptionsMode.ALLOWALL)

    Google apps script 'Code.gs'

    function doGet() {
      return HtmlService.createHtmlOutputFromFile('index.html')
        .setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL)
    }
    

    Your website

    <iframe scr="https://GOOGLE_WEB_APP_URL"></iframe>
    

    Resize the iframe with css if needed. More info in this YouTube video. The source code can be found in the video description.