Skip to content

Commit

Permalink
notion search app without admin access (raycast#31)
Browse files Browse the repository at this point in the history
* notion search app without api

* fix typescript erros for any types

* add version

* updates to package.json based on suggestions from PR

* update preferences to use new API

* clean API and code based on PR comments

* reduce history of uers to 20

* Update tsconfig.json

* use camelCase name for input ts script

* Add high-res icon

* Revert "Update tsconfig.json"

d9a17a6

* Minor copy fixes

Co-authored-by: Thomas Paul Mann <[email protected]>
  • Loading branch information
2 people authored and FezVrasta committed Nov 24, 2021
1 parent d528c8d commit fdbcbae
Show file tree
Hide file tree
Showing 13 changed files with 7,215 additions and 0 deletions.
10 changes: 10 additions & 0 deletions extensions/search-notion/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"root": true,
"env": {
"es2020": true,
"node": true
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "prettier"]
}
4 changes: 4 additions & 0 deletions extensions/search-notion/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"printWidth": 120,
"singleQuote": false
}
43 changes: 43 additions & 0 deletions extensions/search-notion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Notion Search Without API access token

This notion extension is for people who can NOT use regular notion API if you do not have
admin access to your workplace account.

This is similar to the https://github.com/wrjlewis/notion-search-alfred-workflow extension for
Alfred.

Please follow the following guidelines to setup.

## Obtaining your credentials

Visit the Notion webapp and use your browser developer tools to see the network requests being made
when you type in anything to the quick find search bar.

Here you'll see a request called search, check the request headers to copy the cookie value and
check the request payload to copy your notionSpaceId.

**Known issue**: Some users have experienced issues with copying these values directly from developer
tools, but have seen success by copying and pasting the values into TextEdit or a different text
editor first, this probably "strips out" or removes any problematic formatting.

![](https://camo.githubusercontent.com/3f4f7b5cfd031dec5ac4e83252b92060d34d8d23e551813ef1e4552414094a56/68747470733a2f2f692e696d6775722e636f6d2f79746577467a452e676966)

### Get your `cookie` headers

They should look something like this

```text
intercom-id-gpfdrxfd=7fcea1e2-4f73-492f-9b38-0d5fcf02cd9a; notion_locale=...
```

![](https://github.com/wrjlewis/notion-search-alfred-workflow/raw/master/cookie.png)

### Get your `SpaceId`

It should look something like this:

```text
celcl9aa-c3l7-7504-ca19-0c985e34ll8d
```

![](https://github.com/wrjlewis/notion-search-alfred-workflow/raw/master/spaceId.png)
Binary file added extensions/search-notion/assets/command-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit fdbcbae

Please sign in to comment.