Automating A Database With Its Agent
Let a database's Agent act on its own when a row is added, changed or deleted, with every run recorded in one conversation.
Overview
Every Sapience database has its own Agent, the one you chat with about its rows. Automations let that Agent work for you without being asked. You pick something that can happen in the database, such as a row is added, and write what the Agent should then do, such as look up the company and fill in its industry and size. From then on, each time it happens, the Agent carries out your instructions on its own, usually in under a minute.
Some examples of what people use them for:
- A new lead arrives through a public form, and the Agent researches the company and fills in the missing columns.
- A deal moves into your Won view, and the Agent writes a hand-over note.
- A row is updated, and the Agent checks it against your rules and flags anything that's off.
Every run is recorded in one conversation per automation, so you can always see what the Agent did and why.
The same window also holds two built-in automations: the emails Sapience sends when a form is created or submitted.

Opening Automations
- Open your database on the Databases screen.
- Click Actions, then Automations (it has a lightning-bolt icon). You can also right-click the database's card and choose Automations.
The Automations window has two sections:
Section | What it holds |
Built-in automations | Two email switches that come with every database |
Your automations | The automations you and your colleagues have added, with Add automation at the top |
Who Can Do What
You have... | You can... |
Write access (or you own the database) | Add automations, switch any automation on or off, and delete any automation |
Created the automation | Everything above, plus Edit it and open its conversation |
Read-only access | Open the window and see every automation, but every control is switched off. Hovering over one explains "You have read-only access to this database" |
Only the person who created an automation can edit it, because the Agent runs it as that person, with their access. Colleagues with write access can still pause or delete it. Hovering over a locked Edit explains "Only the person who created this automation can edit it".
The Built-In Automations
Switch | What it does | Starts |
Email everyone with access when a form is created | When someone creates a form on this database, everyone else who can open the database gets one email with a link to the new form | On for every database |
Email the form owner when a form is submitted | Turns the "you have a new response" email on or off for every form in this database at once | Follows your forms |
A few details:
- Form created. The person who created the form isn't emailed about their own form. Turn the switch off and nobody is emailed for that database.
- Form submitted. This is the same Email me each response setting you see in each form's builder, set here for all of them. If some of your forms have it on and some off, the switch says On for some forms. If the database has no forms yet, the switch is greyed out with "This database has no forms yet".
Adding Your Own Automation
- In the Automations window, click Add automation.
- Under When, pick the event (the list is below).
- Pick the Table or View the event watches.
- Under Then ask the database agent to, write your instructions the way you would type them to the Agent in chat.
- Leave Enabled on (switch it off to save the automation without starting it).
- Click Save. The automation appears under Your automations. Sapience names it after the event and what it watches, for example A row is added · Leads.
Add automation is greyed out with "Add a table first" until the database has at least one table, and with "This database already has 25 automations" once it reaches the limit.
The Events
When | Fires when | You pick |
A row is added | A new row appears in the table, whether it was typed in, sent through the API or came from a public form response | A table |
A row enters a view | A row starts matching one of your saved views, for example when its status changes to Won | A view |
A row is updated | Any change is saved to a row in the table | A table |
A form is submitted | Someone sends a response to one of the database's forms | A table |
A row is deleted | A row is removed from the table | A table |
Only want some rows? Use A row enters a view with a filtered view. For example, build a view of Deals where Stage is Won, then automate on that view: the Agent only runs for deals that reach Won.
Some views can't start automations. A view that filters on Name, Created, Position or Type is still listed but greyed out, with the reason shown. Those values aren't part of what Sapience checks when a row changes.
Writing Good Instructions
The Agent reads your instructions every time the automation runs, along with what just happened and the values in the row. Be specific about what you want done and where to put the answer. For example:
Look up the company in the Company column. Fill in Industry and Employees,
and write a two-line summary of what the company does in Notes.Instructions can be up to 8,000 characters. If you edit them later, the next run uses the new version.
Your Automations List
Each automation shows:
Part | What it shows |
Name and event | What it's called and what starts it |
Table: / View: | What it watches |
A preview of the instructions | The first line of what you wrote |
Enabled switch | Turn it off to pause the automation without losing it |
Running / Paused chip | Paused whenever it's switched off. If Sapience paused it, hover over the chip to see why |
Open conversation | The record of every run. Greyed out with "No runs yet" until the first run, and for everyone except the automation's creator |
Edit / Delete | Change it (creator only) or remove it. Delete asks you to confirm first |
Deleting an automation stops it running. Its conversation stays in your conversation list.
The Automation's Conversation
Each automation keeps one conversation, named Automation: followed by the automation's name. Every run adds to it, so the whole history is in one place.
- It sits in its own Automations group in the conversation list, and shows a lightning-bolt icon ("Started by a database automation"), the way scheduled jobs show a clock.
- It belongs to the person who created the automation. Only they can open it.
Each run adds two messages:
- A briefing for the Agent: what happened, the row's values, and your instructions. The row's values are clearly marked as data, and the Agent is told never to follow instructions written in them.
- The Agent's reply: a checklist with one line per instruction, saying what it did, or what failed and why. For example:
✓ 1. Leads: Created a note titled "Lead Received: Acme Robotics" naming the company.What Happens Behind The Scenes
- Something happens in your database, such as a new row in Leads.
- Sapience checks, in one quick lookup, whether this database has any automations switched on for that event and that table or view. Most changes have none, and cost nothing more.
- For each match, Sapience queues a run. The queue is durable: if Sapience is busy or restarts, the run waits and is picked up within about ten minutes instead of being lost.
- Before the Agent starts, Sapience checks that the automation's creator still has write access to the database. If not, the automation pauses instead of running.
- The database's Agent runs your instructions as the creator, with the same tools it has in chat.
- The briefing and the Agent's reply are added to the automation's conversation.
No chain reactions. Rows the Agent adds or changes during a run don't start another automation. An automation that adds a row to the table it watches won't set itself off again.
Deleting stays deliberate. The briefing tells the Agent to delete rows or columns only when your instructions ask for a delete.
Failed runs are retried. If a run fails, Sapience tries again, up to three times in all. If all three attempts fail, it gives up on that run and emails the automation's creator once. The automation itself stays on for the next event.
When An Automation Pauses
Sometimes Sapience pauses an automation rather than running it. The chip changes to Paused, and hovering over it gives the reason:
Reason | What it means | What to do |
Its creator lost access to the database | The person who created it no longer has write access. They get one email about it | Give them write access again, then switch the automation back on. Or have someone with access create a replacement |
Its table or view was removed | What it watched has been deleted | Delete the automation, or create one for the new table or view |
Limits
These keep a busy database, or an automation that misfires, from running away with your AI credits:
Limit | Value |
Automations per database | 25 |
Instructions per automation | 8,000 characters |
Runs per automation per hour | 60 |
Runs per database per hour | 200 |
Runs waiting per automation | 50 |
Runs at the same time per database | 3 (the rest wait their turn) |
Form-created emails per database per hour | 10 |
People emailed about one new form | 50 |
When an automation goes over an hourly limit, or already has 50 runs waiting, the extra runs are skipped and its creator gets an email about it.
What Automations Don't Do (Yet)
- No conditions builder. To run only on certain rows, use A row enters a view with a filtered view.
- No chains. One automation can't set off another.
- Not copied. Copying or duplicating a database doesn't copy its automations.
- Databases only. Automations watch databases. They don't watch your files, notes or projects.
Every run is real work by the Agent, so it uses AI credits, just as asking the Agent in chat does.
Quick Reference
Topic | Answer |
Where to find it | Database → Actions → Automations |
Who can add one | The database owner, or anyone with write access |
Who can edit one | Only the person who created it |
Who can pause or delete one | Anyone with write access |
Events | A row is added · A row enters a view · A row is updated · A form is submitted · A row is deleted |
Who the Agent works as | The automation's creator |
Where the results go | One Automation: conversation per automation, in the Automations group |
How fast | It starts as soon as the event happens; simple instructions usually finish in under a minute |
Form-created email | On by default, switched off per database |
Form-submitted email | One switch for every form in the database |
Summary
Automations turn a database's Agent from something you ask into something that works on its own: pick an event, write what the Agent should do, and every time it happens the Agent does it, as you. Every run lands in one conversation you can read back. Limits, pauses and the no-chains rule stop runaway runs. The same window holds the switches for the form-created and form-submitted emails.