Create a tool that will:
- Read Notion database of recommended articles.
- Format articles into markdown divided by categories thus creating news article Markdown syntax
- Publish news article to Confluence at specified place
Confluence should understand markdown with the plugin
* Unfortunately Confluence won't have plugin for markdown so.. has to receive html content - Communicate new news&techies issue in interactive medium of choice
Most probably this publisher will be strictly tailored for my Notion database so.. You have been warned
Through Notion API. Python libraries are either too complex for simple case as this.
Notion api reference
Confluence api reference
Use atlassian-python-api
pip install atlassian-python-api
TODO
- install python 3.12.0 I'm not using any advanced tools so probably any v3 python is enough
- Clone git repository
- use editorconfig plugin to help format files correctly
- install confluence library
pip install atlassian-python-api
Create Notion integration Enable integration in Notion database of choice Required items from Notion:
- integration secret - notion_secret
- database id - notion_database_id
create config.local.yml and fill in needed parts which is:
- notion database id
- notion integration secret
- confluence personal access token
- confluence blog space
After proper setup app should be easy to use. Run the app with following command
python3 newsPublisher.py [options] Cli options are:
- -m, --message ""
- -c, --confluence - publish articles to confluence
- -t, --msteams - publish articles to microsoft teams
- -u, --update - update notion database articles with published date
- [/] read Notion credentials from env variables
- [/] format notion articles into markdown format
- [/] Confluence integration
- [/] format notion articles into html format for confluence // no markdown plugin for confluence
- Teams/RocketChat integration
- [/] update Notion articles with "published date"
- Mail integration? Like mail to communicate new issue to wider audience?