SEO, analytics & marketing

How to send emails automatically when something happens on your site (Automations)

How to send emails automatically when something happens on your site (Automations)

Automations in TeleportHQ are steps that run by themselves when something happens in your business, for example a thank-you email to the customer and a note to you each time an order is paid. To make one, click Growth in the editor's left sidebar, then Automations, click New automation, pick the event, and describe in your own words what should happen: the AI writes the steps. Automations run on your published site and keep track of their work in a TeleportHQ database, which the Automations page creates for you.

Before you start

  • A Trial, Pro or Premium workspace. Automations are part of TeleportHQ Growth. When a workspace's trial or subscription has ended, the page shows Automations are a paid feature with an Upgrade button, and New automation opens an upgrade window instead.
  • A TeleportHQ database. Automations need the built-in TeleportHQ database. A database you connected yourself can't hold them, and stays as it is. The first time, the Automations page offers to create the TeleportHQ database (see part 2).
  • A published site. Automations run on your published site, never in the editor. See How to publish your site.
  • An email provider, to send emails. Automation emails go out through your project's email provider. See How to choose which email and SMS provider your project sends through.
  • AI tokens. Make it with AI uses AI tokens. See What uses AI tokens, and how much?.
  • The part of your site the event comes from. Order events need your store, booking events need Bookings, and sign-up events need sign-up and login. The list of events shows only those of the features your project uses.

1. Open Automations

  1. In the TeleportHQ editor's left sidebar, click Growth. If a Welcome to Growth! window opens, click Maybe Later, or Show Me for a short tour.
  2. In the Growth panel, click Automations ("Steps that run by themselves"). It sits below SEO & Performance. Once your project has automations, a number beside it counts them.
  3. Automations opens over the canvas. Under Your automations it reads "Steps that run by themselves when something happens in your business. Switch one off to pause it. Edit steps opens the workflow editor." With no automation yet, the page says No automations yet.

2. Create the TeleportHQ database (first time only)

When your project has no TeleportHQ database, the TeleportHQ Automations page shows a card titled Automations need a TeleportHQ database, and New automation is greyed out. The card reads "It keeps track of what each automation still has to do. It takes about a minute; nothing else on your site changes."

  1. On the card, click Create a TeleportHQ database. The card reads "Creating your TeleportHQ database — this can take up to a minute…".
  2. Wait until the line "Your TeleportHQ database is ready — you can make automations now." appears. New automation now works.

If your project's features already use a database you connected yourself, the card reads "Your own databases stay as they are — automations get a TeleportHQ database of their own." To look at your databases first, click manage your databases in Data sources; a Back to Automations button brings you back. See How to set up the built-in TeleportHQ database.

3. Make an automation

This example makes a bakery's shop email each customer a thank-you, and email the owner, when an order is paid.

  1. At the top right of Your automations, click New automation. The New automation window opens on When…, asking "What starts the automation?"
  2. Find the event. The events are grouped by area, such as Orders and Bookings. To narrow the list, type in Search events, for example paid.
  3. Click When an order is paid. Its card now lists the details the steps can use, starting with "Includes: order —".

    The TeleportHQ New automation window on its When… step, with the When an order is paid event selected and the Next button highlighted
  4. Click Next.
  5. On Then…, under What should happen?, describe the steps in your own words, for example: Email the customer a thank-you with their order number, then email me the order total.
  6. Click Make it with AI. The window closes and the workflow editor opens on your new automation: "The workflow editor opens and the AI writes the steps from your description. You can change them there."
  7. Click each step the AI added and check it, especially who each email goes to (To). See part 7.
  8. In the workflow editor's header, click Back to Automations. Your automation's card is outlined for a moment.
  9. Publish your site. Until you do, the card shows Publish to apply and the site doesn't run the new steps.

The events come from the parts of your site you use: Orders, Invoices, Subscriptions, Gift cards, Carts and Inventory from your store, Bookings, Accounts (sign-up and login), Forms (a form that saves its entries to your database), Newsletter and Reviews. For example: When an order is placed, When a cart is abandoned, When a product runs low on stock, When a booking is made, When someone signs up, When a form is submitted and When someone subscribes to the newsletter. Every event is listed in Workflow triggers and steps reference.

To add a second automation for an event that already has one, click Add another next to the event's heading, for example When an order is paid · 1.

4. Switch an automation on or off

Each TeleportHQ automation has a card with a switch at its top right. The card's label shows its state: On, Off or Needs fix.

  • To switch an automation on, click its switch (tooltip Switch it on). To pause it, click the switch again (tooltip Switch it off). The switch works on your published site at once, without a publish.
  • An automation runs only for events that happen while it's on. Switching it on doesn't run it for earlier orders or bookings.
  • A new automation starts on. One made in the Workflows panel or by the AI Assistant starts on too, unless its steps break an automation rule: then it stays Off, shows Needs fix and the line "Fix the steps in the editor, then switch it on." Click that line to open the steps.
  • Changed steps wait for a publish. The card shows Publish to apply (pointing at it says Publish to activate for a new automation, Publish to use your changes for one you edited), and a line above the list says, for example, "1 automation has changes that start after your next publish." Click its Publish button. Until then, your site runs the steps it was last published with.

5. See what an automation did (History)

Each TeleportHQ automation card says how often it ran, for example "Ran 14 times · last 2 h ago · 1 failed", or Not run yet. Above the cards, Switched on, Runs and Failed runs add up all your automations.

  1. On the card, click History. You can also click the red "1 failed".
  2. A drawer opens, titled with the automation's name and "— history". It lists the runs, newest first: When, What triggered it (for example "Order #1042 · $58.00", or a person's email), Result and Took. To see more than the latest 50, click Show older runs.
  3. For a failed run, read the error under it, fix the steps with Edit steps, then click Run again. The message "Queued again — it runs the next time your site is active." appears.

The Result of a run in TeleportHQ Automations History is one of:

ResultWhat it means
DoneThe run finished.
Nothing sentThe run finished, but none of its email or text message steps sent anything. See part 6.
FailedThe run stopped on an error, shown under it.
RunningThe run is happening now.
QueuedThe run waits its turn, for example after Run again.
Waiting until a dateThe run paused at a Wait step, and carries on after that time.
TestA test event you sent.

When a failed run has no Run again button, the line under it says why: "Runs again only while the automation is on and starts on this event." or "Cannot run again: this run is older than the last time the automation was switched on."

6. Send a test event

A test event runs one TeleportHQ automation once on your published site, with example details of its event, so you can see it work without waiting for a real order or booking.

  1. On the automation's card, click History.
  2. At the bottom of the drawer, click Send a test event. The drawer says what the test does, for example "This runs the automation’s real steps once, with the example data. It uses the example customer ava.thompson@example.com and the example order ORD-1042. Any email, message or record those steps send or save is real."
  3. Click Run the test. To stop, click Cancel.
  4. A message says how it went, for example "Test event sent: the run finished." or "Test event sent: the run failed — see why below." The run appears in the drawer with the result Test.

An email the steps send to the customer goes to the example address, which nobody reads. An email to you goes to your own address, so you can check it arrived.

Good to know about TeleportHQ test events:

  • Send a test event is greyed out until your site is published: "Publish your site first: a test event runs on the published site."
  • A test runs the steps your site was last published with. After an edit, the drawer adds "Your latest steps aren’t published yet, so a test runs the published ones."
  • A test runs whether the automation is on or off, runs once, and stops at the first Wait, saying how long it would have waited, for example "Test event sent. Would wait 7 days here — a test stops at the first Wait."
  • Test runs show in History but aren't counted in the run numbers on the cards.

What "Nothing sent" means: in a TeleportHQ automation's History, Nothing sent means the run finished without an error, but none of its email or text message steps sent anything, usually because a condition, such as an If Statement, skipped them. The line under the run names those steps, for example "“Send Email to Owner” did not send." Such a run isn't retried and doesn't count as failed. If the email should have gone out, click Edit steps, check the conditions before the email step, publish, then send a test event.

7. Who gets the emails, and which service sends them

A TeleportHQ automation emails whoever its email steps name in To. To see or change it, click Edit steps on the card, click the email step, and look at To in Node Properties.

  • Emails to you. When your description says "me", "us", "the owner" or "the shop", the AI puts your project's Alerts go to addresses in To (Project settings → Credentials → Email Providers), or the workspace owner's email address when that list is empty.
  • Emails to the customer. The customer's address comes from the event, for example the email of the order's customer.
  • The service that sends them. Automation emails go through your project's email provider, the one named at the top of Project settings → Credentials → Email Providers, for example "Resend is this project’s email provider." The AI builds the email step for that provider, such as Send Email (Resend).
  • No provider yet. The AI still adds the email step, and the card shows what's missing, for example "Connect Resend to send this email", or "Set the address this email is sent from". Click that line to open the steps, then connect the provider. See How to choose which email and SMS provider your project sends through.

With Resend's test sender (onboarding@resend.dev), Resend delivers only to the address your Resend account was opened with, so customers get nothing until you send from your own domain.

Automations and workflows

Every TeleportHQ automation is a workflow whose trigger is When something happens in your business. Growth → Automations is where you switch automations on and off, see their runs and test them; the steps themselves are edited in the workflow editor. See What are workflows?

  • Edit steps on a card, or the automation's name, opens it in the workflow editor. There you can change the steps by hand, or ask the AI Assistant tab to change them.
  • In the Workflows panel, automations are listed last, under Automations, with a Manage in Growth → Automations link. In the filter next to Search workflows..., Automation workflows (N) lists only them.
  • You can also make one in the Workflows panel: replace a workflow's trigger with Automations → When something happens in your business and pick the event. It then shows in Growth → Automations too.
  • Automations run on the server after the event, never in a visitor's browser. Steps that need a browser, such as Show Toast or Go to Page, can't be used, and an automation pauses with Wait instead of Delay. See Workflow triggers and steps reference.

Troubleshooting

New automation is greyed out Your project has no TeleportHQ database yet. Pointing at the button says "Automations need a TeleportHQ database — create one here first." Create it as in part 2.

"Automations could not be read — check the database connection in Data sources" The editor couldn't reach the TeleportHQ database. Click Try again. A TeleportHQ database created during the trial becomes inactive after 7 days, and automations stop with it. See Why is my TeleportHQ database inactive?

"Some automations could not be updated — check the database connection in Data sources, then publish again." This shows after a publish when the switches of your automations couldn't be brought up to date. Check the database in Data Sources, then publish again.

Send a test event is greyed out, or the test says "The published site has no automations yet. Publish the site to activate them, then try again." Publish your site, then send the test again.

A card shows "Needs fix" The automation's steps break an automation rule, for example a step that needs a visitor's browser, a Delay, or a Wait with no step after it. Click "Fix the steps in the editor, then switch it on.", fix the step the editor marks, then switch the automation on.

The event I want isn't in the list "Only events of the features this project uses are listed." Turn on the feature first, for example your store or Bookings. When a cart is abandoned also needs the abandoned-cart reminder (see How to send abandoned cart reminders), and When a booking is left unpaid needs online payment for bookings.

An automation never runs Check that its card shows On, that your site was published after you made it (no Publish to apply), and that the event happened on your published site after you switched the automation on. Then open History.

Good to know

  • When automations run. Right after the event, on your site's server, never while the visitor waits.
  • Retries. "A run that fails is retried the next time the site is active, up to 5 attempts per event."
  • Rarely twice. A run still going after 25 seconds is left to finish; if it never reports back, it runs again 15 minutes later. So an automation that is slow or interrupted can run twice for the same event.
  • Waits and quiet sites. "Runs when your site is next active: a failed run is retried, and a Wait carries on, the next time someone uses your published site." On a quiet site, a Wait can carry on a little later than set.
  • Rename an automation with the pencil next to its name (tooltip Rename). The name must differ from your other workflows' names.
  • Delete an automation with the bin on its card (tooltip Delete automation), then Delete Automation. It stops running on your site at once and can't be undone. To pause it instead, switch it off.
  • Find an automation by typing in Search automations… above the list.
  • A Presentation Website can have automations too.
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; a workflow whose steps need the server makes a website a web app, while one that only changes the visitor's page doesn't.

Workflow triggers and steps reference

A list of every trigger that can start a TeleportHQ workflow and every step you can add to it, grouped by the categories in the Add Node menu, with one plain line explaining each.

How to choose which email and SMS provider your project sends through

In the TeleportHQ editor, click the Project settings cog, open Credentials → Email Providers or SMS Providers to see which provider your project sends through and where it's used, add a provider's credentials, and click Use for this project to switch every workflow step to it.

How to set up the built-in TeleportHQ database

To add the built-in TeleportHQ database, open Data Sources in the editor's left sidebar, click + (Add Data Source), choose TeleportHQ database and click Setup TeleportHQ Database; TeleportHQ creates a hosted database for the project that you then fill with tables.

What's in the Growth tab?

The Growth tab in the TeleportHQ editor brings together the Marketing Studio, Today (what to do next), Analytics, SEO & Performance, Automations, your form submissions and, when the Newsletter, a store or bookings are on, their subscribers, orders, subscriptions and bookings; the marketing, analytics and SEO tools need a trial or paid plan.

How to send emails and text messages from a workflow

In a TeleportHQ workflow, add a Send Email step (SendGrid, Mailgun, Mailersend, Postmark or Resend) or a Send SMS step (Twilio, TextMagic, Infobip or SMSAPI), enter your provider's API key, then fill in the sender, recipient and message; the provider you set up becomes the project's provider.