This page describes best practices for optimizing performance and resource usage when configuring automations. Following these guidelines helps minimize compute consumption and ensures your automations run efficiently at scale.
For general information about resource consumption in Foundry, see the resource management documentation.
Automate can become a source of high resource consumption if the configuration does not follow best practices. The general principle is to perform operations in bulk whenever possible.
Before setting up an automation, evaluate whether an Automate is actually needed:
There are three levers to consider when optimizing automation performance:
Each lever build on the previous one. Execution modes and effects (Levers 2 and 3) can only be bulk if the automation condition (Lever 1) is configured for bulk operations. For example, if you condition on each individual object update, you will only have one object as input, forcing you to process objects one at a time.
The condition configuration determines how frequently your automation evaluates and processes objects.
Learn more about configuring conditions in the object set conditions documentation, time condition documentation, and about evaluation frequency options in the evaluation frequency documentation.
Consider an object type with 1,000 objects, where each object updates 100 times per day. Using only an "on object update" condition could result in up to 100,000 automation evaluations per day (100 updates × 1,000 objects, assuming updates do not occur simultaneously).
Adding a time condition of 5 minutes caps the maximum evaluations at 288 per day (1,440 minutes ÷ 5)—a reduction of up to 340×.
Execution mode determines whether your automation processes all triggered objects together or creates separate executions for individual objects or batches. Learn more about execution settings. When configuring your automation's execution mode, prefer Single execution (the default) over per-object execution when your use case allows it.
Learn more about execution modes in the object set conditions documentation.
Example scenario: An action that sends a notification per object and must include object-specific details can be implemented by a per-object-execution of an action that generate and send a notification for this object; or by calling a single-execution of one action that calls a function, which generate multiple notifications via a function. In this case, the second approach should be preferred.
The design of your action (and any backing function) determines whether you can take advantage of bulk processing. Design your actions to accept object sets as input parameters rather than single object references. This allows passing large numbers of objects efficiently in a single operation.
Learn more about configuring action parameters in the Action types documentation.
Summary of the input parameter types, from most to least efficient:
| Input type | Efficiency | Description |
|---|---|---|
| Object set | Best | A queryable set of objects that can be passed efficiently regardless of size. |
| Object array | Good | An array of object instances; suitable for moderate-sized batches. Configure the parameter as "Object reference" with "allow multiple values" enabled. |
| Single object | Least efficient | A single object reference; use only when business logic requires it. |
When your action is backed by a function, the function should also be designed to handle bulk inputs. For detailed guidance on writing performant functions, see Optimize function performance.
Key considerations:
Regular monitoring helps you identify and prevent performance issues. Watch for these warning signs:
If you notice any of these patterns, see Troubleshooting automation performance for detailed diagnosis and solutions.
Use these tools to understand your automation behavior:
You can access Autopilot and Workflow Lineage through the Actions menu on your automation's Overview page.
Learn more about automation dependencies in the automation dependencies documentation.