Skip to main content
Functions (formerly ChatGPT Triggers) allow you to bridge the gap between conversational AI and actionable automation. Instead of just talking, the AI can “call” a function when it detects a specific user intent, such as booking an appointment or checking an order status.

How it Works

  1. User Request: “I want to book a call for next Tuesday.”
  2. Intent Detection: OpenAI analyzes the text and matches it to your defined function book_appointment.
  3. Data Extraction: The AI automatically extracts the required data (Date: “Next Tuesday”) from the conversation.
  4. Flow Trigger: The system executes a specific Chatbot Builder flow to handle the logic.

Configuration Guide

1

Access Functions Manager

  1. Navigate to Settings > Integrations.
  2. Click on Prompt Engineering (formerly OpenAI ChatGPT).
  3. Select the Functions tab and click Manage.
  4. Click Add to create a new function.
2

Define Function Details

  • Name: Use a clear, action-oriented name (e.g., get_weather, book_demo).
    • Constraint: Use underscores _ instead of spaces. Avoid special characters like & or ñ.
  • Description (Critical): Explain what this function does in natural language.
    • Format: “Allows the user to…”
    • Example: “Allows the user to schedule a consultation call with our sales team.”
    • Why? This description acts as the “prompt” for the AI to decide when to use this tool.
3

Set Parameters (Data Collection)

Define what information the AI needs to collect from the user before triggering the flow.
  • Example: If the function is shipping_quote, you might need: zip_code, weight, dimensions.
  • Behavior: The AI will conversationally ask the user for these details until it has them all.
4

Connect a Flow

Select the existing Flow you want to trigger once the data is collected.
  • Output Message (Optional): Define a success message variable (e.g., {{booking_confirmation}}) that the flow produces, so the AI can relay it back to the user naturally.

Examples

Book Appointment

Name: book_appointment Description: Allows the user to schedule a meeting. Data: date, email, reason Output: “Appointment confirmed for - date.”

Human Handoff

Name: connect_human Description: Allows the user to speak to a real person. Data: (Leave blank if none needed) Output: “Connecting you now…”

Get Weather

Name: get_weather Description: Checks current weather conditions. Data: city, state Output: - weather_api_result

Order Status

Name: check_order Description: Retrieves shipping status for a purchase. Data: order_id Output: shipping_status

Enabling the Function

Creating the function is step one. You must also attach it to your AI configuration:
  1. Global Default: Go to Settings > Integrations > OpenAI and add it to your default assistant settings.
  2. Specific Action: Inside a specific OpenAI Action block in a flow, you can select which functions are available for that specific turn of the conversation.
Prompt Interference: Your main system prompt can conflict with functions. If you tell the bot “Never ask for personal info,” but your function requires an email, it may fail. Ensure your main prompt aligns with your function’s goals.