With Google Chat connected, approvers get each leave request as a card in a direct message with the TimeLeaf Chat app, and can approve or decline it there. Employees can also send commands to the app. Google Chat works on every plan, including Starter.
What you need
- Any plan.
- A TimeLeaf admin account.
- Google Workspace, and a Google Cloud project where you can create a service account and a Chat app.
- Employees' Google email addresses matching their TimeLeaf email addresses.
Set it up
Create a service account
In Google Cloud Console, create a service account in your project and download a JSON key for it.
Turn on the Google Chat API
Enable the Google Chat API for the same project.
Create the Chat app
In the Google Chat API settings, create a Chat app. Leave Build this Chat app as a Google Workspace add-on unticked. Set:
- The HTTP endpoint URL to
https://<your-workspace>.timeleaf.io/api/webhooks/google-chat. The exact address is shown under Setup Instructions in TimeLeaf. - The Authentication Audience to Project Number.
The service account must be in the same Google Cloud project as the Chat app.
Connect it in TimeLeaf
Go to Integrations › Messengers and open the Google Chat tab. Paste the JSON key into Service Account JSON, enter the Google Cloud Project Number (the numeric project number, used to check that requests really come from your Chat app), and click Save Google Chat Configuration.
Each person opens a chat with the app
Ask everyone to open a chat with the TimeLeaf app (or send it any message) once. Until they do, the app has nowhere to send them cards.
What it does
Approvals. When an employee submits a leave request, the approver gets a card in their chat with the app showing the leave type, dates, length and any reason, with Approve and Decline buttons. The decision is recorded in TimeLeaf straight away.
Other messages. Decisions, timesheet approvals, shift assignments, on-call handoffs, overtime opportunities, "still working?" prompts and approval cards for changes an AI assistant proposes also arrive in the chat.
Commands. Employees can send the app commands such as check (balances), request, clockin, clockout, whosout (in a direct message only), schedule, timesheet, pending and team. Some need a plan or add-on: clocking and timesheets need Professional, timebank needs the time bank, and overtime needs the broadcasting add-on.
Troubleshooting
If cards or commands aren't arriving:
- Check the Google Cloud Project Number matches the Chat app's project. TimeLeaf rejects requests it can't verify against it.
- Check the key was accepted: the field shows Service account configured once saved. The service account must be in the same project as the Chat app.
- Check the Chat app's Authentication Audience is Project Number, not the default.
- Ask the person to open a chat with the app, or send it any message, at least once.
- Check their Google email matches their TimeLeaf email.