# How to sync with Google Calendar?

**Step by Step to sync with Google Calendar both ways:**  
   
1\. In **HBook > iCal sync**, click on “Get URL” to get the URL of the HBook calendar of the accommodation for which you are setting up the sync. Copy this URL.  
2\. In **Google Calendar** : click on the “+” sign besides “Other calendars”  
3\. Select : “From URL”  
4\. Paste the URL of HBook calendar. And add to the end of the URL the parameter “&agenda=yes”. By doing so, reservations are correctly displayed in agendas, as Google calendar. Please consult [this section](https://maestrel.atlassian.net/wiki/spaces/HD/pages/34767139/iCal+-+Import+export+and+synchronization#Export-calendars) of HBook documentation for further details.

→ This is the synchronization set one way : from HBook to Google. It means that any reservation received on HBook will be imported to your Google Calendar. You might wish to stop here if you only wish to view the reservations on your Google Calendar.

We recommend using HBook (**HBook > Reservations > Block accommodation**) to block dates that would not be available, or to add reservation. However, if for any reason, you use a Google Calendar to block some dates, you would do the following steps in order to have HBook importing these unavailable dates.

5. Still in **Google Calendar**, go now to the Settings of the calendar you wish to sync with HBook. Go to **Calendar Settings > Integrate calendar** and scroll to “Public address in iCal format”. Copy this URL
6. In **HBook > iCal sync**, click on “New calendar”
7. Give the calendar a name so you can identify it easily and paste the URL from Google Calendar

  
→ Now, the sync is as well set in the opposite way from Google to HBook. It means that when you add an event in your Google Agenda (if you use Google Agenda to add some reservations received by phone, for example), it will be imported into HBook and the dates will be blocked.

**Displaying HBook reservations as full-day events**

To have HBook bookings appear as full-day events when syncing with Google Calendar, follow the steps below:

1. At the end of your HBook iCal URL, add the `&agenda=yes` parameter to ensure that events are displayed as full-day items in your calendar. For detailed instructions and an example, refer to the [Export calendars section](https://maestrel.atlassian.net/wiki/spaces/HD/pages/34767139/iCal+-+Import+export+and+synchronization#Export-calendars) of our documentation.

2. If you'd like to customize the hours for the event's start and end time, you can use the following filters:

- `hb_ical_agenda_check_in_time`
- `hb_ical_agenda_check_out_time`

Refer to the [Filters for iCal section](https://maestrel.atlassian.net/wiki/spaces/HD/pages/34734482/Plugin+customization#hb_ical_agenda_check_in_time) in our documentation for more information on using these filters.