Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I'm writing a script to automate data entry for google forms using a google sheet.

function auto_data() {

var formURL="";

var wrkBk = SpreadsheetApp.getActiveSpreadsheet();
var wrkSht = wrkBk.getSheetByName("Sheet1");

var stunumber = wrkSht.getRange("A2").getValue();
var firstn = wrkSht.getRange("B2").getValue();
var lastn = wrkSht.getRange("C2").getValue();
var cohort = wrkSht.getRange("D2").getValue();
var teacher = wrkSht.getRange("E2").getValue();

var datamap = {"entry.1349037061":stunumber,

var options = {
"method": "post",
"payload" : datamap

UrlFetchApp.fetch (formURL,options);


when executing the script, I receive this error message:

Exception: Request failed for returned code 405. Truncated server response: <!DOCTYPE html>

Does anyone know how to solve this error? it was working fine last night :(

1 answer

0 votes
Hana Kučerová Community Leader Nov 26, 2020

Hi @methuna thayalan ,

welcome to the Atlassian Community!

Error 405 means "Method Not Allowed" - it is not possible to send POST request to the url provided in the script.

I think you are not using correct url. According to the article, it should probably look like this:

But please be aware I didn't test it.

Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you