Add to calendar block
The add_to_calendar block gives respondents a Google Calendar link and an .ics file for an event. Use it on an ending when you want respondents to add their appointment or event to a calendar.
What it shows
The block creates a calendar event from the configured title, date, time, duration, location, and details. Without an answered date field, it shows nothing. If you omit time_field, the event is all-day. An answered end_time_field sets the end time instead of using duration_minutes.
The block collects no answer. When an answer is invalid, the block shows nothing. title, location, and details support {{field}} piping.
Configuration
Unknown properties are rejected.
| Property | Type | Required | Default when omitted | Allowed values / range | What it does |
|---|---|---|---|---|---|
type | string | yes | n/a | add_to_calendar | Selects the block |
title | string | no | <service> · <form title>, or the form title alone when no service answer is found | At most 2,000 characters; the event title keeps the first 200. Supports {{field}} piping | Sets the event title |
service_field | string | no | None. If there is one single-choice field named service, service_type, treatment, treatment_type, appointment_type, or booking_type, it is used | 1 to 200 characters. Name of a single_select or multiple_choice field | Selects the field whose answer names the service in the default title |
date_field | string | no | None | 1 to 200 characters. Name of a date_picker field | Selects the field holding the event date |
time_field | string | no | None (an all-day event) | 1 to 200 characters. Name of a time_input field or a choice field whose options are times | Selects the field holding the start time |
end_time_field | string | no | None | 1 to 200 characters. Name of a time field | Selects the field holding the end time; when answered, it replaces duration_minutes |
duration_minutes | integer | no | 60 | 1 to 1440 | Sets the length of a timed event |
location | string | no | None | At most 2,000 characters; the event keeps the first 500. Supports {{field}} piping | Sets the event location |
details | string | no | None | At most 2,000 characters. Supports {{field}} piping | Sets the event description |
visible_if | condition array | no | None | Same as on fields | Shows the block when the condition is true |
hide_if | condition array | no | None | Same as on fields | Hides the block when the condition is true |
Where you can use it
Add this block to an ending only. You can use visible_if or hide_if to control whether it appears.
Example
{
"mode": "page",
"pages": [
{
"type": "form",
"id": "p1",
"ui": [
{
"type": "single_select",
"name": "service",
"label": "Choose a service",
"options": ["Consultation", "Follow-up"]
},
{
"type": "date_picker",
"name": "appointment_date",
"label": "Pick a date for your appointment"
},
{
"type": "time_input",
"name": "appointment_time",
"label": "What time works for you?"
},
{
"type": "short_text_input",
"name": "full_name",
"label": "What is your full name?"
}
]
}
],
"end": [
{
"id": "e0",
"type": "end",
"ui": [
{
"type": "add_to_calendar",
"title": "{{service}} with Acme Studio",
"date_field": "appointment_date",
"time_field": "appointment_time",
"duration_minutes": 45,
"location": "12 Market Street, San Francisco",
"details": "Booked by {{full_name}}. Please arrive five minutes early."
}
]
}
]
}