RichardJamesLopez / app-nesting

https://app-nesting.vercel.app
4 stars 2 forks source link

Pipeline Tab API integration - Notion #23

Closed RichardJamesLopez closed 2 days ago

RichardJamesLopez commented 1 month ago
RichardJamesLopez commented 1 month ago

For additional context and a reply to an earlier Discord message

Re:

and prepared the ui for the alternative notion api. if the columns are unchanged, it should work. to add the api secret, you can either pass it on here or edit as the environment variables on vercel: https://vercel.com/richardjameslopez-s-team/app-nesting/settings/environment-variables NOTION_TOKEN_1 (the secret itself) NOTION_DB_ID_1 (the first path segment of the notion table url... or the whole url, and i'll then amend it)

Most notably this new NOTION_TOKEN_2(distinct from NOTION_TOKEN_1) will be for a marketing database, which may have different user behavior.

nmwur commented 1 month ago

Each of the columns will likely have different names (and subject to change at any point)

19 seems like a responsive way to test the functionality of having different column sets for different customers


This will be probably require an initial hardcoding for new customers during onboarding ideally there would be a long term solution where Ourmada could be responsive to different column names on Notion, but that can be a seperate issue

i think a balanced solution for now is storing notion api keys in an encrypted column in the vercel database. this way we could manually&automatically manage them without hardcoding the logic of connecting a new environment variable NOTION_TOKEN_N to a new organization

RichardJamesLopez commented 1 month ago

Would this suggestion

i think a balanced solution for now is storing notion api keys in an encrypted column in the vercel database.

mean that each users (or organization) have access to all API tokens that Ourmada hosts? Or would it be limited to the API keys that are permisioned per user?

For example, say we have 10 different customers, and 14 different API keys (say 8 of them have a single key, 1 of them has two keys, and the last one has five different keys). Would the last user have stored access to the five different keys, or all fourteen?

nmwur commented 1 month ago

access would be limited per organization. should we also be able to limit access per user in the organization?

RichardJamesLopez commented 1 month ago

should we also be able to limit access per user in the organization?

The answer of this depends on whether a) an API key have multiple databases (or tables), or
b) it is one key per database

I am pretty sure it is a) so I think every user would get access to the same API Key (Notion one for example). Eventually we want to build capability to have admin user choose which databases each member user would have access to.

Additionally,

access would be limited per organization.

I think we need to clarify if organization means each paying customer, or a specific sub-group for individual customers can assign.

I have been anchoring to former, but we should clarify this in any documentation we have.

nmwur commented 1 week ago

upd:

todo:

Image

nmwur commented 1 week ago

upd:

below is the minimum required api configuration for user names to work: https://www.notion.so/profile/integrations

Image


todo:

nmwur commented 1 week ago

@RichardJamesLopez i think i've reproduced and fixed the bug