Overview
The Get Resource Block action retrieves a single resource block (user event with event_id set to blocked_dates) by its ID. Use this to fetch details of a specific block, verify its existence, or access its properties in subsequent workflow steps.
Configuration
User Event ID (Required)
The ID of the user event (resource block) to retrieve. Must be a valid user event ID that:
Has
event_idset toblocked_datesBelongs to a user in the same business unit as the workflow
Supports variables from the workflow context.
Example:
{user_event.id}or
123
Output
Returns the resource block object in the workflow context with all block details:
id- User event IDuser_id- ID of the user who owns the blockevent_id- Event ID (alwaysblocked_datesfor blocks)summary- Summary text of the blockstart- Start date and time (ISO8601 format)end- End date and time (ISO8601 format)bookable_type- Type of schedule (if block is for a specific schedule)bookable_id- ID of the schedule (if block is for a specific schedule)calendar_id- Google Calendar ID (if synced to Google Calendar)created_at- Creation timestampupdated_at- Last update timestamp
Accessing Resource Block Data
After this action, you can access:
{user_event.id}
{user_event.user_id}
{user_event.event_id}
{user_event.summary}
{user_event.start}
{user_event.end}
{user_event.bookable_type}
{user_event.bookable_id}
{user_event.calendar_id}
{user_event.created_at}
{user_event.updated_at}Examples
1. Get Block from Context Variable
User Event ID: {user_event.id}Retrieves the block referenced by a user event from a previous workflow step (e.g., from Block Resource action).
2. Get Block by Direct ID
User Event ID: 456
Retrieves the block with ID 456 (if it belongs to a user in the same business unit).
3. Get Block from Find Results
User Event ID: {resource_blocks[0].id}Retrieves the first block from a previous Find Resource Blocks action.
Validation
The action validates:
User Event ID is required and not empty
User event exists in the system
User event has
event_idset toblocked_datesUser owning the event belongs to the same business unit as the workflow
If any validation fails, an InvalidArgumentException is thrown.
Best Practices
Verify existence first - Use Find Resource Blocks to check if a block exists before getting it
Use variables - Reference blocks from previous workflow steps using context variables
Handle errors - Set up error notifications for cases where blocks cannot be found
Check business unit - Remember that blocks are automatically scoped to your workflow's business unit
Access properties safely - Check if optional fields (like
bookable_typeorcalendar_id) exist before using themUse in workflows - Combine with Remove Resource Block to conditionally remove blocks based on their properties
