Using the Workflow Builder's AI Assistant

Tyler Coleman-Latto
Tyler Coleman-Latto
  • Updated

Overview

The workflow builder includes an AI assistant built directly into node editors. You describe what you want a node to do in plain language, and the assistant generates or rewrites the code for you — right inside the editor. In this article, we'll be covering where the assistant is available, how to use it, and example prompts to get you started.

 

Understand where the assistant is available

The AI assistant is available in three editing contexts inside the workflow builder:

  • TypeScript function nodes — write and modify functions that process data, apply logic, or handle errors
  • GraphQL query nodes — generate and update queries against the gaiia data model
  • JSON configuration fields — build literal object inputs and workflow input schemas

The assistant is accessed at the bottom of the code editor in the node configuration. It works the same way across all three contexts.

If the assistant isn't visible, reach out to your gaiia Customer Success representative to turn on AI features in your environment.

 

Use the assistant

The AI assistant panel opens automatically at the bottom of the code editor when you open a TypeScript, GraphQL, or JSON field. Type a description of what you want the code to do and submit your request.

  1. Open a workflow and select a node with a TypeScript, GraphQL, or JSON editor.
  2. Open the code editor for the relevant field. The AI assistant panel opens automatically below the editor.
  3. Type a description of what you want the code to do. Be as specific as you can — the more context you give, the more accurate the suggestion.
  4. Click Send, or press ⌘↵ (Mac) / Ctrl+Enter (Windows) to submit.
  5. Review the suggestion. The assistant shows a diff highlighting what changed — red for removed lines, green for added lines.
  6. Click Accept to apply the change, or Reject to discard it and return to your previous code.

You can stop a request while it's in progress using the stop button in the assistant panel.

The assistant is always ready to help at the bottom of the code editor

The assistant maintains conversation history within a node session — you can follow up, refine, or build on previous requests without re-explaining context. Closing the node panel or selecting a different node resets the conversation.

 

Example prompts

The following examples illustrate the kinds of requests the assistant can handle. Your prompts should reflect the specifics of your workflow and the data you're working with.

TypeScript

  • "Write a function that fails if the account status is inactive"
  • "Add error handling to this function"
  • "Reformat this date using dayjs"

GraphQL

  • "Fetch the internet plans for this account"
  • "Get the account's name and current status"
  • "Add the billing address to this query"

JSON

  • "Build a JSON schema with fields for first name, last name, and email"
  • "Add a required phone number field to this schema"

 

Get better results

  • If a suggestion isn't quite right, follow up in the same session — refine your prompt and ask the assistant to adjust. You can also reject the change, rephrase, and try again.
  • Use the assistant to help diagnose failures. If a node has failed, copy the error message from the execution log, paste it into the assistant, and ask it to help fix the issue. The assistant uses the current node's code and workflow context to suggest a fix.

Related to

Was this article helpful?

Have more questions? Submit a request