Run Script Function
run_script_functionExecute a function in your deployed Google Apps Script project by providing script ID, function name, and optional parameters. Run scripts directly from Google Workspace workflows.
Instructions
Executes a function in a deployed script.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"user_google_email": "<user_google_email>",
"script_id": "<script_id>",
"function_name": "<function_name>"
},
"name": "run_script_function"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dev_mode | No | Whether to run latest code vs deployed version | |
| script_id | Yes | The script project ID | |
| parameters | No | Optional list of parameters to pass | |
| deployment_id | No | Optional API Executable deployment ID. When supplied, skips the automatic deployment lookup. When omitted, the versioned API Executable deployment with the highest version number is used. | |
| function_name | Yes | Name of function to execute | |
| user_google_email | Yes | User's email address |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |