Notion is a single space where you can think, write, and plan. Capture thoughts, manage projects, or even run an entire company, by adding pages and databases in a collaborative workspace.
This article provides an overview to get started with the Notion connector in Peliqan. Please contact support if you have any additional questions or remarks.
Contents
Connect Notion
Visit notion.so/profile/integrations and add an "Internal integration". Copy the integration secret.
In Peliqan, go to Connections > Add Connection > Select Notion in the list, and paste your integration secret.
Make sure to add your integration to a page or database in Notion in order for Peliqan to have access to it: open the page settings (icon with 3 dots in top right corner), select "Connect to" and select your integration from the list.
ETL pipelines
Peliqan will automatically sync all Notion databases and their content to your data warehouse, for Notion databases to which Peliqan has access.
Peliqan will create 3 types of tables in the data warehouse:
- Database_items: all items of all Notion databases, combined in one table, including metadata
- DBName_allfields (e.g.
Contacts_allfields
,Companies_allfields
etc.): one table per database, with all fields from Notion, including metadata - DBName (e.g.
Contacts
,Companies
): one table per Notion database, with columns identical to Notion, for example name, city, country etc.
Writeback: interact with Notion using low-code Python
In order to fetch page content from Notion, or interact with pages, use data apps (low-code Python scripts) in Peliqan.
Example to add a comment to a page in Notion:
notion_api = pq.connect('Notion')
comment = {
'text': "This is my comment",
'page_id': "d34e5461-cd39-4fe0-a767-f37cdadfb01e",
}
result = notion_api.add('comment', comment)
st.json(result) # show the response of Notion