Get your API key

Lesson 4 of 6

Google Sheets and Apps Script automations

Ask AI to write a script that emails you a daily summary from your sheet.

8 min Log in to open
One step at a time, like flipping pages.

By the end of this lesson your Google Sheet will email you a sales summary every evening, using a script the AI wrote and you tested.

You need: a Google account, a Google Sheet with daily entries and any AI chat (for example the Playground) · Time: 8 minutes

  1. Apps Script is a small programming tool built into Google Sheets. A script is a list of instructions, like "read the Sales tab, add up today's amounts, send an email". It runs on Google's servers, so it works even when your laptop is off. It is free with a Google account.

    We'll use a sheet with a tab named exactly Sales, headers in row 1:

    Date Branch Item Qty Amount
    18-11-2026 Pune Rice 25 kg 2 2600
    18-11-2026 Nashik Sugar 5 kg 6 1320
    19-11-2026 Pune Tea 1 kg 3 1500

    Make sure the Date column holds real dates (Format → Number → Date), not text.

    Why?

    A script can only be as good as its description of your sheet. A fixed tab name and clear headers mean the AI can write code that fits on the first try.

Log in free to read the rest of this lesson

Every lesson is free. A free account unlocks all of them and saves your progress.

Still to come in this lesson:

  1. Ask the AI for the script
  2. Paste and save the script
  3. Run it once and authorize it
  4. Test with your own email first
  5. Add a daily trigger
  6. Recap