0
0
Google Sheetsspreadsheet~20 mins

Sending emails from Sheets in Google Sheets - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Email Sender Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
📊 Formula Result
intermediate
2:00remaining
What is the output of this formula for sending emails?
Given the formula =IF(A2="", "No email", IF(ISERROR(SEARCH("@", A2)), "Invalid email", "Ready to send")) in cell B2, what will be the output if A2 contains userexample.com?
A"Ready to send"
B"No email"
C"Invalid email"
DAn error message
Attempts:
2 left
💡 Hint
Check if the email contains the '@' symbol.
Function Choice
intermediate
2:00remaining
Which function sends emails from Google Sheets?
You want to send an email automatically from a Google Sheets script. Which function should you use?
AMailApp.sendEmail()
BSpreadsheetApp.sendEmail()
CGmailApp.sendMail()
DEmailApp.send()
Attempts:
2 left
💡 Hint
Look for the official Google Apps Script service for sending emails.
🎯 Scenario
advanced
3:00remaining
You want to send personalized emails to a list in Sheets. Which approach is best?
You have a sheet with columns: Name, Email, and Score. You want to send each person an email with their name and score. What is the best way to do this?
AManually send emails one by one using the Gmail interface.
BUse the =EMAIL() formula in Sheets to send emails automatically.
CUse a formula in Sheets to create email text and copy-paste it into your email client.
DWrite a Google Apps Script that loops through rows and uses MailApp.sendEmail() with personalized messages.
Attempts:
2 left
💡 Hint
Think about automation and personalization using scripts.
📊 Formula Result
advanced
2:00remaining
What error occurs with this script snippet?
Consider this Google Apps Script code snippet: function sendEmails() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Data'); var email = sheet.getRange('B2').getValue(); MailApp.sendEmail(email, 'Hello', 'Test message'); } What error will occur if cell B2 is empty?
ATypeError: Cannot send email to an empty address
BNo error, email sent to blank address
CReferenceError: sheet is undefined
DSyntaxError in the script
Attempts:
2 left
💡 Hint
Think about what happens if the email address is empty.
data_analysis
expert
3:00remaining
How many emails will be sent by this script?
A sheet named 'Contacts' has 5 rows of data starting from row 2. Column A has names, column B has emails. The script below runs: function sendBatchEmails() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Contacts'); var data = sheet.getRange(2, 1, 5, 2).getValues(); for (var i = 0; i < data.length; i++) { if (data[i][1].indexOf('@') > -1) { MailApp.sendEmail(data[i][1], 'Hi ' + data[i][0], 'Your info'); } } } If 2 emails in column B are empty strings and 1 email is missing '@', how many emails will be sent?
A0
B2
C5
D3
Attempts:
2 left
💡 Hint
Count only rows where the email contains '@'.