An open API service indexing awesome lists of open source software.

https://github.com/doutv/Auto-GPT-Notion

Auto-GPT Notion Plugin
https://github.com/doutv/Auto-GPT-Notion

autogpt gpt

Last synced: 3 months ago
JSON representation

Auto-GPT Notion Plugin

Awesome Lists containing this project

README

          

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![License][license-shield]][license-url]
[![Discord][discord-shield]][discord-url]




Logo

Auto-GPT-Notion


Power Auto-GPT with Notion!


Table of Contents


  1. Features


  2. Getting Started

  3. Commands

  4. Contribution

  5. Acknowledgments

## Features

- Read & Create & Update Notion databases/pages.
- Automatically collects information from the web and archives it to Notion.
- Save Auto-GPT's ideas to Notion.

### Demo
[Visit this database](https://doutv.notion.site/doutv/a90461761f46498ea2efc4435e54091b?v=d34c7e21836f4a3b8293de74138f38e5) managed by Auto-GPT.

```yaml
# ai_settings.yaml
ai_goals:
- Use "google" command to search what is Auto-GPT, and save the result to a Notion page
ai_name: Notion-GPT
ai_role: Research assistant
```

![image](https://user-images.githubusercontent.com/20609724/234296458-f303140f-bf58-48d8-89e2-06f52806893d.png)

(back to top)

## Getting Started
**Do not clone this repo**, the working directory and environment are under **Auto-GPT**.

### Prerequisites
1. Install [Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT), **checkout the [latest release v0.3.0](https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.3.0) which add plugins support**, and make sure you can run it successfully.
2. Install extra dependencies for this plugin.
```
pip install notion-client python-dotenv auto_gpt_plugin_template
```

### Download
[Click Here](https://github.com/doutv/Auto-GPT-Notion/archive/refs/heads/master.zip) to download the source code as **ZIP**, and place the **ZIP** file under `Auto-GPT/plugins/`.

### Notion Settings
> Check the [Notion official docs](https://developers.notion.com/docs/create-a-notion-integration) for more details.
1. Create an integration [here](https://www.notion.so/my-integrations), and get the token `NOTION_TOKEN`.
2. Duplicate [this database template](https://doutv.notion.site/doutv/a90461761f46498ea2efc4435e54091b?v=d34c7e21836f4a3b8293de74138f38e5), click "Duplicate" on upper right corner.
3. Share the newly created database with your integration, click "..." on upper right corner, then click "Add connections" and input the integration name in the first step.
4. Save the database ID `NOTION_DATABASE_ID`, you can get from the database url.
```
https://doutv.notion.site/e3187aaa1aed42c39f0f372fdf84655e?v=b892e5b7d13f49ec8ff200916e79cf5b
|--------- database ID ----------|
NOTION_DATABASE_ID=e3187aaa1aed42c39f0f372fdf84655e
```

### Edit Environment
`Auto-GPT/.env`
1. Add this plugin to whitelist. If you have other plugins enabled, append `AutoGPTNotion` to `ALLOWLISTED_PLUGINS`.
```
ALLOWLISTED_PLUGINS=AutoGPTNotion
```
2. Add Notion token and database id.
```
################################################################################
### Notion
################################################################################

NOTION_TOKEN=
NOTION_DATABASE_ID=
```

Run Auto-GPT and enjoy!

### FAQ
If you encounter problems or have any ideas, feel free to discuss:
- [Issues](https://github.com/doutv/Auto-GPT-Notion/issues)
- [Discord Channel](https://discord.com/channels/1092243196446249134/1098882305000472626)

(back to top)

## Commands
- `notion_get_all_pages` Retrieves all pages properties from a database.
- `notion_retrieve_page` Retrieves a page's properties and content by id.
- `notion_create_page` Create a new Notion page.
- `notion_append_page` Append page content by id.
- `notion_update_page_properties` Update a page's properties by id.

(back to top)

## Contribution
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

### Run Tests
```
pytest -vs
```

(back to top)

## Acknowledgments
- [Auto-GPT](https://github.com/Significant-Gravitas/Auto-GPT)
- [notion-sdk-py](https://github.com/ramnes/notion-sdk-py)

(back to top)

[contributors-shield]: https://img.shields.io/github/contributors/doutv/Auto-GPT-Notion.svg?style=for-the-badge
[contributors-url]: https://github.com/doutv/Auto-GPT-Notion/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/doutv/Auto-GPT-Notion.svg?style=for-the-badge
[forks-url]: https://github.com/doutv/Auto-GPT-Notion/network/members
[stars-shield]: https://img.shields.io/github/stars/doutv/Auto-GPT-Notion.svg?style=for-the-badge
[stars-url]: https://github.com/doutv/Auto-GPT-Notion/stargazers
[issues-shield]: https://img.shields.io/github/issues/doutv/Auto-GPT-Notion.svg?style=for-the-badge
[issues-url]: https://github.com/doutv/Auto-GPT-Notion/issues
[license-shield]: https://img.shields.io/github/license/doutv/Auto-GPT-Notion.svg?style=for-the-badge
[license-url]: https://github.com/doutv/Auto-GPT-Notion/blob/master/LICENSE
[discord-shield]: https://img.shields.io/badge/Discord-channel-brightgreen?style=for-the-badge
[discord-url]: https://discord.com/channels/1092243196446249134/1098882305000472626