Skip to content

The moment it happens

Log your arrival and departure times automatically

Your phone records each time you arrive at or leave work in a Google Sheet, and last month's log is saved to Drive on the 1st.

Runs
The moment it happens
Apps
Google Drive, Google Sheets
AI
Not needed
Access
Sheets read+write; Drive write

Send this to your assistant

Create a ClickRuntime automation: when my phone shortcut posts arrive/leave to the trigger link, log the time in my Attendance sheet; on the 1st export last month to Drive.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

A contractor is paid by the hour and works on a client's site. At the end of each month he has to send a timesheet, and reconstructing which days he arrived early or stayed late from memory is guesswork that leaves money on the table or invites questions.

This automation lets his phone keep the record. A location shortcut logs every arrival and departure in a sheet, and at the start of each month a copy of the previous month is filed in Drive, ready to send.

What you get out of it

  • Accurate hours without effort

    Times are recorded the moment you arrive and leave, so the log reflects what actually happened.

  • Timesheets ready on the 1st

    A copy of last month's log is saved to Drive automatically, ready to attach to an invoice or send to a manager.

  • A record you control

    The data sits in your own Google Sheet, not in a time-tracking app you might stop paying for.

  • Settles disputes

    If hours are ever questioned, you have a timestamped entry for every day on site.

How it works

What happens, step by step

  1. Your phone sends an arrive or leave message to ClickRuntime when you reach or leave a place.

  2. ClickRuntime adds a row to your Attendance sheet with the date, time, place and whether you arrived or left.

  3. On the 1st of each month it also saves a copy of the previous month's sheet to your Drive folder.

Before it runs live

  • Connect Google Drive
  • Connect your Google Sheets account and pick the spreadsheets it may use
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Log your arrival and departure times automaticallyjust nowSucceeded
Google Sheets · Attendance2026-11-03 | 08:12 | Acme site office | arrive

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Google Drive and Google Sheets steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
attendance_log_from_location_check_ins.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from datetime import datetime, timezone
from googleapiclient.http import MediaInMemoryUpload
from clickruntime import on_event, credentials, state

SHEET_ID, FOLDER_ID = "your-spreadsheet-id", "your-timesheets-folder-id"

@on_event
def handle(event):
    p = event.json or {}
    now = datetime.now(timezone.utc)
    creds = Credentials(credentials.connection("google", "work"))
    build("sheets", "v4", credentials=creds, cache_discovery=False).spreadsheets().values().append(
        spreadsheetId=SHEET_ID, range="Attendance!A:D", valueInputOption="USER_ENTERED",
        body={"values": [[now.strftime("%Y-%m-%d"), now.strftime("%H:%M"), p.get("place", ""), p.get("action", "")]]}).execute()
    if now.day == 1 and state.get("exported") != now.strftime("%Y-%m"):
        drive = build("drive", "v3", credentials=creds, cache_discovery=False)
        pdf = drive.files().export(fileId=SHEET_ID, mimeType="application/pdf").execute()
        drive.files().create(body={"name": f"Attendance {now:%Y-%m} (previous month).pdf", "parents": [FOLDER_ID]},
                             media_body=MediaInMemoryUpload(pdf, "application/pdf")).execute()
        state.set("exported", now.strftime("%Y-%m"))
    return {"logged": p.get("action")}

FAQ

Common questions

How does my phone know when I arrive?
A location automation on your phone, such as an iPhone Shortcut or an Android automation app, sends a message to your trigger link when you enter or leave a place.
Can I log more than one location?
Yes. The shortcut can send the place name along with arrive or leave, and it is recorded in its own column.
What format is the monthly export?
A PDF of last month's rows, named with the month, saved in the Drive folder you choose.
What permissions does it need?
Sheets read+write; Drive write. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Log your arrival and departure times automatically” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.