Workflows

How to build a workflow with AI

How to build a workflow with AI

In TeleportHQ, you can describe a workflow in plain words and let AI build it. Open any workflow, click the AI Assistant tab in the right panel, and type what the workflow should do, for example "When the contact form is sent, save the message and email me". The AI adds and connects the steps on the canvas. You can also ask it to change or fix a workflow. Each reply shows roughly how many AI tokens it used, and a Revert button takes the change back.

Before you start

Steps

This example builds a workflow for a bakery's Order cake form.

  1. In the left sidebar, click Workflows, then click + (Add Workflow) to create a workflow, or click an existing one to open it.
  2. In the right panel of the workflow editor, click the AI Assistant tab, between Node Properties and Test runs.
  3. Optional: click one of the Example prompts to put it in the message box. You can edit it before sending.
  4. Next to the message box, check the model. Auto suits most requests. See Choose a model below.

    The TeleportHQ workflow AI Assistant tab, with the example prompts, the message box and the model picker highlighted
  5. In the message box ("Describe what you want the workflow to do..."), type your request. Be specific, for example: When the Order cake form is submitted, save name, email and cake type to the orders table, email owner@mybakery.com with the details, show a success message and go to the Thank you page.
  6. Click the send button next to the box, or press Enter.
  7. If the AI isn't sure whether to change the open workflow or make a new one, it shows Update current and Create new. Click the one you want.
  8. Watch the steps appear on the canvas. The reply ends with a summary such as "✓ Generated workflow with 6 nodes and 7 connections."

While the AI works, the send button turns into a stop button (Stop generating). If you stop, the chat says "Stopped. The workflow was not changed. Tokens used before you stopped are still charged."

Choose a model (Auto, Fast or Smart)

The model picker next to the TeleportHQ workflow AI's message box decides which AI model builds or changes your workflow:

  • Auto: "Picks a model for each request, based on how complex the workflow is."
  • Fast: "Quicker and cheaper. Best for small, linear workflows."
  • Smart: "Slower and costs more. Best for branching logic, loops and data writes."
The model picker of the TeleportHQ workflow AI open, showing Auto, Fast and Smart with their descriptions

The choice only applies when the AI builds or changes a workflow. Questions about your workflow are always answered by the default model. The editor remembers your choice in this browser.

See what a reply cost, and take it back

Under each TeleportHQ workflow AI reply, a line shows what it cost, and a reply that changed the workflow also gets a way back:

  • ≈ N tokens: about how many AI tokens building this reply used. Reading your request first is charged separately.
  • Revert ("Put the workflow back the way it was before this reply"): click it to undo that reply's changes. The reply then shows Reverted.
A TeleportHQ workflow AI reply with its token estimate and the Revert button highlighted

Revert only works while the workflow is still exactly as that reply left it. If you or a later reply changed it since, you see "The workflow changed after this AI edit, so it was not reverted. Revert the later changes first, or use Undo." Revert the newest reply first, then the one before it. After you reload the editor, earlier replies keep their cost but lose Revert: use Undo instead.

When a step needs a service you haven't connected

Some TeleportHQ workflow steps need a connected service: an email or SMS service, an AI provider key, a payment provider or an app integration such as Slack.

  • The service isn't connected yet. The AI doesn't add a step that would fail. It tells you what to connect and adds a setup card for it to the Issues window, under Setup Requested by the Assistant. Connect the service, then ask again to add the step. See Why does my workflow show missing configuration or security warnings?.
  • The workflow is built, but some steps still need keys. The summary says "Action required" and a Configuration Required card appears in the chat. Click the button with the service's name (tooltip Configure plus the name, for example Configure SendGrid), enter the key or setting, and click Save Configuration. The item then shows Configured.

The AI can also change your project outside the workflow. It may create a database table or add columns that the workflow needs. And when the workflow handles a form's submit, that form stops saving submissions in Growth → Forms: the workflow decides where the data goes. In the main AI Assistant chat, the reply lists such changes.

Change or fix a workflow with AI

  1. Open the workflow and click the AI Assistant tab.
  2. Type what to change ("Describe what to change or fix in the workflow..."), for example Also send the customer a confirmation email.
  3. Or click an example such as Debug and fix errors, Add error handling, Add data validation or Optimize performance. Use the arrows next to Example prompts to see more.

If nothing needs to change, the AI answers "No changes were needed" and says why.

Check that it worked

Troubleshooting

"Insufficient tokens": "Please purchase more tokens to continue." Your workspace is out of AI tokens. See What happens when I run out of AI tokens?.

"The AI is still working in another conversation. Send this once it finishes." The workflow AI works on one request at a time, across all your workflows. Wait until the other reply finishes.

"Failed to create new workflow" You chose Create new, but the new workflow couldn't be created. Try again, or start a New conversation with a shorter, clearer request.

"This workflow: removed 1 step(s) that submitted a form on their own (…)" The AI wrote a Custom JavaScript step that sends a form by itself, in a workflow that doesn't start with a visitor's click (for example, one that runs when the page loads or an input changes). TeleportHQ removes such a step and closes the gap, because a form is sent only when a visitor clicks its submit button. Later steps that used the removed step's result read false. If the form should be sent, let the visitor's click on its submit button do it, or start the workflow from that click.

The AI connected the wrong form or page Name the exact form, page, table and column in your request, for example "the Order cake form on the Home page". Then ask it to fix the step, or change the step on Node Properties.

Good to know

  • Conversations: the AI Assistant tab keeps your earlier conversations with each workflow. Click Conversations (N) above the message box to see them, search, rename or delete one. Click New to start fresh.
  • Ready-made workflows: there is no gallery of workflow templates. Ask the AI instead, for example "add a login workflow" or "add an add-to-cart workflow".
  • The main AI Assistant chat in the editor can also create and change workflows in a web app. See What can the TeleportHQ AI Assistant do?.
  • A request can be up to 10,000 characters long.
Share

Related Articles

What are workflows?

A workflow in TeleportHQ is a visual recipe that makes your web app do something, one trigger (like a button click or a form submission) followed by steps (like saving to a database, sending an email or opening a page), built without writing code; adding one makes a website a web app.

How to create a workflow

In TeleportHQ, open the Workflows panel in the editor's left sidebar, click Add Workflow, replace the starting trigger with the one you need, then add and set up each step on the workflow canvas; copy, paste and tidy steps from the canvas.

Why does my workflow show missing configuration or security warnings?

TeleportHQ shows a yellow "N issues" button at the top left of the editor when workflow steps still need keys, pages, elements or states (it opens the Issues window), a "N security issues" button when workflow code could leak secrets or run unsafe SQL (critical ones block publishing), and a "Not exported" badge on a workflow that can never run; each one leads you to the step to fix.

How to test a workflow step

In TeleportHQ, click a workflow step and click Test in the right panel (or right-click the step and choose Test this node…), fill in sample values for the data it needs, then click Run test to run that one step for real and see its output; the Test runs tab lists every test of the workflow.

What uses AI tokens, and how much?

In TeleportHQ, every AI feature uses AI tokens for the AI work it really does, so costs vary; as a guide, an AI website page is about 3,000 tokens, a web app page about 15,000, a new section at least 1,500 and a 4-second AI video about 9,000, while stock images cost nothing, a run that fails before the AI works costs nothing, and AI 3D models aren't available yet.

What can the TeleportHQ AI Assistant do?

The TeleportHQ AI Assistant is a chat in the editor that changes your pages, builds animations, scroll stories and page transitions, generates pages, images and scroll videos, manages your database, online store, bookings and blog settings, sets up SEO and project settings, builds workflows in web apps, publishes, and answers how-to questions from the help center.