function uploadToConfluence() {
  var doc = DocumentApp.getActiveDocument();
  var body = doc.getText();
  var company = doc.getName();
  //Logger.log(typeof body);
  //Logger.log(typeof company)

  var url = 'https://northpass.atlassian.net/wiki/rest/api/content';
  const payload = JSON.stringify({
                  "type": "page",
                  "title": company,
                  "status": "current",
                  "ancestors": [{"id": 2210463745}],
                  "space": {"key": "~350535240"},
                  "body": {"storage": {"value": body, "representation": "storage"}},
              });
  const settings = {
    method: 'post',
    headers: {
      "Accept": "application/json", 
      "X-Atlassian-Token": "no-check", 
      "Content-Type": "application/json",
      "Authorization": "Basic bnJhc211c3NlbkBub3J0aHBhc3MuY29tOkFUQVRUM3hGZkdGMFFaVW9tQzFzM2h2RDRIaXFoX3VzT1ZGQVZMc1QxbjhsdDZnekQ3d2ZMOEQ4eDVuZXIzU0UyNEpENEU1OTB4b1Q5UEtQSWkxRXBwYW54MTJxNUFMek1IS2NlLUtyY0laUlQyM0J2TzhNRFh3eXZiekFPMlI0aEFMYzhaVVRJXzgtT00teDlvX3RqYkNITHhFTUZPcjZRRkRZcHJ3ZEhHWmpBeHB2aVN3WHJDUT0yMThBQzQzOA=="},
    payload: payload
  };
  const sendData = UrlFetchApp.fetch(url, settings);
  var response = sendData.getContentText();
  Logger.log(response);
}