Forms

Create structured data types to collect, store, and manage information through AI-powered conversations or manual entry.

Intermediate
6 min read

Forms

Forms (also called Data Types) let you define structured data for your workspace. AI agents can fill them through natural conversation, or team members can enter data manually.

Creating a Form

  1. Go to KnowledgeForms
  2. Click Create Form
  3. Fill in the form settings:
SettingWhat It Does
NameDisplay name shown in the UI
SlugUnique identifier used in API calls and template variables (letters, numbers, underscores only)
DescriptionOptional notes about the form's purpose
PromptInstructions the AI follows when collecting this data through conversation
CollectionWhen enabled, allows multiple records per person (e.g., multiple appointments). When off, each person has one record.
PinnedShow this form on the workspace dashboard for quick access

Field Types

Each form contains fields that define what data to collect. Add fields by clicking Add Field in the form editor.

TypeUse ForExample
TextShort text (single line)Name, address
Long TextMulti-line inputNotes, descriptions
EmailValidated email addressContact email
PhonePhone numberMobile, office number
NumberDecimal valuesWeight, temperature
IntegerWhole numbersAge, count
DateCalendar dateDate of birth, appointment date
Date & TimeDate with timeAppointment timestamp
Time of DayTime onlyOffice hours start
DropdownSingle choice from a listStatus, category
Multi-selectMultiple choices from a listSymptoms, interests
Yes/NoBoolean toggleConsent, eligibility
ZIP CodeUS ZIP codeMailing address
FormulaAuto-calculated value (see Computed Fields)Score total, BMI

Field Settings

Every field has these configurable settings:

SettingWhat It Does
NameDisplay label for the field
SlugAPI identifier (letters, numbers, underscores only). Changing this after data exists may cause data loss.
DescriptionHelp text shown to users and AI agents
RequiredMakes the field mandatory — the AI will keep asking until it gets a value
Default ValuePre-populated value for new records
Admin OnlyHides this field from non-admin members
SearchableEnables search indexing so records can be found by this field's values

For Dropdown and Multi-select fields, you define a list of options:

  • Label — What's displayed to the user
  • Value — What's stored (can differ from the label)
  • Visible When — Optional CEL expression to conditionally show/hide an option based on other field values (e.g., record.data.category == "urgent")

You can add options one at a time or use Bulk Mode to paste multiple options at once.

Collections vs. Single Records

The Collection toggle changes how the form behaves:

ModeBehaviorBest For
Single (off)One record per personProfile info, intake forms, preferences
Collection (on)Multiple records per personAppointments, orders, assessments

In the UI, single-record forms show as a form view while collections show as a table of entries.

Using Forms in Workflows

Attach forms to tasks in your workflows so your AI agent can collect data naturally through conversation.

  1. Create or edit a Task in the workflow editor
  2. In the task settings, attach a form under Data Collection
  3. The AI uses the form's Prompt field for context on how to collect the data
  4. During conversation, the AI asks for each field and validates responses automatically

The AI adapts to the conversation flow — it doesn't rigidly go field by field. It can collect multiple values from a single message and ask follow-up questions when needed.

Validation

Beyond basic required/type validation, you can add custom validation rules using CEL expressions. Set a validateCel expression on any field to enforce business rules.

Available variables in validation expressions:

VariableDescription
valueThe current field's value
record.data.<slug>Another field's value in the same form
member.idCurrent member's ID
member.nameCurrent member's name
member.labelsList of label slugs on the member
now.year, now.month, now.dayCurrent date components

The expression should return true if valid, or a string error message if invalid.

cel

Bulk Import & Export

Import records in bulk from CSV files:

  1. Open the form and go to the Records tab
  2. Click Import and upload a CSV file
  3. Map CSV columns to form fields
  4. Review and confirm the import

The bulk importer supports up to 10,000 records per batch. It can create new records or update existing ones using an external ID for matching.

To export, click Export on the Records tab to download all records as CSV.

Events & Automations

Forms trigger events you can use with Actions:

EventWhen It Fires
Record CreatedA new record is submitted
Record UpdatedAn existing record is changed

Use these events to trigger notifications, webhooks, or other automated actions. Target specific forms using conditions in your action rules.

Referencing Form Data

Access form data in template variables and messages:

{{member.data.<form_slug>.<field_slug>}}

For single-record forms, this returns the field value directly.

For collection forms, use member.collections for structured access:

{{member.collections.<form_slug>.count}}
{{member.collections.<form_slug>.latest.data.<field_slug>}}
{{member.collections.<form_slug>.latest.created_at}}

Loop through recent records (up to 10):

{% for record in member.collections.<form_slug>.recent %}
  - {{record.data.<field_slug>}} ({{record.created_at}})
{% endfor %}

See the Template Variables guide for more details.

Tips

  • Use clear prompts — The form's Prompt field guides the AI. Be specific about tone, order of questions, and validation expectations.
  • Test with conversation — After setting up a form, test it by chatting with your agent to make sure the data collection flow feels natural.
  • Index searchable fields — Enable search indexing on fields you'll frequently filter or search by. This runs a background indexing job.
  • Slugs are permanent — Plan your field slugs carefully. Changing a slug after data has been collected can break references and lose data.