Thank you for your continuous support.
Now, I was writing a form script.
Previously, the contents of the form were sent to the email without any problems in the script below, but an error occurred.
The error is as follows:
Undefined method ggetItemResponses を cannot be invoked.
The source code is as follows:
function submitForm(e){
varitemResponses=e.response.getItemResponses();
var message=';
for (vari=0;i<itemResponses.length;i++) {
variableResponse=itemResponses[i];
varquestion=itemResponse.getItem().getTitle();
var answer = itemResponse.getResponse();
message+=(i+1).toString()+'.'+question+':'+answer+'\n';
}
var address='[email protected]';
var title='[Request accepted]';
var content='Your request has been received with the following information:\n\n'+message;
GmailApp.sendEmail(address, title, content);
}
The trigger was successfully configured.What is wrong with the source code?
The trigger error rate is 100%.
If you search in the error message that appears, you will find several articles about similar symptoms.
The workaround is to delete and reconfigure the trigger.
Also, when you reconfigure it, you will see a dialog about adding permissions, so please re-approve it.
Note:
Google Apps Script cannot invoke the method "getItemResponses". When appears -Qiita
Talk about Google form auto-submission scripts that suddenly require approval
It seems to be a Scope problem.Re-attach the trigger by adding the following in the comment.
//FormApp.getActiveForm()
For more information, please refer to the answers.
When I set the trigger on the new trigger settings screen of the Google form script, the event did not cross well.Is the previous script no longer available?
(Handy matsu is referring to it, but the URL is too long to open, so I will reprint it.)
It's not the answer, but I'm stuck with the same phenomenon (although I'm a beginner) (I think I'm trying to do the same thing because the scripts are almost the same),
「// Add FormApp.getActiveForm()
I also did "Delete, recreate, authorize"
I tried both Form to Script, spreadsheet to Script, and
Failed to execute due to an error...
This questioner, if it has been solved, I am writing to ask you how to do it.
618 Uncaught (inpromise) Error on Electron: An object could not be cloned
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
613 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2024 OneMinuteCode. All rights reserved.