# @okitan/google-sheet-to-notion

> Load values from google sheet and convert to request body of notion.

Latest version **3.0.1** (published 2026-08-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install @okitan/google-sheet-to-notion
pnpm add @okitan/google-sheet-to-notion
yarn add @okitan/google-sheet-to-notion
bun add @okitan/google-sheet-to-notion
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2026-08-17 |
| First published | 2021-09-12 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 0 |
| Unpacked size | 52.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1 |
| Maintainers | okitan |

## Links

- npm: https://www.npmjs.com/package/@okitan/google-sheet-to-notion
- Repository: https://github.com/okitan/google-sheet-to-notion
- Homepage: https://github.com/okitan/google-sheet-to-notion#readme
- Issues: https://github.com/okitan/google-sheet-to-notion/issues
- npm.io page: https://npm.io/package/@okitan/google-sheet-to-notion

## Recent versions

- 3.0.1 (latest) — 2026-08-17
- 2.2.2 — 2024-05-31
- 2.2.1 — 2023-06-03
- 2.2.0 — 2023-06-03
- 2.1.0 — 2023-06-03
- 2.0.2 — 2022-08-28
- 2.0.1 — 2021-11-06
- 2.0.0 — 2021-11-04
- 1.1.0 — 2021-09-17
- 1.0.1 — 2021-09-12

## README

# google-sheet-to-notion

Load values from google sheet and convert to request body of notion.

# Usage

Given data of google sheet.
data SHOULD include the header line.

| $id                                 | title   | $cover                        | $icon  | property1  | property2 |
| ----------------------------------- | ------- | ----------------------------- | ------ | ---------- | --------- |
| deadbeef-deadbeef-deadbeef-deadbeef | A Title | https://example.com/cover.png | :tada: | A property | 1         |

Also, given databese of notion with properties.

- property1
  - Text
- property2
  - Number

The database can be created by Notion API with this parameters.

```node
const properties = {
  title: { title: {} },
  property1: { rich_text: {} },
  property2: { rich_text: {} },
};

// notionClient.databases.create({ parent: { type: "page_id, page_id: "XXX" }, title: "A database title", properties });
```

With the properties, You can parse values as Notion-aware data by `praseData`.

```node
// You can get data by `sheetsClient.spreadsheets.values.get`
const data = [
  ["$id", "title", "$cover", "$icon", "property1", "property2"],
  ["deadbeef-deadbeef-deadbeef-deadbeef", "A Title", "https://example.com/cover.png", ":tada:", "A property", 1],
];

const values = parseData({ data, schema: { properties } });
console.log(values);
// [
//   {
//     $id: "deadbeef-deadbeef-deadbeef-deadbeef",
//     $cover: "https://example.com/cover.png",
//     title: "A Title",
//     property1: "A property",
//     property2: 1,
//   },
// ];
```

You can create request body of Notion Page from a value by `buildPageParameters`.

```node
const body = buildPageParameters( { data: ...values[0], schema: { properties }});

notionClient.pages.update(body);
```

When `$id` is present, `buildPageParameters` builds body for update.
If `$id` is empty, you should assign `schema.id` or `schema.database_id` to build body for create.

---
_Source: https://npm.io/package/@okitan/google-sheet-to-notion · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
