Ask Steves · Daily notes · VPS, 20% off · AI Profit Lab · SEO · Money Hub

7 November 2026 · Practical AI builds

How do I get a daily summary email of what happened on my website?

By the end of this you will get one short email each morning with yesterday's visitors, enquiries and errors on your website. You will not need to open three dashboards to find out. It suits small business owners and freelancers who run a site on their own server, or who have someone who can put a small script on it for them.

I learn my automation tips in the AI Profit Boardroom. Have a look here. Affiliate link.

What you need

Step by step

  1. Decide what goes in the email. Keep it short: rough visitor count, number of enquiries, number of server errors and perhaps the top three pages. Anything more and you will stop reading it.
  2. Find your access log. On nginx it is usually /var/log/nginx/access.log, and yesterday's entries are often split between that file and access.log.1 because the log is rotated each day.
  3. Work out how an enquiry shows up. If your contact form sends to an address like /contact, every enquiry appears in the log as a POST to that address. If enquiries already land in a spreadsheet, you can count yesterday's rows there.
  4. Write a small script that counts each item for yesterday's date and sends the result. A starting point is below. Change the form address and email address to your own.
  5. Run the script by hand once and check the email arrives and the numbers look sensible.
  6. Schedule it to run each morning with cron, for example at 7am.
  7. If you want, add an AI step that turns the numbers into a sentence or two, such as "A quiet day, two enquiries, no errors." Give it only the counts, not the raw log.
#!/bin/bash
# daily-summary.sh for example.com
DAY=$(date -d yesterday +%d/%b/%Y)
LINES=$(cat /var/log/nginx/access.log.1 /var/log/nginx/access.log | grep "$DAY")

VISITORS=$(echo "$LINES" | grep -vi bot | awk '{print $1}' | sort -u | wc -l)
ENQUIRIES=$(echo "$LINES" | grep -c '"POST /contact')
ERRORS=$(echo "$LINES" | awk '$9 ~ /^5/' | wc -l)
TOP=$(echo "$LINES" | awk '{print $7}' | sort | uniq -c | sort -rn | head -3)

printf "Yesterday on example.com\n\nVisitors (rough): %s\nEnquiries: %s\nServer errors: %s\n\nTop pages:\n%s\n" \
  "$VISITORS" "$ENQUIRIES" "$ERRORS" "$TOP" \
  | mail -s "Daily summary: example.com" you@example.com

# crontab line (crontab -e):
# 0 7 * * * /home/user/daily-summary.sh

The script counts unique IP addresses as a rough visitor figure and skips anything that calls itself a bot. It counts lines with a status code starting with 5 as server errors. It assumes the standard nginx log format, where the status code is the ninth field. The mail command needs a mail tool installed and set up, which is the step people most often skip.

What good looks like

An email arrives at about the same time every morning, takes under a minute to read, and the numbers roughly match what you see elsewhere. For example, the enquiry count matches the enquiries in your inbox, and errors are zero on a normal day. When something does go wrong, such as a run of server errors or no enquiries for a week, you notice it from the email without having to go looking.

Watch out for

Log-based visitor counts are rough. Several people behind one office connection look like one visitor, and plenty of bots do not admit to being bots. So use the figure to spot trends, not as an exact total, and expect it to differ from tools such as Google Analytics. If you add an AI summary, let the script work out the numbers and have the AI only put them into words, because a model can misread or invent figures. Keep the raw numbers in the email so you can check them. Finally, logs hold IP addresses, which count as personal data, so do not send raw log lines to an outside AI service or forward them on. Keep them only as long as you need them.

This email tells you what happened yesterday. It does not warn you the moment the site goes down. For that, pair it with an uptime check, as covered in how to set up an alert when your website goes down.

Questions people ask

Can I do this if my site is on shared hosting or a website builder?

Often not with this script, because you may not be able to read the logs or run cron jobs. Many builders and analytics tools have their own scheduled email report, so check the settings there first.

Can I include enquiries from a spreadsheet instead of the log?

Yes. If your form already files enquiries into a sheet, as in filing form enquiries into a spreadsheet automatically, the script can count yesterday's rows from an export of that sheet instead.

Put simply, a small script reads yesterday's log, counts what matters, and emails it to you each morning. It is a light, reliable way to keep an eye on a website without checking dashboards.

Want more automation tips? The AI Profit Boardroom on Skool is where I get mine. Have a look here. Affiliate link.

Related AI builds: How do I file form enquiries into a spreadsheet automatically? · How do I connect a website form to an AI that drafts the first reply? · How do I draft replies to common customer emails with AI? · All daily notes