title: Google app script and javascript query to an internal api
body: <p>I have an issue with google script and html services :
  Can you help me ?</p>
  
  <p>I want to create a function on Google sheet to query data to an internal API. I saw that it's possible to query my data with js. But i don't succeed to create a function that can return the result on a google sheet cell.</p>
  
  <p>My optimal way will be :
  - having a function on Gsheet (i.e. =getvalue("name"))</p>
  
  <ul>
  <li>then this function open an Html files with "name" in parameter (for example in the title)</li>
  <li>then a javascript function query the internal API and <strong>return the value to the first function in Gscript</strong>.</li>
  <li>then the value is return by the gscript to the gsheet. Like that i can keep my formula in my cell and i have the value that can be refresh. </li>
  </ul>
  
  <p>Is there a way to return my value from JS to Gscript in the same function ? </p>
  
  <p>Thank you for your help, </p>
  
  <p>Please tell me if you need more information.</p>