Reference

willo_execute_sql

Run one or more SQL statements on the business's backend database — DDL, DML, functions, policies, triggers.

  • Act
  • Needs approval
Generated from Willo's codeOpen in ClaudeOpen in ChatGPT
On this page

Run SQL on the backend. ALWAYS needs a person's approval: the first call returns pending_approval with a dashboard link and a request id; the card shows the statements, a summary computed from them, the objects touched and security findings. After they approve, call again with exactly the same sql and it runs — on the draft backend while drafting (Publish replays it live), otherwise on LIVE (the card says so in red). The approved run can take a minute or two when a draft backend must be created first; if it returns status running, poll willo_get_approval with the request id for the result — do NOT call again (that asks for a second run). Returns command tags and row counts, never row data (read with willo_db_query). Refused outright, before any card: transaction control (BEGIN/COMMIT), role and login changes, and changes to objects Willo manages on the backend; the refusal names the reason. No undo.

Access

  • Token: read + act, and editor access or higher on the business.
  • Approval: Always. Every call raises a card a person approves on the dashboard.

Parameters

ParameterTypeRequiredDescription
sqlstringyesOne or more statements separated by semicolons, exactly as written. No BEGIN/COMMIT.
reasonstringnoOptional one sentence for the audit log. The card's summary never comes from this.