A discord bot consuming Notion API to add, retrieve data to Notion databases.

Overview

Notion-DiscordBot

Build StatusVisits Badge

A discord bot consuming Notion API to add and retrieve data from Notion databases.




Instructions to use the bot:

Pre-Requisites:

a)Install all the requirements using pip3 install -r requirements.txt

b)Create a discord bot using the developer platform of discord and obtain your OAuth2 token. Keep it somewhere safe

c)Go to Notion and create a new Integration https://www.notion.so/my-integrations Note the internal Integration.

d)Go to Notion and create a table like this:

4 columns where:

  • Contributor is of property type Title
  • URL of url type
  • Title of text type
  • Tag of multi-select type

e)Click on the three dots and press Open as page


f)Then press share and copy the URL. The URL will look something like this: https://www.notion.so/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX?v=YYYYYYYYYYYYYYYYYYYYYYYYY

Note down the X part of the url (RED part)

This is your database id

g)Also press share again, press Invite and then click on the integration you made earlier

f)Now on the terminal of your machine:

$export DATABASE_TOKEN=<THE DATABASE TOKEN YOU NOTED DOWN>

$export AUTH_KEY=<THE INTEGRATION SECRET KEY FROM NOTION>

$export DISCORD_AUTH=<THE SECRET TOKEN OF BOT>
If you want your prefix to be something else other than '/' then $export PREFIX=<Your Desired character>

Running Procedure:

a)Now simply go into the Bot folder and run: $python3 bot.py

b)On the discord developer site copy the OAuth2 link and paste it in the browser and invite it to a server you own/have permissions to do so

c)Bot Usage:

Adding Record:

/add <URL_YOU_WANT_TO_RECORD> => This will add a new record to your database with a misc tag

/add <URL_YOU_WANT_TO_RECORD> <TAG> => This will add a new record to your database with the <TAG> tag

For multiple tags:

/add <URL_YOU_WANT_TO_RECORD> <TAG>,<TAG1>,<TAG2>
Example:

Sample database populated by the bot:

Searching Record through tags:

/search <Tag1>

For multiple tags: /search <Tag1> <Tag2>.....<TagN>

Example:

Deleting Record through tags:

/delete <Tag 1>

For multiple tags: /delete <Tag 1> <Tag2>......<Tag N>

Example:
Intial database:

Deleting Record:

Final Database:

Instead of running the discord bot via python and exporting environment variables you can use our docker container.

Link to image: Docker Hub

Google Sheets Python API

Google Spreadsheets Python API v4 Simple interface for working with Google Sheets. Features: Open a spreadsheet by title, key or url. Read, write, and

Anton Burnashev 6.2k Dec 30, 2022
4 Oct 28, 2021
🛒 Bot de lista de compras compartilhada para o Telegram

Lista de Compras Lista de compras de Cuducos e Flávia. Comandos do bot Comando Descrição /add item Adiciona item à lista de compras /remove item

Eduardo Cuducos 4 Jan 15, 2022
A simple tool that allows you to change your default AWS CLI profile.

Select AWS Profile Select AWS Profile (slapr) is a simple tool that lets you select which AWS Profile you want to use and sets it as the default AWS p

Antoni Yanev 2 Nov 09, 2022
Decrypt PSSE layer of PSM Games (on PC)

psse-decrypt Decrypt PSSE layer of PSM Games (on PC) Works on Unity and PSM games, and meets all requirements of: https://github.com/vita-nuova/bounti

Bluzume 32 Oct 11, 2022
This project, search all entities related to A2P in twilio

Mirror A2P Twilio This project, search all entities related to A2P in twilio (phone numbers, messaging services, campaign, A2P brand information and P

Iván Cárdenas 2 Nov 03, 2022
A simple tool that lets you know when you are out of Lost Ark's queues

Overview A simple tool that lets you know when you are out of Lost Ark's queues. You can be notified via: Sound: the app will play a sound Discord web

Nelson 3 Feb 15, 2022
A Powerful telegram giveawayz bot based on the python-telegram-bot API

GiveawayZ Bot A Powerful telegram giveawayz bot based on the python-telegram-bot API. Powered by Team Zyntax and Team DFX Developed by @Zycho-Dev A pr

Zycho #AFK 5 Jul 31, 2022
PerrOS - The operating system for your discord server.

PerrOS PerrOS is a Opensource Discord Bot to do it all! Installation Use the package manager pip to install the python3 requirements. pip3 install -r

Webshort 2 Jun 20, 2022
A full-fledged discord bot with moderation and a lot more.

HOT-BOT-POL-POT ⭐ Star me on GitHub m'lady.... hot-bot-pol-pot is a moderation discord bot written using enhanced-dpy library with many functionalitie

Pure Cheekbones 4 Oct 08, 2022
This repository contains modules that extend / modify parts of Odoo ERP

Odoo Custom Addons This repository contains addons that extend / modify parts of Odoo ERP. Addons list account_cancel_permission Only shows the button

Daniel Luque 3 Dec 28, 2022
This script will detect changes in your session using Discords built in Gateway.

Detect Session Gateway This script will detect changes in your session using Discords built in Gateway. What does this log? Discord build version Oper

Omega 5 Dec 18, 2021
a small cli to generate AWS Well Architected Reports on the road

well-architected-review This repo intends to publish some scripts related to Well Architected Reviews. war.py extracts in txt & xlsx files all the WAR

4 Mar 18, 2022
Sakura: an powerfull Autofilter bot that can be used in your groups

Sakura AutoFilter This Bot May Look Like Mwk_AutofilterBot And Its Because I Like Its UI, That's All Sakura is an powerfull Autofilter bot that can be

PaulWalker 12 Oct 21, 2022
A Webhook spammer For Python

Webhooker Optimizations Asynchronous Fast & Efficient Multi Tasked Usage Put high threads/tasks for maximum impact Webhook must be valid Proof of conc

andria 1 Dec 20, 2021
一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。支持Aria2、本子下载、网易云音乐下载、Pixiv榜单下载、Youtue-dl支持、搜图。

介绍 一个基于Python3的Bot。目前支持以Docker的方式部署在vps上。 主要功能: 文件管理 修改主界面为 filebrowser,账号为admin,密码为admin,主界面路径:http://ip:port,请自行修改密码 FolderMagic自带的webdav:路径:http://

Ben 650 Jan 08, 2023
Wrapper for shh/rsync for use with OpenFOAM and blue bear

bbsync wrapper for shh/rsync for use with OpenFOAM and blue bear About The Project bbsync is a wrapper for shh/rsync for use with OpenFOAM and blue be

1 Dec 10, 2021
A telegram bot to interact with a Minecraft Server

telegram-mc-bot A telegram bot to interact with a Minecraft Server It has the following commands: /status - Returns the server status (Online/Offline)

KleynArt 1 Dec 09, 2021
Ethereum transactions and wallet information for people you follow on Twitter.

ethFollowing Ethereum transactions and wallet information for people you follow on Twitter. Set up Setup python environment (requires python 3.8): vir

Brian Donohue 2 Dec 28, 2021
Python client and API for monitoring and controling energy diversion devices from MyEnergi

Python client and API for monitoring and controling energy diversion devices from MyEnergi A set of library functions and objects for interfacing with

1 Dec 17, 2021