Actions2
- Booking Actions
Overview
This node allows users to book appointments through the Block API by specifying details such as connection ID, appointment date and time, service provider, service type, customer information, and optional parameters like duration, notes, timezone, and service address. It is useful for automating appointment scheduling workflows, for example, booking a haircut appointment with a specific provider for a customer, including polling for job completion to confirm the booking.
Use Case Examples
- Booking a haircut appointment with provider JohnSmith for customer Nathan Smith on a specified date and time.
- Scheduling a service appointment with notes and custom duration, while automatically polling for job completion.
Properties
| Name | Meaning |
|---|---|
| Connection ID | ID of the connection to the booking platform, used to authenticate and identify the booking context. |
| Date & Time | The appointment date and time in ISO 8601 format, specifying when the appointment should occur. |
| Provider | Name or identifier of the service provider who will perform the appointment. |
| Service | Name of the service to book, e.g., Haircut. |
| Customer | Customer details including first name, last name, phone number (recommended E.164 format), and optionally email address. |
| Duration (Minutes) | Duration of the appointment in minutes, must be at least 1. |
| Note | Optional notes or special instructions for the appointment. |
| Timezone | Timezone ID for the appointment time, defaults to America/Los_Angeles if not provided. |
| Service Address | Service address details used when creating a new customer if not found, including street address, city, state, ZIP code, country, and optional room/apartment number. |
| Poll Interval (Seconds) | How often to poll for job completion status, between 1 and 60 seconds. |
| Poll Timeout (Seconds) | Maximum time to wait for job completion, between 10 and 600 seconds. |
Output
JSON
appointmentId- Unique identifier of the booked appointment.status- Status of the booking job (e.g., pending, completed).customerDetailsfirstName- First name of the customer for whom the appointment was booked.lastName- Last name of the customer.
provider- Service provider assigned to the appointment.service- Service booked for the appointment.datetime- Date and time of the appointment in ISO 8601 format.duration- Duration of the appointment in minutes.note- Any notes or special instructions associated with the appointment.
Dependencies
- Block API (requires API key credential)
Troubleshooting
- Common issues include invalid or missing connection ID, incorrect date/time format, or missing required customer details. Ensure all required fields are provided and formatted correctly.
- Timeout errors may occur if the poll timeout is too short; increase the poll timeout to allow sufficient time for job completion.
- Errors related to provider or service not found indicate that the specified provider or service name may be incorrect or unavailable in the booking system.
Links
- Block API Booking Documentation - Official documentation for the Block API booking endpoints, including appointment booking and availability.