smartsuite_set_automation_ai_prompt
Author the dynamic prompt for an automation's AI action using a plain-text template with field reference slugs. Preview changes before confirmation.
Instructions
Set the dynamic prompt on an automation's AI ("AI Workflow Agent" / ai-custom-prompt) action. Requires readwrite/admin mode AND SMARTSUITE_ENABLE_SCHEMA_WRITE=true. Supply promptTemplate as plain text where {{field_slug}} inserts a live reference to a field (resolved against applicationId — the table the automation works on). The tool builds the correct rich-text prompt (with field-reference pills) and writes it to the action, leaving the rest of the automation intact — this is the reliable way to author workflow AI prompts (do NOT hand-build the prompt). If the automation has multiple AI actions, pass actionInstanceId. Dry-run preview unless confirm:true. (Reads via GetAutomation, so it works even in solutions where listing automations fails.)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| confirm | No | Set true to apply; otherwise returns a dry-run preview. | |
| solutionId | Yes | The solution the automation belongs to. | |
| automationId | Yes | The automation ID. | |
| applicationId | Yes | The table whose field slugs {{slug}} references resolve against (usually the automation trigger's table). | |
| promptTemplate | Yes | Plain-text prompt; {{field_slug}} inserts a live field reference. | |
| actionInstanceId | No | Optional: which AI action, when the automation has more than one (action_reference.instance_id). |