Creating a script with AI
Introduction
You don't have to write scripts yourself. The build & test page includes an integrated AI script assistant — toggle into AI mode, describe what you need in plain language, and a draft script is generated for you:

The script assistant knows about expected inputs and value types (payload, metadata, variables and flow variables), together with your chosen script type and language — so generated scripts are in a form that's ready to test and use.
Need to know
AI requests draw on the allowance for your company profile — see subscription tier limits. You can review usage and past requests from your AI conversation history.
The clearer and more specific your prompt, the better the result. Where possible, include a sample payload — use the attach option in the message box to provide one.
Using the script assistant
Follow the steps below:
Step 1
Create your script as usual, then — on the build & test page — select AI to open the build with AI panel.
Step 2 Enter your prompt, being as clear and specific as possible — for example:
Create a script to take a XML payload and convert to JSON
Step 3 The script assistant replies with a summary of its approach and a generated draft script, which you can review in the panel. The draft is created as a version of your script, so it's immediately available in the editor and can be run against your own test inputs straight away.
Step 4 Refine the script as needed — you can:
Continue the conversation — describe a change in the message box (e.g.
also uppercase the SKU) and the assistant updates the script.Edit by hand — switch to
manualmode at any time to fine-tune the generated code yourself, then switch back toAIif you want more help.Start again — click
+ newto begin a fresh conversation.
Step 5 When you're happy with the draft, save it — then test and deploy as usual.
Using the implementation agent
The script assistant is built into the script editor, but it isn't the only way to build scripts with AI. The implementation agent can create and update custom scripts conversationally — particularly useful when a script is just one part of a wider piece of work, such as building out a process flow.
Last updated
Was this helpful?