> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# PostgreSQL

> Run parameterized PostgreSQL statements from TypeScript automations.

Import PostgreSQL actions from `automate.ax/postgres`. Action inputs accept
plain values or compatible signals.

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { runQuery } from "automate.ax/postgres"

export default automation("Read active customers", () => {
  onHttpRequest({ scope: "automation" })
  runQuery({
    sql: "select id, email from customers where active = $1",
    parameters: [true],
  })
})
```

Leave `account` unset to use the project's default PostgreSQL binding, or pass a
named binding or `postgresAccount(...)` declaration. The account stores the
database connection string; it never enters action inputs or signals.

<Card title="Run query" href="/reference/integrations/postgres/actions/run-query">
  Execute one parameterized statement and inspect rows and PostgreSQL metadata.
</Card>
