Execute your AOPs inside Sheets and get more insights in the form of structured data.
The `=AOP()` function executes an Agent Operating Procedure (AOP) directly from your spreadsheet and displays the returned value in the cell. This enables you to run pre-configured AI workflows on spreadsheet data without leaving Sheets.
\=AOP(AOP\_ID, "var1", "var1\_value", "var2", "var2\_value")
AOP\_ID: The asset ID of the AOP you want to execute (required)
"var1", "var1\_value": Variable name and value pairs to pass as inputs to the AOP (optional)
Additional variable pairs can be added as needed
Variable values can be:
* **Cell references**: Reference other cells in your spreadsheet (e.g., C4, B2)
* **Literal values**: Provide direct string, number, or boolean values
* **Formulas**: Use the result of other spreadsheet formulas
## Example Usage:
First, create an AOP in the AOP Library or identify the asset ID of an existing AOP you want to execute.
In any cell inside the sheet, enter the AOP function with the AOP asset ID and press **Enter**.
\=AOP("asset\_55ed8502-1233-4f10-b79d-c43c2eb1b251")
The AOP will execute and the result will be displayed in the cell.
Organize your data in spreadsheet cells. For example, put a company name in cell C4.
Pass cell references as variable values to the AOP. The AOP will use the data from the referenced cells.
\=AOP("asset\_55ed8502-1233-4f10-b79d-c43c2eb1b251", "company", A4)
In this example, the AOP receives a variable named "company\_name" with the value from cell A4.
You can also use a document as an input for an AOP run.
\=AOP("asset\_55ed8502-1233-4f10-b79d-c43c2eb1b251", "document", A4)
In this example, the AOP receives a document input ("document") with the value from cell A4.
Check your AOP configuration to see what input variables it expects.
Provide multiple variable name and value pairs to pass multiple inputs to the AOP.
\=AOP("asset\_55ed8502-1233-4f10-b79d-c43c2eb1b251", "document", A4, "company\_name", B4)
This example passes two variables: document input (from cell A4), company\_name (from cell B4).
You can pass literal string, number, or boolean values directly without using cell references.
\=AOP("asset\_55ed8502-1233-4f10-b79d-c43c2eb1b251", "product", "Enterprise Plan", "price\_limit", 10000)
This example passes literal values directly to the AOP without referencing cells.