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

# Duplicate sheet

> Copy a Google sheet, including its values and formatting.

`duplicateSheet` copies one tab within the same spreadsheet.

## Example

```ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { duplicateSheet } from "automate.ax/google-sheets"

export default automation("Create the August sheet", () => {
  onHttpRequest({ scope: "automation" })

  duplicateSheet({
    spreadsheet: "spreadsheet-id",
    sheet: "Template",
    newTitle: "August",
  })
})
```

## Inputs

`spreadsheet` and `sheet` (title or numeric ID) are required. `newTitle` and
zero-based insertion `index` are optional. `account` selects the Google account.

## Output

Returns the new sheet's normalized metadata. The copy includes cell values and
formatting; a duplicate `newTitle` is rejected.
