reply all 8 May 2024

44 views
Skip to first unread message

Vishal Sheth

unread,
May 8, 2024, 7:07:27 AMMay 8
to Google Apps Script Community
I would like help with this.

I want to automatically reply all to a specific email from "te...@gmail.com" with subject "test". This should happen and also get saved as it was normally replied by us.

Vishal Sheth

unread,
May 29, 2024, 4:23:05 AMMay 29
to Google Apps Script Community
I used the above code but it's not running when the email arrives. What am I missing here?
With "To" there would be emails in "cc". The script should do reply all so all get the email.

function onMessageReceived(e) {
const message = e.message;
const subject = message.getSubject();
const from = message.getFrom();

if (subject === "test" && from === "*@gmail.com") {
const body = "Hello";
GmailApp.replyAll(message, body);
Reply all
Reply to author
Forward
0 new messages