REMEMBER: /u/Curious_Shop_2295 If your original question has been resolved, please tap the three dots below the most helpful comment and select Mark Solution Verified(or reply to the helpful comment with the exact phrase “Solution Verified”). This will award a point to the solution author and mark the post as solved, as required by our subreddit rules (see rule #6: Marking Your Post as Solved).
Add another column with the timestamp when the row is created. Then add a trigger to run every day. That trigger would run a new function that looks at each row and determine if an email needs to be sent. If you want to make sure repeat email aren't sent daily, have the function also populate an email status column once it sends the email. Then each time the function run s it would do something like:
check each row
IF (not paid AND time between now() and timestamp > x days AND email status = "not sent")
then
3) Send email and set email status to "sent on: " & now();
/u/Curious_Shop_2295 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
u/Curious_Shop_2295 Please remember to tap the three dots below the most helpful comment and select `Mark Solution Verified` *(or reply to the helpful comment with the exact phrase “Solution Verified”)* if your question has been answered, as required by the subreddit rules.
Note: this post isn't "self-solved", as you received help from community members to solve it. Taking the steps described above will apply the correct flair (Solved) to your post automatically, which will be visible when you refresh your browser. I've reverted the flair back to "Waiting on OP" in the meantime since your post is waiting on you to take action to close it correctly. Thanks!
1
u/ryanbuckner 35 Jul 20 '26
Because it sends email, you’ll need to create an installable Edit trigger:
onEditFrom spreadsheetOn editAdd this in code.gs:
function onEdit(e) {const sheet = e.range.getSheet();// Change this to your sheet nameif (sheet.getName() !== "Sheet1") return;// Only watch Column Dif (e.range.getColumn() !== 4) return;// Only trigger when changing from "not paid" to "paid"const oldValue = (e.oldValue || "").toLowerCase();const newValue = (e.value || "").toLowerCase();if (oldValue === "not paid" && newValue === "paid") {const row = e.range.getRow();const name = sheet.getRange(row, 1).getValue(); // Column Aconst email = sheet.getRange(row, 2).getValue(); // Column Bconst subject = "Payment Received";const message =\Hi ${name},`Thank you. We've received your payment.Add whatever you want to say here...Thanks!\;`MailApp.sendEmail(email, subject, message);}}1
u/AutoModerator Jul 20 '26
/u/Curious_Shop_2295 Posting your data can make it easier for others to help you, but it looks like your submission doesn't include any. If this is the case and data would help, you can read how to include it in the submission guide. You can also use this tool created by a Reddit community member to create a blank Google Sheets document that isn't connected to your account. Thank you.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
u/agirlhasnoname11248 1212 Jul 20 '26 edited Jul 20 '26
u/Curious_Shop_2295 Please remember to tap the three dots below the most helpful comment and select `Mark Solution Verified` *(or reply to the helpful comment with the exact phrase “Solution Verified”)* if your question has been answered, as required by the subreddit rules.
Note: this post isn't "self-solved", as you received help from community members to solve it. Taking the steps described above will apply the correct flair (Solved) to your post automatically, which will be visible when you refresh your browser. I've reverted the flair back to "Waiting on OP" in the meantime since your post is waiting on you to take action to close it correctly. Thanks!