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.
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
Your phone sends an arrive or leave message to ClickRuntime when you reach or leave a place.
ClickRuntime adds a row to your Attendance sheet with the date, time, place and whether you arrived or left.
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
Build your own
Need it to work differently?
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
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?
Can I log more than one location?
What format is the monthly export?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Save incoming files to Drive and log them in a sheet
Files sent to your trigger link are saved in your Drive 'Inbox' folder and listed in a sheet with name, sender, date and link.
See how it worksCreate PDF invoices from your order form
Each order from your form gets a numbered PDF invoice saved to Drive and a row in your Invoices sheet.
See how it worksCreate a Drive folder for each new hire in your roster
New rows in your Onboarding sheet get their own Drive folder from your template, shared with the new hire, with the link written back.
See how it worksKeep exploring
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.