0
0
Google Sheetsspreadsheet~10 mins

Sending emails from Sheets in Google Sheets - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the email address from cell A2.

Google Sheets
var email = sheet.getRange([1]).getValue();
Drag options to blanks, or click blank then click option'
A"A2"
B"B2"
C"A1"
D"C2"
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong cell address like B2 or A1.
Not putting quotes around the cell address.
2fill in blank
medium

Complete the code to send an email with subject "Hello".

Google Sheets
MailApp.sendEmail([1], "Hello", "This is a test email.");
Drag options to blanks, or click blank then click option'
Asubject
Bemail
Cmessage
Drecipient
Attempts:
3 left
💡 Hint
Common Mistakes
Using the subject or message variable instead of the email address.
Using a wrong variable name.
3fill in blank
hard

Fix the error in this code to get the message from cell B2.

Google Sheets
var message = sheet.getRange([1]).getValue();
Drag options to blanks, or click blank then click option'
A"B2"
BB2
C2B
DB22
Attempts:
3 left
💡 Hint
Common Mistakes
Writing B2 without quotes causes an error.
Swapping the column and row like 2B is invalid.
4fill in blank
hard

Fill both blanks to create a dictionary with email as key and message as value.

Google Sheets
var data = { [1]: [2] };
Drag options to blanks, or click blank then click option'
Aemail
Bmessage
C"email"
D"message"
Attempts:
3 left
💡 Hint
Common Mistakes
Putting quotes around variable names makes them strings, not variables.
Swapping key and value positions.
5fill in blank
hard

Fill all three blanks to send an email with subject and message from the sheet.

Google Sheets
MailApp.sendEmail([1], [2], [3]);
Drag options to blanks, or click blank then click option'
Aemail
B"Test Subject"
Cmessage
D"Hello"
Attempts:
3 left
💡 Hint
Common Mistakes
Using variables without quotes for the subject.
Swapping the order of arguments.