Functions

Functions give the assistant actions it can call during a conversation. Define them as YAML arrays in functions.yaml. Each function needs name, description, args, and execution; use args: [] when it takes no arguments.

Scope and names

FileWhen its functions are availableLimit
reception/functions.yamlThroughout the call, including during workflows.16
reception/workflows/booking/01-details/functions.yamlWhile that step is active, alongside assistant-level functions.17

The assistant-level file is optional and defaults to an empty list. Every step requires its own file, which can contain [].

Names must match [a-z][a-z0-9_]{0,63}: start with a lowercase letter and use lowercase letters, digits, or underscores, up to 64 characters. Names must be unique in each file, and step functions must not reuse an assistant-level name. Different steps can reuse names because their functions are not active together.

Descriptions must be nonempty and at most 2,048 characters. Explain when the assistant should call the function and any information it must collect first.

Execution types

execution.typeexecution.operationPurpose
builtinstart_workflowEnter the first step of a named workflow.
builtintransitionContinue, exit, regress and return, or jump to a specific step in any workflow of this assistant.
builtinsave_variableSave argument values for use later in the call.
builtinhuman_transferTransfer the caller using dashboard transfer settings.
builtinsend_smsSend an SMS using the configured sender.
builtinintegrationRun an action on a connected integration.
customNo operation fieldSend an HTTPS request to your service.

Append the following examples to the appropriate functions.yaml array. If you are extending the booking workflow, keep its existing start_booking function.

Arguments

Each argument requires a name, type, and nonempty description of at most 500 characters. Argument names use the same format as function names and must be unique among siblings. call_sid is reserved for Neuroline.

TypeValue or additional fields
stringText.
numberA number, including fractions.
integerA whole number.
literalAdd a value: one exact string, number, boolean, or null.
booleantrue or false.
anyAn unrestricted value.
objectAdd a properties array of argument definitions.
unionAdd an alternatives array with at least two argument definitions.

There can be at most 16 arguments or object properties in each list, and up to 50 union alternatives. Objects and unions can nest up to three levels. Fields such as required, default, and enum are not supported; ordinary typed arguments must be supplied when the function is called.

Use a literal to require one exact value. Quote numeric strings in YAML to keep "123" distinct from the number 123:

args:
  - name: appointment_type
    type: literal
    value: "123"
    description: Consultation.

For several exact choices, use a union whose alternatives are literals. Each alternative keeps its own name, value, and description.

Save variables

Save collected values to the current call's context. Later steps can read them from the Variables context. Saving the same name again replaces its value; these values are not stored as a record for future calls.

reception/workflows/booking/01-details/functions.yaml
- name: save_request
  description: Save the caller's confirmed name and preferred appointment time before proceeding.
  args:
    - name: caller_name
      type: string
      description: The caller's full name.
    - name: preferred_time
      type: string
      description: The requested date and time, including the timezone.
  execution:
    type: builtin
    operation: save_variable

Add this alongside proceed and update the step prompt to call save_request before advancing. This operation requires at least one argument.

For structured values, an argument can contain properties and alternatives:

args:
  - name: request
    type: object
    description: Appointment preferences provided by the caller.
    properties:
      - name: party_size
        type: union
        description: The number of attendees, or a description if it is not yet known.
        alternatives:
          - name: exact_count
            type: integer
            description: The confirmed number of attendees.
          - name: estimate
            type: string
            description: The caller's estimate in their own words.

HTTP functions

reception/functions.yaml
- name: lookup_booking
  description: Look up an existing booking after the caller provides its reference.
  args:
    - name: reference
      type: string
      description: The booking reference provided by the caller.
  execution:
    type: custom
    url: https://api.example.com/bookings/lookup
    method: POST
    headers: {}
    timeout: 5000

Replace the example URL with your service's HTTPS endpoint. All execution fields shown above are required. Supported methods are POST, PUT, PATCH, GET, and DELETE. timeout is in milliseconds, from 1,000 to 20,000 in increments of 1,000. Assistant silence timeouts in config.yaml use seconds instead.

POST, PUT, and PATCH send arguments as JSON; GET and DELETE put them in the query string. Neuroline adds call_sid automatically. Objects in query parameters are JSON-encoded. Successful response text is returned to the assistant; non-success responses and timeouts fail the function. Redirects are not followed.

headers is a map of header names to string values, with at most 16 entries. Header values are literal; repository files do not interpolate environment variables or secret references. For supported providers, use an integration to keep credentials in the dashboard.

Integration functions

Connect the provider on the assistant's integrations page. Cal.com requires an API key; Google Calendar and Outlook Calendar require authorization and a calendar selection. Outlook also requires an IANA time zone, such as Europe/Amsterdam. Configure appointment details in each function's parameters.

For example, this function lists slots from a connected Cal.com account:

reception/workflows/booking/01-details/functions.yaml
- name: list_slots
  description: List available times for a Cal.com event type before offering an appointment.
  args:
    - name: event_type_id
      type: literal
      value: "123"
      description: Cal.com consultation event type ID.
    - name: start
      type: string
      description: Range start as an ISO 8601 date-time.
    - name: end
      type: string
      description: Range end as an ISO 8601 date-time, no more than 31 days after start.
    - name: time_zone
      type: string
      description: IANA time zone for the returned slots.
  execution:
    type: builtin
    operation: integration
    actionId: calcom.list_slots

actionId selects the provider action. Neuroline resolves the assistant's connection for that provider automatically. Functions can be imported before connecting the integration; they stay unavailable until the connection is ready.

Argument names must match the action's definition. You can customize descriptions and narrow a parameter to a compatible literal or union, such as a fixed Cal.com event_type_id. These values belong to the function and are preserved when the integration reconnects or the repository syncs. Replace "123" above with your Cal.com event type ID.

Google Calendar and Outlook Calendar provide create_booking, accepting title, duration_minutes, and description. Their list_slots functions also require duration_minutes; use the same duration in both functions. Availability checks only the requested range and existing calendar events. Neuroline does not apply working hours, buffers, minimum notice, or a booking horizon.

Use outlook_calendar.list_slots and outlook_calendar.create_booking for Outlook. Bookings require a confirmed attendee name and either an email address or an E.164 phone number. Email attendees receive a calendar invitation. Phone confirmations use the assistant's configured SMS sender; an SMS failure does not cancel the booking. Outlook supports an optional in-person location, without online meeting links.

Update the step prompt to call the action and offer only returned availability. Listing slots does not create a booking.

Zoom meetings

Connect Zoom in the dashboard, then use zoom.create_meeting to create a scheduled meeting for that Zoom user:

reception/functions.yaml
- name: create_zoom_meeting
  description: Create a Zoom meeting after the caller confirms the title, future start time, and duration.
  args:
    - name: title
      type: string
      description: Meeting title, up to 200 characters.
    - name: start
      type: string
      description: Confirmed future start as an ISO 8601 date-time with a time zone offset.
    - name: duration_minutes
      type: integer
      description: Meeting duration in minutes, from 1 to 1440.
  execution:
    type: builtin
    operation: integration
    actionId: zoom.create_meeting

The result contains the meeting id and attendee join url. This action does not check calendar availability, create a calendar event, or send invitations. Never retry an uncertain creation without checking Zoom first.

For Google Calendar appointments, select Zoom as the calendar's appointment location in the dashboard. google_calendar.create_booking creates the Zoom meeting automatically using the appointment details and includes its join link in the event and any SMS confirmation. Use a title of at most 200 characters and a duration of at most 1,440 minutes. Do not call zoom.create_meeting separately for the same booking.

Human transfer and SMS

reception/functions.yaml
- name: human_transfer
  description: Transfer the caller to a person when they request one.
  args: []
  execution:
    type: builtin
    operation: human_transfer
- name: send_sms
  description: Send a short SMS to the caller when they ask for or approve it.
  args:
    - name: to
      type: string
      description: Exact caller phone number from the call context.
    - name: message
      type: string
      description: SMS body, up to 1000 characters.
  execution:
    type: builtin
    operation: send_sms

Enable and configure human transfers in the dashboard. The transfer function is available only when transfers are enabled and a transfer is currently available, including any working-hours restrictions.

Configure an SMS sender in the dashboard to make send_sms available. Messages can be sent only to the caller's number from call context, are limited to 1,000 characters, and are capped at three per call. Keep the argument names and types shown above for these built-in operations.

On this page