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

Savecontentbot - Telegram Save Content Bot With Same more Features

Save Restricted Content Bot A simple telegram bot to save restricted content wit

Group Dc Bots 3 Jan 26, 2022
The smart farm is an idea that designing Smart Farm by IoT

The smart farm is an idea that designing Smart Farm by IoT. Using Raspberry Pi 4 detect the data from different sensors(Raindrop sensor and DHT22 sensor), and push the data to Azure IoT central.

Jiage 1 Jan 11, 2022
Telegram Group Management Bot based on phython !!!

How to setup/deploy. For easiest way to deploy this Bot click on the below button Mᴀᴅᴇ Bʏ Sᴜᴘᴘᴏʀᴛ Sᴏᴜʀᴄᴇ Find This Bot on Telegram A modular Telegram

Mukesh Solanki 5 Nov 17, 2021
Configure your linux server and check for vulnerabilities with serverlla

serverlla Configure your linux server and check for vulnerabilities with serverlla. Serverlla has a menu with options and allows you to configure your

Dylan Meca 10 Feb 01, 2022
Discord.py-Bot-Template - Discord Bot Template with Python 3.x

Discord Bot Template with Python 3.x This is a template for creating a custom Di

Keagan Landfried 3 Jul 17, 2022
A delightful and complete interface to GitHub's amazing API

ghapi A delightful and complete interface to GitHub's amazing API ghapi provides 100% always-updated coverage of the entire GitHub API. Because we aut

fast.ai 428 Jan 08, 2023
Bitcoin-chance-wheel - Try your luck at getting bitcoins

Program Features - ✍️ Why did we name this tool the Lucky Wheel? - ✍️ This tool

hack4lx 20 Dec 22, 2022
an API to check if a url or IP address is safe or phishing

an API to check if a url or IP address is safe or phishing. Using a ML model. The API created using FastAPI.

Adel Dahani 1 Feb 16, 2022
A Discord bot to play bluffing games like Dobbins or Bobbins

Usage: pip install -r requirements.txt python3 bot.py DISCORD_BOT_TOKEN Gameplay: All commands are case-insensitive, with trailing punctuation and spa

4 May 27, 2022
Lamblayer: a minimal deployment tool for AWS Lambda layers

lamblayer lamblayer is a minimal deployment tool for AWS Lambda layers. lamblayer does, Create a Layers of built pip-installable python packages. Crea

Yusuke Takahashi 2 Aug 19, 2022
This code is for a bot which will find a Twitter user's most tweeted word and tweet that word, tagging said user

max_tweeted_word This code is for a bot which will find a Twitter user's most tweeted word and tweet that word, tagging said user The program uses twe

Yasho Bapat 1 Nov 29, 2021
A tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives.

tg-archive is a tool for exporting Telegram group chats into static websites, preserving chat history like mailing list archives. Preview The @fossuni

Kailash Nadh 400 Dec 27, 2022
A Python API for Connected 2

connected API for Connected 2 api for the { connected 2 } programmer : api report api follow api check username api forget password api Search api cha

2 Jun 05, 2022
A bot i made for a dead com server lol it gets updated daily etc

6ix-Bot-Source A bot i made for a dead com server lol it gets updated daily etc For The UserAgent CMD https://developers.whatismybrowser.com/ thats a

Swiper 9 Mar 10, 2022
Wonderful Phoenix-Bot

Phoenix Bot Discord Phoenix Bot is inspired by Natewong1313's Bird Bot project yet due to lack of activity by their team. We have decided to revive th

Senior Developer 0 Aug 12, 2021
Projeto de estudantes do primeiro período do CIn - UFPE voltado para a criação de um sistema interativo no fechamento da disciplina IF669 - Introdução a Programação.

Projeto Game: Dona da Lua Alunos: Beatriz Férre Clara Kenderessy Matheus Silva Rafael Baltar Roseane Oliveira Samuel Marsaro Sinopse O Cebolinha apron

Maria Clara Kenderessy 5 Dec 20, 2021
A discord self-bot to automate shitposting for your everyday needs.

Shitpost Selfbot A discord self-bot to automate shitposting for your everyday needs. Caution: May be a little racist. I have no clue where we are taki

stormy 1 Mar 31, 2022
discord.js nuker (50 bans a sec)

js-nuker discord.js nuker (50 bans a sec) I was to lazy to make the scraper in js, but this works too. DISCLAIMER This is tool was made for educationa

4 Sep 11, 2021
Python Business Transactions Library - ContractsPY

Python Business Transactions Library - ContractsPY Declare and define business transactions in Python. Use the contracts library to validate business

Arzu Huseynov 7 Jun 21, 2022
A python tool to Automate Whatsapp through Whatsapp web

This python tool is used to Automate Whatsapp through Whatsapp web. We can add number of contacts whom we want to send text messages on perticular time

5 Jul 21, 2022