Back to DocumentationDocumentation

API Reference

Available commands and actions that the AI can perform on your spreadsheet.

Available Actions

The AI can perform the following actions on your spreadsheet:

write_cell

Write a value to a single cell.

{"type": "write_cell", "cell": "B2", "value": "Hello World"}

fill_column

Fill multiple cells in a column with values.

{"type": "fill_column", "column": "B", "startRow": 2, "values": ["val1", "val2", "val3"]}

write_range

Write values to a range of cells.

{"type": "write_range", "range": "B2:C4", "values": [["b2","c2"],["b3","c3"],["b4","c4"]]}

create_formula

Add a formula to a cell.

{"type": "create_formula", "cell": "D1", "formula": "=SUM(A1:C1)"}

Response Format

The AI responds with a JSON object containing a message and actions:

{
  "message": "I've filled column B with product descriptions.",
  "actions": [
    {
      "type": "fill_column",
      "column": "B",
      "startRow": 2,
      "values": ["Description 1", "Description 2", "Description 3"]
    }
  ]
}

Context Information

The AI receives the following context about your spreadsheet:

  • Sheet Name: The name of the active sheet
  • Row Count: Total number of rows with data
  • Column Headers: Names of all columns
  • All Data: Complete data from column A for processing
  • Sample Data: First 5 rows for reference
  • Selected Range: Currently selected cells (if any)