Skip to main content

Diary Notes Updated Trigger

The Diary Notes Updated trigger starts a workflow when diary notes are updated for an availability in your CaptainBook system.

Jerome Bajou avatar
Written by Jerome Bajou
Updated over a week ago

Overview

The Diary Notes Updated trigger starts a workflow when diary notes are updated for an availability in your CaptainBook system.

When It Triggers

  • Diary notes are added or modified for an availability

  • Notes are updated through the CaptainBook interface or API

Use Cases

  • Notify team members when notes are added

  • Process availability notes for automation

  • Sync notes to external systems

  • Trigger follow-up actions based on note content

  • Archive or backup availability notes


Configuration

This trigger requires no additional configuration. It automatically triggers when diary notes are updated for any availability in your system.

Optional Filters

You can add filter conditions in your workflow to only process specific availabilities:

  • Filter by product type

  • Filter by availability date range

  • Filter by note content

  • Filter by resource


Available Data

When this trigger fires, it provides an availability object with comprehensive availability information.

Availability Object Structure

The availability object includes:

Basic Information

  • id - Availability ID

  • from - Start date/time

  • to - End date/time

  • notes - Diary notes content

  • updated_at - When notes were last updated

Product Information

  • product_id - Product ID

  • product - Product details

Resource Information

  • resource_id - Resource ID (if assigned)

  • resource - Resource details

Booking Information

  • bookings - Associated bookings

  • is_available - Availability status

Accessing Availability Data

In your workflow actions, you can access availability data using variables:

{availability.id} 
{availability.from}
{availability.to}
{availability.notes}
{availability.updated_at}
{availability.bookable_id}

Example Workflows

1. Notify Team on Note Update

Workflow Steps:

  1. Trigger: Diary Notes Updated

  2. Action: Send Notification

    • To: Team members

    • Subject: "Notes Updated for {availability.product.title}"

    • Body: Include availability and notes details

2. Process Notes Content

Workflow Steps:

  1. Trigger: Diary Notes Updated

  2. Action: Analyze Sentiment ({availability.notes})

  3. Condition: If {sentiment_analysis.sentiment} equals negative

  4. Action (True): Send Notification to manager

  5. Action (False): Log note update

3. Sync to External System

Workflow Steps:

  1. Trigger: Diary Notes Updated

  2. Action: Send Webhook

    • URL: External system endpoint

    • Payload: Availability and notes data

4. Archive Notes

Workflow Steps:

  1. Trigger: Diary Notes Updated

  2. Condition: If {availability.notes} contains "ARCHIVE"

  3. Action (True): Send to archive system

  4. Action (False): Continue normal processing


Testing

When testing this trigger:

  1. Select an availability with notes from your system

  2. The workflow will use that availability's data

  3. Review execution logs to see the availability data used

Test Data

The trigger provides access to the last 20 availabilities with notes for testing purposes.


Best Practices

  1. Filter when needed - Use conditions to only process relevant availabilities

  2. Handle note content - Check if notes exist before processing

  3. Respect privacy - Be mindful of sensitive information in notes

  4. Use delays - Add delays before follow-up actions if needed

  5. Log important updates - Store availability IDs for tracking


Related Documentation

Did this answer your question?