> ## 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.

# Create Notion view query

> Create a temporary materialized query for a view.

`notion.createViewQuery` create a temporary materialized query for a view.

## Example

```ts automations/notion-create-view-query.automation.ts theme={null}
import { automation, onSchedule } from "automate.ax"
import { notion } from "automate.ax/notion"

export default automation("Create Notion view query", () => {
  onSchedule({ schedule: "0 9 * * *" })

  notion.createViewQuery({ view_id: "view-id", page_size: 50 })
})
```

## Inputs

`view_id` is required. Optional `page_size` controls the first result page. Every input accepts a compatible signal, and an optional second argument can select a named account.

## Output

Returns a `view_query` with its query ID, expiry time, first results, count, and cursor.

Keep both `view_id` and the returned query `id` for later pages or deletion.
