For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
AcademyContact SalesHelp CenterDashboard
DocumentationAPI ReferenceIntegrationsAdministrationChangelog
DocumentationAPI ReferenceIntegrationsAdministrationChangelog
  • Get Started
    • Introduction
    • Aurora
  • Build
    • Create an Agent
    • The Agent Editor
    • Single-Prompt Agents
      • Overview
      • Call Transfers
      • Real-Time Booking
      • MCP Connectors
      • Custom Actions
      • Send SMS
      • In-Call Messaging
      • Information Extractors
      • Custom Evaluations
      • IVR Handling
    • Memory
    • Knowledge Base
    • Variables
    • Version Control
  • Evaluate
    • Manual Testing
    • Custom Evaluations
    • Simulations
  • Launch
    • Deployment Options
    • WhatsApp
    • Website and Apps
    • Launching a Chat Agent
    • Workflows
  • Learn
    • Analytics Dashboard
    • Logs
    • Export Call Data
  • Legal
    • Subscriber Terms
    • GTC - Direct Use (DACH)
    • GTC - Direct Use (US)
    • GTC - Distribution (DACH)
    • GTC - Distribution (US)
    • Business Associate Agreement
    • Privacy Policy
    • Imprint
    • AI Transparency Statement
    • Trust Vault
LogoLogo
AcademyContact SalesHelp CenterDashboard
On this page
  • Create and configure a custom action
  • Variables
  • Authentication
  • Instructions
  • Initialize
  • Inspect requests
  • Examples
  • Retrieve date and time
  • Run several custom actions
  • FAQ
BuildActions

Custom Actions

||View as Markdown|
Was this page helpful?
Previous

Send SMS

Enable your agent to send text messages during calls
Next
Built with

Custom action named create_lead, configured as a POST request to a webhook endpoint with HubSpot authentication, alongside the Results panel showing setup inputs, an Initialize button, and a successful response body

Custom actions are HTTP requests your agent can run before or during a call. Use them when you need live data from an external API or when the agent must trigger a workflow outside Synthflow, such as creating CRM records, checking an order status, or sending structured data to another system.

Create and configure a custom action

Open Actions, create a Custom Action, then configure four parts:

  1. Request setup: select method, endpoint URL, headers, body, and authentication.
  2. Variables: define fields the model should extract or inject.
  3. Action details: set a clear name and description so the model knows when to call it.
  4. Result handling: write prompt logic that uses returned data in the next turn.

Use the request method that matches the API operation you want to run:

MethodWhat it doesCommon custom action use case
GETRetrieves existing data without creating or updating records.Look up a customer profile, order status, or availability data.
POSTCreates a new record or triggers an operation.Create a lead, submit a form, or start a workflow.
PUTReplaces an existing record with a full new payload.Overwrite a contact record with updated details.
PATCHPartially updates an existing record.Update one field, such as appointment status or phone number.
DELETERemoves an existing record.Delete a test record or cancel a resource in an external system.

Variables

Custom action variables configured in the action builder

Use variables to map conversation context into requests:

  • User-defined variables for values you want extracted during the call, such as full_name or order_id.
  • Default variables for call metadata, such as call_id, twilio_call_sid, to_phone_number, from_phone_number, and user_phone_number.
1{
2 "phoneNumber": "<user_phone_number>",
3 "fullName": "<full_name>",
4 "callId": "<call_id>"
5}

Authentication

Authentication type menu with Salesforce and Salesforce Sandbox options

Choose the authentication mode your endpoint expects in the Authentication Type menu. Available built-in connections include:

  • Salesforce and Salesforce Sandbox
  • HubSpot
  • GoHighLevel

Match the action configuration to your provider’s required header format and environment.

Instructions

Custom action messages configuration

To configure what the agent says while an action runs, open Actions > your custom action > AI Instructions.

You can set:

  • Start message
  • Delay message
  • Failure message

If you disable Let the agent speak naturally, the agent will follow your configured messages more strictly.

Initialize

After you finish configuration, variables, authentication, and message setup, click Initialize in the action editor before using the action in production flows.

Initialization validates that your endpoint, authentication, and payload are configured correctly. Without this step, your action is not ready for reliable use.

Initialized custom action showing response body and output variables

Once initialization succeeds, the returned fields become action result variables that you can reference later in prompts or pass into other actions.

Inspect requests

Every time your custom action runs during a call, the request and response are recorded in API logs. Open the matching entry to inspect the request URL, headers, body, response payload, and timing details for that specific call.

Examples

Retrieve date and time

You can create a lightweight GET custom action to fetch current local time before a call starts, then use that result in prompts.

Use http://worldtimeapi.org/api/timezone/:area/:location[/:region] and replace placeholders with your timezone, for example America/Chicago. For the full timezone list, call http://worldtimeapi.org/api/timezone.

Run several custom actions

You can chain actions so one response feeds the next step.

For example, you can run one action to fetch a customer email from your CRM and a second action to use that email for booking or an update. Attach both actions to the same call flow stage (typically During Call) and describe execution order in your prompt logic so the model runs the first action before passing the returned fields to the second.

FAQ

When should I use a custom action instead of prompt-only logic?

Use a custom action when your agent needs live external data or must trigger a system outside Synthflow. Prompt-only logic is usually enough for static conversational behavior.

Can I run multiple custom actions in one call?

Yes. You can chain actions and pass outputs from one action into the next, as long as your prompt logic clearly defines order and mapping.

Can I use both Salesforce Production and Sandbox in one workspace?

Yes. Connect both and select the matching authentication per action.

Do I need different URLs for Salesforce Production and Sandbox?

Yes. Each environment has its own Salesforce domain, so each action should use environment-specific endpoints.

Can custom actions run before the call starts?

Yes. You can configure a custom action to run before the conversation begins when you need context ready in advance, such as account details or time data.

Which variables are available by default in custom actions?

Default variables include call metadata and phone context, such as call_id, twilio_call_sid, to_phone_number, from_phone_number, and user_phone_number.

How should I name custom actions so the model uses them correctly?

Use clear, task-oriented names and descriptions that describe one outcome. Good naming helps the model pick the right action in the right context.

What should I do if a custom action fails during a call?

Set a failure message in the action’s Messages settings, and add prompt guidance for fallback behavior so the agent can continue the conversation gracefully. To diagnose the failure itself, open the call in API logs and inspect the request and response that the action made.

Should I keep one action per workflow or reuse one action for many tasks?

Use one action per business task whenever possible. Smaller, focused actions are easier to test, safer to maintain, and easier for the model to choose.