Skip to content

Commit 9a22896

Browse files
fix/Update gmail-sentiment-analysis/Samples.gs
Co-authored-by: Vinay Vyas <[email protected]>
1 parent 85dc842 commit 9a22896

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

gmail-sentiment-analysis/Samples.gs

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,58 @@
1+
/*
2+
Copyright 2025 Google LLC
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
/**
218
* Create sample emails
319
*/
20+
function generateSampleEmails() {
21+
// Get active user's email
22+
const userEmail = Session.getActiveUser().getEmail();
23+
24+
// Send emails
25+
GmailApp.sendEmail(
26+
userEmail,
27+
"Thank you for amazing service!",
28+
"Hi, I really enjoyed working with you. Thank you again!",
29+
{
30+
name: 'Customer A',
31+
},
32+
);
33+
34+
GmailApp.sendEmail(
35+
userEmail,
36+
"Request for information",
37+
"Hello, I need more information on your recent product launch. Thank you.",
38+
{
39+
name: 'Customer B',
40+
},
41+
);
42+
43+
GmailApp.sendEmail(
44+
userEmail,
45+
"Complaint!",
46+
"Hello, You are late in delivery, again. Please contact me ASAP before I cancel our subscription.",
47+
{
48+
name: 'Customer C',
49+
},
50+
);
51+
52+
console.log("Sample email generation completed.")
53+
}
54+
* Create sample emails
55+
*/
456
function generateSampleEmails() {
557
// Get active user's email
658
var userEmail = Session.getActiveUser().getEmail();

0 commit comments

Comments
 (0)