Automation

Set CS agents to Away on their day off, automatically

Put days off in Google Calendar and let n8n set that admin to Away every morning, so no WhatsApp chat goes to someone who isn’t working. A ready-made template, no coding.

iLiBuat.Link Team7 min read

Key takeaways

  • Every morning at 6:00 the template reads today’s events in your team’s Google Calendar. An event titled “Off: Dewi” sets Dewi to Away, and everyone else to Available.
  • Sales Router skips agents who are Away, so customers aren’t routed to someone on their day off.
  • You need Pro or higher, n8n, a Google Calendar, an API key with Read & write permission and your team id. The template is 02-agent-shift-from-calendar.json.
  • It resets everyone not in the calendar to Available each morning, so the calendar has to be the one place where days off live.
On this page6
  1. 1. What the automation does
  2. 2. What you need
  3. 3. Set it up step by step
  4. 4. What you’ll see
  5. 5. Make it yours
  6. 6. Honest limits

Dewi is off on Friday. She swapped shifts with Ayu earlier in the week, and Bu Sari said “okay” in the group chat. Then Friday comes, Bu Sari is busy with a supplier, and Dewi’s status in Sales Router is still Available.

So Sales Router keeps doing its job: every third chat goes to Dewi. Those customers say hello, ask about a size, and wait. Dewi’s phone is in her bag at a family wedding. By the afternoon, a few of them have bought from another shop.

Working hours handle the daily rhythm, like closing at 9 pm. What slips through are the days off that change from week to week: shift swaps, leave, a sick day. Someone has to remember to flip a switch, and on a busy morning nobody does.

Team calendar · Friday

Off: Dewi
RRinaAvailable
DDewiAway
AAyuAvailable
One calendar event, “Off: Dewi”. At 6:00 Dewi is set to Away, and Rina and Ayu share the day’s chats.

What the automation does

This workflow doesn’t wait for a bell from iBuat.Link. It runs on a clock. (New to n8n? The overview of all 8 workflows explains the “robot that follows rules” idea.) Every morning at 6:00 the robot:

  1. 1Asks iBuat.Link for the list of agents in your Sales Team.
  2. 2Reads today’s events in your team’s Google Calendar.
  3. 3Looks for events titled Off: Name, Libur: Name or Cuti: Name.
  4. 4Sets each agent named in one of those events to Away, and every other active agent to Available.
Today’s calendarAgentStatus after 6:00
Off: DewiDewiAway
(nothing)RinaAvailable
(nothing)AyuAvailable
Example: Friday morning

Sales Router only sends chats to agents who are Available and within their working hours, so from 6:00 on Friday, Dewi gets nothing and her share goes to Rina and Ayu. On Saturday there’s no “Off: Dewi” event, so the robot sets her back to Available.

What you need

WhatDetails
iBuat.Link planPro, Business or Agency. The API starts on Pro.
API keyCreated in Developer with the Read & write permission, because the workflow changes agents’ status.
Team idOpen the team under Sales Teams. The id is the long code in the address bar.
Google CalendarA calendar for days off. A shared team calendar works best, so admins can add their own.
n8nn8n Cloud or self-hosted, with the Schedule, HTTP Request, Code and Google Calendar nodes.

Set it up step by step

  1. 1

    Make the days-off calendar

    In Google Calendar, create a calendar for the team (or use one you have). For each day off, add an all-day event titled “Off: Dewi”. The name after the colon must match the agent’s name in iBuat.Link. Capital letters don’t matter, spelling does. For a fixed weekly day off, make it a repeating event.

  2. 2

    Create an API key

    In the dashboard open Developer and create a key with the Read & write permission. You’ll be asked for your account password. Copy the key and keep it private.

  3. 3

    Download the template

    Go to Integrations → Automate with n8n and click Download template on the “Agent day off → Away” card. You get 02-agent-shift-from-calendar.json. This workflow uses no webhook, so there’s no + Webhook button on its card.

  4. 4

    Import it into n8n

    Open a new workflow, open the “…” menu and choose Import from File. Read the yellow “Setup (read me)” note.

  5. 5

    Add the API key credential

    Create a Header Auth credential named “iBuat.Link API key”, with Name Authorization and Value Bearer YOUR_API_KEY. Select it in both HTTP Request nodes: “Get the team’s agents” and “Set each agent’s status”.

  6. 6

    Fill in your team id

    In “Get the team’s agents”, replace YOUR_TEAM_ID in the address with the id you copied from the address bar.

  7. 7

    Connect the calendar

    In “Today’s calendar events”, connect your Google account and replace YOUR_TEAM_CALENDAR_ID with your calendar’s id. Google Calendar shows it in the calendar’s settings, under the section about integrating the calendar.

  8. 8

    Check the time, run once, activate

    The schedule uses the time zone set in n8n, so check that it matches your own. Run the workflow once by hand to see the statuses change on the Sales Team page, then activate it.

What you’ll see

Open the Sales Team page after 6:00 and Dewi shows as Away, while Rina and Ayu are Available. New chats are shared between the two of them. Nothing changes for customers: they tap the same link and reach someone who is working.

Dewi can still change her own status from her agent page if her plans change, for example if she decides to work after all. The robot only steps in once a day, at 6:00.

Make it yours

Other words for a day off

The “Who is off today” Code node looks for Off, Libur and Cuti. Add another word, such as Sakit, in the same line if your team uses it.

Off shift instead of Away

In the same Code node, change AWAY to OFF_SHIFT if that’s the status you prefer for days off.

Tell the team who’s off

Add a Telegram node at the end to post “Today Dewi is off” to the team group.

More than one team

Duplicate the workflow, one copy per team, each with its own team id.

A different time

Open the “Every morning at 06:00” node and pick another hour, such as just before your shop opens.

Honest limits

  • It runs once a day. A day off added at 10:00 takes effect the next morning, unless you run the workflow by hand or change the status on the dashboard.
  • It resets everyone else to Available each morning, as explained above.
  • The name must match the agent’s name in iBuat.Link. “Off: Dew” won’t match Dewi.
  • An event titled “Off: Dewi” anywhere in today’s calendar makes her Away for the whole day. The template doesn’t look at the event’s hours, so half days are better handled with working hours or by hand.
  • Available doesn’t override working hours. An agent outside their hours still gets no chats.
  • Agents who are switched off in the team are left alone.
  • It needs Pro or higher, n8n, and a Read & write key. If the key ever leaks, revoke it in Developer and make a new one.

The workflow uses only a handful of API requests a day, one for the agent list and one per agent, far below Pro’s 600 per hour. The full walkthrough is in the step-by-step n8n guide.

Frequently asked questions

What’s the difference between Away and Off shift?+

Both stop Sales Router from sending chats to that agent. The template uses Away for days off. You can change it to Off shift in the Code node if you prefer.

Does the name in the calendar have to match exactly?+

The spelling has to match the agent’s name in iBuat.Link. Upper and lower case don’t matter, so “off: dewi” works too.

Can admins add their own days off?+

Yes, if you share the Google Calendar with them. Whatever is in the calendar at 6:00 is what the robot uses.

What if everyone is off on the same day?+

Then everyone is set to Away and Sales Router has nobody Available to send chats to. Keep at least one person on, or check how your team handles chats when nobody is available.

Which plan do I need?+

Pro, Business or Agency, because the workflow uses the API. Pro allows 600 API requests per hour, Business and Agency 2,000.

Let the calendar handle days off

The API is on Pro, Business and Agency. Download the template, add your first “Off:” event, and tomorrow at 6:00 the statuses set themselves.

Share