JavaScript Google Apps Script Not Calling the UrlFetchApp() in the onOpen() function google apps script tutorial,google apps script getrange,google apps

I am trying to make an HTTP POST request when a Google spreadsheet loads.

I have gotten my HTTP POST request working as a function in a menu drop down but I can't get it to work with onOpen or onInstall.

Here is the code:

function onOpen(){
  var url = "http://www.domain.com/collect";
  var options = {
    "method": "post",
    "payload": {
      "v":"1",             
      "data1":"hello", 
      "data2":"5553",   
      "data3":"test"
    }
  }
  Logger.log('worked');
  UrlFetchApp.fetch(url, options);
}

Is it possible to make an HTTP POST request when a spreadsheet loads? If so, do you see anything wrong with my code?

Answer:1

Is it possible to set arbitrary optional parameters in a URL using angularjs and angular-ui-router? I think I know how to extract parameters ($stateParam.parameter), but how can I set them when ...

Is it possible to set arbitrary optional parameters in a URL using angularjs and angular-ui-router? I think I know how to extract parameters ($stateParam.parameter), but how can I set them when ...

I am trying to build a graph using the force layout in D3. I would like to build different looking nodes depending on the data. Currently all nodes have a category and a name. So I draw an svg:g ...

I am trying to build a graph using the force layout in D3. I would like to build different looking nodes depending on the data. Currently all nodes have a category and a name. So I draw an svg:g ...

I just trying to set default allow fullscreen for youtube api but i can't find that and i am new to javascript i tried so any many code but i didn't got.Actually i want to allow multiple youtube ...

I just trying to set default allow fullscreen for youtube api but i can't find that and i am new to javascript i tried so any many code but i didn't got.Actually i want to allow multiple youtube ...

  1. fullscreen youtube network
  2. fullscreen youtube video
  3. fullscreen youtube embed
  4. fullscreen youtube link
  5. fullscreen youtube partnership
  6. fullscreen youtube ipad
  7. fullscreen youtube stutter
  8. fullscreen youtube screen tearing
  9. fullscreen youtube thumbnail
  10. fullscreen youtube video embed
  11. fullscreen youtube taskbar visible
  12. fullscreen youtube video background css
  13. fullscreen youtube videos split diagonally
  14. fullscreen youtube video in powerpoint
  15. fullscreen youtube firefox
  16. fullscreen youtube not working
  17. fullscreen youtube partner
  18. fullscreen youtube video background html
  19. fullscreen youtube lag
  20. fullscreen youtube iframe

I am in my second semester at SCSU and currently taking an introductory course into Computer Science. We are going over the basics of HTML and Javascript. The latest lab I worked on was using a ...

I am in my second semester at SCSU and currently taking an introductory course into Computer Science. We are going over the basics of HTML and Javascript. The latest lab I worked on was using a ...

  1. javascript checking radio button value
  2. javascript checking radio button
  3. javascript checking if radio button is selected