> For the complete documentation index, see [llms.txt](https://docs.planetcrust.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.planetcrust.com/human-connections/google/google-sheets-individual/action-create-spreadsheet-row-at-top.md).

# Action: Create Spreadsheet Row at Top

<p align="center"><a class="button primary" data-icon="circle-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscriptions</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>

<figure><img src="/files/auAzkjCWGFak171PMqGd" alt=""><figcaption></figcaption></figure>

<p align="center">The Create Spreadsheet Row at Top action inserts a new row at the top of a specified sheet.</p>

{% embed url="<https://www.youtube.com/watch?v=CyuUuaBSZzA>" %}

#### Example User Story

I want to add a new row at the top of a Google Sheet so that I can keep track of the latest data entries.

#### Fields

| Field Name    | Field Type | Required |
| ------------- | ---------- | -------- |
| spreadsheetId | String     | Yes      |
| sheetName     | String     | Yes      |
| rowData       | Any        | Yes      |

### Related Connections

[Google Sheets](/human-connections/google/google-sheets-individual.md)

### Related Automations

Example link

### Code (Apache v2.0): Operation

```
{
  "handle": "create-spreadsheet-row-at-top",
  "state": "inDev",
  "meta": {
    "short": "Create Spreadsheet Row at Top",
    "description": "Adds a new row at the top of a specified Google Sheet."
  },
  "input": [
    {
      "name": "spreadsheetId",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The spreadsheet to insert the row into."
      }
    },
    {
      "name": "sheetName",
      "type": "String",
      "required": true,
      "meta": {
        "description": "The name of the sheet within the spreadsheet."
      }
    },
    {
      "name": "rowData",
      "type": "Array",
      "required": true,
      "meta": {
        "description": "The data to insert as a new row at the top of the sheet."
      }
    }
  ],
  "output": [
    {
      "name": "updatedRange",
      "type": "String",
      "selector": [
        "updates",
        "updatedRange"
      ],
      "meta": {
        "description": "The range of cells that were updated."
      }
    }
  ],
  "steps": [
    {
      "type": "http",
      "http": {
        "method": "POST",
        "path": {
          "value": "/{{spreadsheetId}}/values/{{sheetName}}!A1:A1:append"
        },
        "headers": {
          "Content-Type": {
            "value": "application/json"
          }
        },
        "queryParams": {
          "insertDataOption": {
            "value": "INSERT_ROWS"
          },
          "valueInputOption": {
            "value": "RAW"
          }
        },
        "bodyTemplate": {
          "value": "{\"values\": [{{rowData}}]}",
          "placeholders": [
            {
              "name": "rowData",
              "type": "Array",
              "description": "The data to insert as a new row.",
              "required": true,
              "default": ""
            }
          ]
        }
      }
    }
  ]
}
```

<p align="center"><a class="button primary" data-icon="square-caret-right">Try @Human</a><a class="button primary" data-icon="check">Buy @Human Subscription</a><a class="button primary" data-icon="comments">Join @Human Community</a></p>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.planetcrust.com/human-connections/google/google-sheets-individual/action-create-spreadsheet-row-at-top.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
