-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a database automatically #29
Comments
The Notion API only lets you create a database as a child of a page whereas the example template Database is a child of the workspace. Do we want to use the API to create a page for users and then add a database to that page? |
See how the parent param has to be a page parent, not a workspace |
oh I see, yeah I think creating a page first works well then |
The github docs on manually triggering a workflow docs say "Write access is required to perform these steps" |
Assuming we can't give all users write access to the repo, I'm going to work on just providing curl commands for creating the DB |
|
sounds good, and that's probably more an expected way of doing it since few people know about manually triggering actions, and the button can be hard to find |
Ok so digging deeper into the Notion API... |
In order to create a DB we need a parent page, but in order to create a page via API we need a parent page or parent DB. So we'd have to ask user to create a blank page and then we could use the API to create a DB, or create a blank DB and we could use the API to update it |
At this point though it seems more efficient to keep what we already have, instructing users to duplicate this DB into their own workspace. It's only a couple clicks to duplicate |
|
hm with the new API updates, would we even have to specify the properties on the database ahead of time? would it be possible for us to create properties dynamically on a blank database? |
Yeah we would be able to update a database using one of their endpoints |
Notion has their own repo that syncs github issues to a Notion DB https://github.com/makenotion/notion-sdk-js/tree/main/examples/notion-github-sync |
Their Readme instructs people to first duplicate a simple DB and then their code creates pages from github issues and updates the DB |
awesome, so maybe the task here to reduce the amount of onboarding steps is to make it so users can start with a blank database instead of duplicating a template. we could change this issue to reflect that, or close this and make a new issue |
this project is great, but I believe you have to run the command every time you want to sync. the github action lets users install once, and have issues sync on all new changes |
Will the amount of onboarding steps here really be reduced though? We're -1 step to duplicate a template DB but + 1 step to create a blank one, +1 step to obtain the databse id, +1 step to make the database ID and notion access token available for use |
Right I was just sharing it as an example for how organized their onboarding steps |
hm weird, I only see |
I think it might be cause you're already inside the Fabric Workspace? |
yep, just duplicated. it won't let me copy the table to paste it somewhere, maybe because it has no entries yet |
|
I can 'Add Page', '...', 'Copy link' in three (very close together) clicks - not sure what I'm missing, why does the database have to be created? If I provide a top-level page then the API allows creating a database in it? For what it's worth, my 'duplicate the template' flow was:
And to be honest I think even if it were more clicks, just creating a new page (or even providing an existing one you want the db added to!) is an easier, more obvious instruction than the current 'note the database must be created from the template above'. Also, it's not really related I don't think, but the discussion seems lumped in here - I think needing write access to the repo (for |
Discuss in #issue-29--create-a-database-automatically
What is the current functionality?
We ask the user to create a database
What problems are you facing with the current feature?
It's an extra set-up step
What is your idea?
Create a database automatically with the Notion API, now that it's available
The text was updated successfully, but these errors were encountered: