This recipe will guide you through creating an agent that can check your availability and book appointments in real-time. This is perfect for clinics, salons, consultants, and anyone who runs on appointments.

What You Need

  1. A Dialogik account.
  2. A Google Account with a Calendar you want to use.
  3. 5 minutes.

Step 1: Create the Agent

  1. Go to the Agents tab in your panel.
  2. Click New Agent.
  3. In the template picker (or blank canvas), verify you select the following settings:
    • Tools: Check Calendar Slots and Calendar Book.

Step 2: Connect Google Calendar

The agent needs permission to see and write to your calendar. We do this securely via a Service Account.

2a. Get the Agent's Email

In the Agent editor, look for the Google Calendar Integration card. Copy the email address shown there. It will look like: dialogik-calendar@...iam.gserviceaccount.com.

2b. Share Your Calendar

  1. Open Google Calendar.
  2. Find the calendar you want to use on the left sidebar.
  3. Click the three dots options menu → Settings and sharing.
  4. Scroll down to "Share with specific people or groups".
  5. Click Add people and groups.
  6. Paste the service email you copied.
  7. CRITICAL STEP: In "Permissions", select "Make changes to events". If you only select "See all event details", the agent cannot book appointments.

2c. Link in Dialogik

  1. Go back to the Dialogik panel.
  2. In the Calendar ID field, paste your email address (or the specific ID of the calendar you shared).
  3. Click Connect Calendar.

Step 3: Define "Availability"

You don't want the agent booking appointments during your lunch or at 3 AM. Dialogik uses an opt-in system for availability.

  1. In the Dialogik panel, set an Availability Keyword (e.g., "Available").
  2. Open your Google Calendar.
  3. Create blocks of time where you are free to take appointments. Name these events "Available".
  4. For example, create a recurring event M-F from 9 AM to 5 PM named "Available".

The AI will only offer slots that fall inside these "Available" blocks. It will also check for conflicts, so if you have a "Dentist Appointment" over part of an "Available" block, it won't double-book you.

Step 4: Refine the Prompt

Give your agent instructions on how to handle bookings. Paste this into the System Prompt:

You are a booking assistant.
Your goal is to help customers schedule appointments.

Process:
1. Ask for their name and what service they need.
2. Ask for their preferred day or time of day (morning/afternoon).
3. Check availability using the `calendar_list_slots` tool.
4. Offer 2-3 specific slots.
5. Once they confirm a slot, use `calendar_book` to secure it.
6. Confirm the booking details with the user.

Rules:
- Be friendly and concise.
- All appointments are 30 minutes long unless specified otherwise.
- If no slots are found, apologize and ask for a different day.

Step 5: Test It!

  1. Click Test Agent in the panel.
  2. Say: "Hi, I'd like to book an appointment for next Tuesday."
  3. Watch the agent check your calendar and offer real slots.
  4. Say: "10 AM works."
  5. Check your Google Calendar – the appointment should appear instantly!

Once you're happy, assign this agent to your WhatsApp or Telegram connection to go live.