create_lead
Create leads in Kylas CRM by specifying only desired fields; automatically infers required fields from user context. Requires prior field instructions lookup.
Instructions
Create a lead in Kylas CRM with only the fields the user wants (no static field list).
You MUST call get_lead_field_instructions FIRST to get valid API names and Field IDs. Infer from user context which fields to send; include only those in field_values.
field_values: Map of field identifier to value.
Standard fields: use API name as key at top level (e.g. firstName, lastName, companyName, emails, phoneNumbers, leadSource, isNew).
Custom fields: MUST be under "customFieldValues" with internal name as key (e.g. "customFieldValues": {"cfLeadCheck": "Checked"}). Do not use field ID as key—Kylas expects internal names. If you pass a field ID (e.g. "1210985"), the server will resolve it to the internal name (e.g. cfLeadCheck) automatically.
For a single email use "email": "user@example.com". For phones use "phone": "5551234567" (or "phoneNumbers" array) and you MUST include "phone_country_code": "IN" or "+91" at top level. If the user provided phone(s) but did not specify country or dial code, do NOT call create_lead—ask the user (e.g. which country/dial code for these numbers?) and only call after they respond. Do not infer from currency or other context. Email types: OFFICE, PERSONAL. Phone types: MOBILE, WORK, HOME, PERSONAL. Exactly one email and at most one phone should be primary; first entry is primary by default.
For picklists use the Option ID (number) from the cheat sheet.
For date/datetime fields: the user gives a time in their timezone (e.g. "11th Feb 2026 at 7:30 AM"). Call get_current_user, then parse_datetime_to_utc_iso_tool(local_datetime, timezone) and put the returned UTC ISO string in field_values.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| field_values | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |