Start a Background Agent from a record event

Choose the record event and source table, test with a readable sample, and verify the trigger after activation.

Use a record trigger when a change in a specific Mainbase table should start an Agent. For example, an Agent could suggest a short triage checklist each time someone creates a record in a Requests table.

Choose the event and table

  1. Open your Background Agent in Build, or go to Agents → New and choose Build on canvas for Background Agent. You need permission to create Agents to edit a design you own.
  2. Select the trigger node. If it is still a placeholder, first select Add trigger. In Type, choose Record created, Record updated, Record deleted, or File added to record.
  3. In Entity, choose the table the event must come from. For the example, pair Record created with Requests.
  4. Configure the steps for the event you chose. If you only want to act when a field has a particular value, add a Condition, set Decision type to Rule, and configure the field check. Place the action in the branch for matching records. Wait for the design to save.

Test with a record and verify the trigger

  1. With the Agent off, select Test if you have permission to manage Agents. Mainbase tries to sample a readable record from the trigger table. If no sample is available, check the table selection and your access, and verify that it has records. A file trigger also needs a readable file on the sampled record.
  2. Open Runs and check the result against what the workflow should do with the sample. For the example, look for a triage checklist. A test checks the design using a sample. A matching record event starts an automatic run after activation.
  3. Review the table, steps, and actions in Build, then switch the Agent on. Open Settings and check Triggers for the configured event and enabled state. When a matching event occurs, review the resulting run.

Start a Background Agent when a Gmail message arrives

Notify a Background Agent’s owner about a record

Read the parent of the record that triggered an Agent

Ask Mainbase AI

Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.

Open the AI assistant

Copy a question to get started

  • How do I create a Kanban view?
  • How do I invite a teammate?
  • Why is a record missing from this view?