Skip to main content
POST
/
automation_rules
Create an automation rule
curl --request POST \
  --url https://{your-workspace}.neetocal.com/api/external/v1/automation_rules \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "event": "booking_confirmed",
  "meeting_ids": [
    "8a7794e3-3142-4569-9dd7-6411369b5d3f",
    "9b8805f4-4253-5670-0ee8-7522470c6e4g"
  ],
  "actions": [
    {
      "type": "send_calendar_invite_to_anyone",
      "emails": [
        "[email protected]"
      ],
      "email_subject": "You have a meeting scheduled",
      "email_body": "<h3>Hello {{client.name}}</h3><p>You have been invited to a meeting scheduled by {{host.name}} which will start at {{client.starts_at}}</p>",
      "calendar_invite_subject": "Meeting with {{host.name}}",
      "calendar_invite_body": "<p>Meeting scheduled for {{client.starts_at}}. Join using: {{meeting.scheduling_url}}</p>"
    }
  ],
  "name": "Send calendar invite to guests"
}
'
{
  "workflow": {
    "id": "efb296a3-8205-419f-8ac4-1abfc46bc3c7",
    "name": "Send calendar invite to guests",
    "meeting_ids": [
      "8a7794e3-3142-4569-9dd7-6411369b5d3f",
      "9b8805f4-4253-5670-0ee8-7522470c6e4g"
    ]
  }
}
Replace {your-workspace} with your workspace’s subdomain.
Learn how to find your subdomain in Identifying your subdomain.

Dynamic Variables

You can use dynamic variables in the subject, body, calendar_invite_subject, and calendar_invite_body fields. These variables will be automatically replaced with actual values when the automation rule is triggered. Supported variables include:
  • {{booking.id}} - Booking SID
  • {{meeting.name}} - Meeting name
  • {{meeting.scheduling_url}} - Meeting scheduling URL
  • {{client.name}} - Client’s full name
  • {{client.first_name}} - Client’s first name
  • {{client.last_name}} - Client’s last name
  • {{client.email}} - Client’s email
  • {{client.starts_at}} - Meeting start time in client’s time zone
  • {{client.ends_at}} - Meeting end time in client’s time zone
  • {{host.name}} - Host’s name
  • {{host.starts_at}} - Meeting start time in host’s time zone
  • {{host.ends_at}} - Meeting end time in host’s time zone

HTML Support

The body and calendar_invite_body fields support HTML formatting. Allowed HTML tags include: h1, h2, h3, h4, h5, br, strong, em, a, s, code, u, ul, ol, li, p, span.

Headers

X-Api-Key
string
required

X-Api-Key is used to authenticate requests using an API key. Provide your API key in this header to access protected endpoints. Refer to Authentication for more information.

Body

application/json
event
enum<string>
required

The event that triggers this automation rule. Must be one of the following values:

  • marked_no_show - When a booking is marked as no-show
  • booking_confirmed - When a booking is confirmed
  • booking_rescheduled - When a booking is rescheduled
  • booking_cancelled - When a booking is cancelled
  • before_meeting_starts - Before a meeting starts
  • after_meeting_ends - After a meeting ends
  • meeting_outcome_changed - When the meeting outcome is changed
Available options:
marked_no_show,
booking_confirmed,
booking_rescheduled,
booking_cancelled,
before_meeting_starts,
after_meeting_ends,
meeting_outcome_changed
Example:

"booking_confirmed"

meeting_ids
string[]
required

Array of valid meeting IDs from your workspace. Only actual meeting IDs are accepted (template meeting IDs are not valid). The automation rule will be triggered for bookings associated with any of these meetings.

You can get meeting IDs from the response of the List all scheduling links endpoint, where it appears as the id property for each scheduling link in the response.

Example:
[
"8a7794e3-3142-4569-9dd7-6411369b5d3f",
"9b8805f4-4253-5670-0ee8-7522470c6e4g"
]
actions
object[]
required

Array of actions to perform when the event is triggered. Currently, only send_calendar_invite_to_anyone action type is supported.

Example:
[
{
"type": "send_calendar_invite_to_anyone",
"emails": ["[email protected]"],
"email_subject": "You have a meeting scheduled",
"email_body": "<h3>Hello {{client.name}}</h3><p>You have been invited to a meeting scheduled by {{host.name}} which will start at {{client.starts_at}}</p>",
"calendar_invite_subject": "Meeting with {{host.name}}",
"calendar_invite_body": "<p>Meeting scheduled for {{client.starts_at}}. Join using: {{meeting.scheduling_url}}</p>"
}
]
name
string

Name of the automation rule. This field is optional. If not provided, an auto-generated name like "New Rule - 172719992" will be assigned.

Example:

"Send calendar invite to guests"

Response

200 - application/json

OK - Request succeeded

workflow
object