---
title: "Use Notion’s Property Description As Text → DB add-itor"
slug: use-notions-property-description-as-text-db-add-itor
canonical_url: https://nerdymomocat.github.io/posts/use-notions-property-description-as-text-db-add-itor/
collection: Stream
published_at: 2024-01-18T00:00:00.000Z
updated_at: 2025-01-25T00:00:00.000Z
tags: 
  - Coding
  - Notion
  - LLMs
  - AI
author: "Nerdy Momo Cat"
---

## Navigation Context

- Canonical URL: https://nerdymomocat.github.io/posts/use-notions-property-description-as-text-db-add-itor/
- You are here: Home > Posts > Stream > Use Notion’s Property Description As Text → DB add-itor

### Useful Next Links
- [Home](https://nerdymomocat.github.io/)
- [Bundles](https://nerdymomocat.github.io/collections/bundles/)
- [Logbook](https://nerdymomocat.github.io/collections/logbook/)
- [Notes](https://nerdymomocat.github.io/collections/notes/)
- [Stream](https://nerdymomocat.github.io/collections/stream/)

### Related Content

#### Pages That Mention This Page
- [Code and Snippets](https://nerdymomocat.github.io/posts/code-and-snippets/)
- [My Annoyances With Notion](https://nerdymomocat.github.io/posts/my-annoyances-with-notion/)
- [Add to Habitify from Todoist w/ AI](https://nerdymomocat.github.io/posts/add-to-habitify-from-todoist-w-ai/)
- [I tried Stackie](https://nerdymomocat.github.io/posts/i-tried-stackie/)

Val town script here (which you can import as a module if you want!)

[

nerdymomocat/add\_to\_notion\_w\_ai

A TypeScript project on Val Town written by nerdymomocat

![title](https://www.google.com/s2/favicons?domain=www.val.town)

https://www.val.town/v/nerdymomocat/add\_to\_notion\_w\_ai

![title](https://www.val.town/ogimage/2fa73af0-27a8-11f0-9edc-569c3dd06744.png)

](https://www.val.town/v/nerdymomocat/add_to_notion_w_ai)

Bookmark for [https://www.val.town/v/nerdymomocat/add\_to\_notion\_w\_ai](https://www.val.town/v/nerdymomocat/add_to_notion_w_ai)

**Demo using the template Money Database**

[

nerdymomocat/add\_to\_notion\_w\_ai\_webpage

A TypeScript project on Val Town written by nerdymomocat

![title](https://www.google.com/s2/favicons?domain=www.val.town)

https://www.val.town/v/nerdymomocat/add\_to\_notion\_w\_ai\_webpage

![title](https://www.val.town/ogimage/2f85445e-27a8-11f0-9edc-569c3dd06744.png)

](https://www.val.town/v/nerdymomocat/add_to_notion_w_ai_webpage)

Bookmark for [https://www.val.town/v/nerdymomocat/add\_to\_notion\_w\_ai\_webpage](https://www.val.town/v/nerdymomocat/add_to_notion_w_ai_webpage)

[](https://nerdymomocat.github.io/notion/3c95e73b-9605-4931-b300-25a39d94c998/nai1080125x.mp4) Your browser does not support the video tag.

A video demonstrating the use of function - with an http endpoint

And the outcome of the demo video above. Shows 3 entries, 2 of type debit, 1 of credit, across various inferred categories etc.

[![[Image version] And the outcome of the demo video above. Shows 3 entries, 2 of type debit, 1 of credit, across various inferred categories etc.](https://nerdymomocat.github.io/_astro/Untitled.DG0K9Q9G_Z4hFdc.webp)](https://nerdymomocat.github.io/_astro/Untitled.DG0K9Q9G_Z4hFdc.webp)

\[Image version\] And the outcome of the demo video above. Shows 3 entries, 2 of type debit, 1 of credit, across various inferred categories etc.

* * *

-   Uses `instructor` and `open ai` (with `gpt-4-turbo`) to process any content into a notion database entry.
-   Use `addToNotion` with any database id and content.

```
await addToNotion(
  "DB_ID_GOES_HERE",
  "CONTENT_GOES HERE"//"for example: $43.28 ordered malai kofta and kadhi (doordash) [me and mom] jan 3 2024"
);
```

Prompts are created based on your database name, database description, property name, property type, property description, and if applicable, property options (and their descriptions).

**Supports:** checkbox, date, multi\_select, number, rich\_text, select, status, title, url, email. Filters properties where either type is title or description starts with ✨.

-   Uses `NOTION_API_KEY`, `OPENAI_API_KEY` stored in env variables and uses [Valtown blob storage](https://esm.town/v/std/blob) to store information about the database.
-   Use `get_notion_db_info` to use the stored blob if exists or create one, use `get_and_save_notion_db_info` to create a new blob (and replace an existing one if exists).