Product updates
Thoughtly Code Node lets agents run custom JavaScript during live calls and automations, so teams can transform data, validate fields, and return structured outputs without leaving the workflow.
Last updated
Thoughtly now supports Code Node inside live agent actions and automations, giving technical operators a controlled way to run custom JavaScript logic while a phone call is happening or later in a workflowWorkflowAn automated, multi-step process — usually triggered by an event (form fill, new lead) and orchestrating one or more voice / SMS / email actions..
The useful version of this is not another disconnected feature for a single channel. It is a way to keep customer intent moving from the first signal into the next qualified step, with the agent carrying context across calls, messages, email, CRMCRMThe system of record for leads, contacts, deals, and activity. Thoughtly reads from and writes to your CRM continuously. updates, and operational handoffs.
This matters because most revenue workflows do not fail in one dramatic moment. They leak in the small transitions: the missed call after a form fill, the reminder nobody sends, the CRM note that arrives too late, the handoff where the human teammate starts with no context, or the compliance rule that lives outside the tool doing the outreach. Code node is one piece of making that whole path feel less brittle.
| Use case | Example | Use Code Node live? |
|---|---|---|
| Normalize phone during call | Strip punctuation, convert to E.164 | Yes |
| Call external API | Fetch live price from external system | No, use webhook/integration |
| Calculate score | Combine urgency, eligibility, service area | Yes |
| Store secrets | Put API keys in code | No |
Code Node is for last-mile agent logic: formatting data, validating fields, calculating scores, transforming inputs, and returning structured JSON that the live call or downstream automation steps can use.
It is not meant to turn Thoughtly into a general-purpose serverless platform. It is a targeted tool for the small bits of logic that make an automation fit a real business process.
No-code builders are fast, but real GTM workflows often have edge cases: normalize a phone number, combine lead attributes, compute a route, or clean up a field before sending it to a CRM.
Code Node gives teams flexibility without forcing every live-call or workflow customization into an external webhook.
That is also why the surrounding ecosystem matters. OWASP input validation cheat sheet is useful context because good guidance when custom logic validates or transforms user-supplied data.. Product work in this category is rarely just one screen or one toggle; it has to fit the messy path between customer intent, channel behavior, team process, and the records a revenue team trusts.
The implementation details live in Thoughtly Code docs, which is the better place to check exact setup fields, supported behavior, and edge cases. The product principle is simple: Code Node should make the agent more useful without hiding the controls operators need before they trust it in production.
In practice, the workflow is straightforward, but the operational impact comes from keeping the steps connected. Pass step inputs into the Code Node as an inputs object. Run JavaScript that transforms or validates the data. Return JSON output that the current call action or downstream steps can use. Use webhooks or integrations when the workflow needs to call an external API. Do not store secrets directly in code or use it for broad backend application logic.
The important detail is that the agent is not acting as a loose script generator. It is operating inside the same Thoughtly environment where teams configure routing, outcomes, variables, integrations, testing, and post-conversation automation. That means the feature can support a real process instead of creating another artifact that someone has to manually translate into work.
For operators, this is the difference between a clever demo and a durable workflow. A demo can show that an AI agent can say the right sentence once. A production workflow has to keep doing the right thing when the contact answers late, chooses another channel, asks a question out of order, needs a human, or triggers a downstream update.
The clearest use cases are practical rather than futuristic. Normalize phone numbers before a call step. Validate email format before an email follow-up. Calculate a lead score or route based on captured variables. These are the moments where an agent earns its keep: not by sounding impressive in isolation, but by reducing the distance between a customer's intent and the team's next useful action.
That is also why the surrounding ecosystem matters. MDN JavaScript Guide is useful context because general JavaScript reference for teams using small pieces of custom logic inside workflows.. Product work in this category is rarely just one screen or one toggle; it has to fit the messy path between customer intent, channel behavior, team process, and the records a revenue team trusts.
This is also where Thoughtly’s positioning matters. The goal is not to replace every human conversation or turn every workflow into cold outbound. The goal is to convert the leads and customers companies already have by following up quickly, collecting the right information, updating the right systems, and escalating when a human should take over.
That lens changes the writing, the setup, and the success criteria. You do not measure the feature only by whether it technically fired. You look at whether the customer got a timely response, whether the sales or service team received usable context, whether consent and suppression rules were respected, and whether the workflow created momentum instead of noise.
The implementation details live in Thoughtly automations actions docs, which is the better place to check exact setup fields, supported behavior, and edge cases. The product principle is simple: Code Node should make the agent more useful without hiding the controls operators need before they trust it in production.
Start with one high-intent workflow where the business outcome is already clear. A new form-fill callback, a missed-call recovery path, a booked-appointment reminder, a quote-request follow-up, or a transfer-heavy qualification flow is usually easier to evaluate than a broad, all-purpose assistant. The narrower the first workflow, the easier it is to write crisp prompts, test realistic conversations, and decide what should happen next.
Before expanding, review the places where the agent touches the outside world: phone numbers, message templates, email domains, webhooks, CRM fields, transfer destinations, suppression rules, and analytics. Those details are not glamorous, but they are where trust is either built or lost. A richer agent experience depends on the boring plumbing being correct.
Code node is available in Thoughtly for teams using the relevant channel, workflow, or integration configuration. Talk to the Thoughtly team if you want help enabling it for your account.
Code Node gives advanced Thoughtly teams a practical escape hatch for workflow-specific logic, without dragging every live-call workflow or automation out into a separate engineering project.
The bigger story is that AI agents are becoming less like standalone call scripts and more like coordinated revenue operations workers. Code node helps push Thoughtly further in that direction: closer to the real handoffs, channel constraints, compliance boundaries, and follow-up loops that decide whether demand turns into pipeline, appointments, or resolved customer work.
If you're building AI agents to convert inbound demand, qualify leads, or automate customer conversations, book a demo with Thoughtly.