---
title: "Dynamically resizing dialogs in Google Workspace documents using Google Apps Script and google.script.host"
author: "Martin Hawksey"
date: 2022-06-01T10:48:29+00:00
modified: 2022-06-01T10:49:23+00:00
canonical_url: https://pulse.appsscript.info/p/2022/06/dynamically-resizing-dialogs-in-google-workspace-documents-using-google-apps-script-and-google-script-host/
markdown_url: https://pulse.appsscript.info/p/2022/06/dynamically-resizing-dialogs-in-google-workspace-documents-using-google-apps-script-and-google-script-host.md
categories:
  - "Beginner"
  - "Gotchas"
  - "Intermediate"
  - "Solutions"
tags:
  - "@pfelipm"
  - "pablofelip.online"
featured_image: https://pulse.appsscript.info/files/2022/06/poc.gif
description: "A couple of community contributions for custom dialogs have landed in the Pulse inbox recently. The official documentation on Dialogs and Sidebars in Google Workspace Documents is an excellent starting point, but if you prefer learning from video tutorials Chanel Greco has recently published Google Apps Script Alert - Deep Dive on the saperis YouTube channel.  If you'd like to go a little further this post from Pablo Felip details how custom dialogs can be dynamically resized using the methods in google.script.host and client-side JavaScript."
---

# Dynamically resizing dialogs in Google Workspace documents using Google Apps Script and google.script.host

![Dynamically resizing dialogs in Google Workspace documents using Google Apps Script and google.script.host](https://pulse.appsscript.info/files/2022/06/poc.gif)

> [https://pablofelip.online/cuadros-dialogo-dinamicos-gas/](https://pablofelip.online/cuadros-dialogo-dinamicos-gas/)
> In this article, we’ll go over the different ways a GAS script can relate to the user using it, and show an easy way to dynamically resize dialogs built using the Apps Script HTML Service. To achieve this, we will introduce some basic concepts related to the object model of HTML documents and their manipulation using JavaScript. – [Google Translated]

A couple of community contributions for custom dialogs have landed in the Pulse inbox recently. The official documentation on [Dialogs and Sidebars in Google Workspace Documents**](https://developers.google.com/apps-script/guides/dialogs) is an excellent starting point, but if you prefer learning from video tutorials Chanel Greco has recently published [Google Apps Script Alert – Deep Dive**](https://www.youtube.com/watch?v=wxLNPrff_II) on the saperis YouTube channel.

If you’d like to go a little further this post from Pablo Felip details how custom dialogs can be dynamically resized using the methods in [`google.script.host`**](https://developers.google.com/apps-script/guides/html/reference/host) and client-side JavaScript (for non-Spanish speakers you’ll have to [view this post via Google Translate**](https://pablofelip-online.translate.goog/cuadros-dialogo-dinamicos-gas/?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=en-US&_x_tr_pto=wapp)).

Source: *[Cuadros de diálogo de tamaño dinámico en Apps Script*](https://pablofelip.online/cuadros-dialogo-dinamicos-gas/)

---

*Published by [Martin Hawksey](https://pulse.appsscript.info/p/author/admin/) on [Pulse](https://pulse.appsscript.info/). Original article: [https://pulse.appsscript.info/p/2022/06/dynamically-resizing-dialogs-in-google-workspace-documents-using-google-apps-script-and-google-script-host/](https://pulse.appsscript.info/p/2022/06/dynamically-resizing-dialogs-in-google-workspace-documents-using-google-apps-script-and-google-script-host/)*
