0

I have an apps script that lets the user upgrade their account. Once they are done paying, I close the modal and send data to the .gs file. How do I pass data from the .gs file (or from the modal dialog) to tell the sidebar that the user upgraded their account? I have in my .gs file:

function upgradeUser(data){
  // do stuff then pass it on to my sidebar....
  return response.getResponseCode();
}

I am aware I can pass data to the sidebar in 2 ways:

  1. When the template is created.
  2. The sidebar sends a request to the .gs file.

Is there another way?

  • Can I ask you about your question? 1. You want to send a value from a dialog to sidebar. Is my understanding correct? 2. About your goal of `pass data to the sidebar`, I cannot understand about `The sidebar sends a request to the .gs file.`. Can I ask you about the detail of it? 3. I thought that the template HTML was suitable for your situation. But in your question, you want to select the method without using the template HTML. Is my understanding correct? – Tanaike Apr 01 '20 at 02:40
  • Does this answer your question? [How to show/hide loading spinner in addon sidebar while Google Picker dialog is opened/closed?](https://stackoverflow.com/questions/58179202/how-to-show-hide-loading-spinner-in-addon-sidebar-while-google-picker-dialog-is) – TheMaster Apr 01 '20 at 02:46

0 Answers0