Giter Site home page Giter Site logo

notion-search-alfred-workflow's People

Contributors

ajubin avatar amrael avatar jacobsingh avatar joeynotjoe avatar kieran-osgood avatar mvaneijgen avatar wrjlewis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

notion-search-alfred-workflow's Issues

Option to match title only

Is your feature request related to a problem? Please describe.
removes noise from the search results (I think?). Potentially speeds ups the search a bit (I think?)

Describe the solution you'd like
an option, e.g. as a workflow environment variable, to search only the title. Like when you use quicksearch and check the filter "only match titles"

Describe alternatives you've considered
Alternatives would be to use the Notion App/Website itself, but obviously, we want to use Alfred. :)

Thanks!

Just saw this on reddit and wanted to say thanks as an Alfred user!

In case other folks run into this, I found that there were several cookies listed in my request header but the key one is token_v2=... and including the token_v2= in the workflow variable was required, whereas the workspace id could be pasted as is.

Has anything changed with Alfred 5? I've updated, but now the workflow isn't working anymore.

First I thought it was my cookie, because it is doing the same as when the cookie has elapsed, aka it shows me to search on google.

This is what I see in the debugger.

[09:15:56.301] Logging Started...
[09:16:01.070] Notion Search[Script Filter] Queuing argument ''
[09:16:01.390] Notion Search[Script Filter] Script with argv '(null)' finished
[09:16:01.393] ERROR: Notion Search[Script Filter] Code 1: Traceback (most recent call last):
  File "/Users/m/Dropbox/Documents/_assets/Alfred/Alfred.alfredpreferences/workflows/user.workflow.1EA56472-26A4-41CF-8638-BF1E7FDD254B/notion.py", line 190, in <module>
    conn.request("POST", "/api/v3/getRecentPageVisits",
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1276, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1322, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1271, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1031, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 969, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1448, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

Used to work perfectly but not now

Describe the bug
Not sure what happened, everything has been fine for months but this week when I try to perform an Alfred search it always comes back stating it finds no results.

Workflow (please complete the following information):

  • Version from July 2020

Additional context
Attempted to try to recreate cookie and Space ID headers. Unfortunately when logging into Notion on the website I can no longer find my space ID (perhaps that is the problem). Tried using browsers Firefox and Safari.

Does it work with notion-enhancer desktop?

I use notion enhancer and it seems to be incompatible with the workflow. The pages I search for will show up in Alfred. When I press enter it will re-direct me to notion enhancer but will not load the page. Does anyone know how to get around this?

Thanks anyway!

SSL Certificate verify failed

Before reporting the issue, did you ?

  • Update your notionSpaceId and cookie value in Alfred Settings. If you don't know how to do this, check this

Describe the bug
I continually get this error. I tried getting the cookie and spaceid values from 3 separate browsers. I also tried using a friends cookie and spaceid values that they have actively working on their computer and got the same error so I suspect its something with my computer and was hoping you had some ideas to troubleshoot. I'm pretty sure I have things set up correctly and not sure why it isn't working
image

Workflow (please complete the following information):

  • Version 0.4.3

Run Script is not running

When I searched with ns, there was no result. Through debug, I found that Run Script did not seem to be started.
Linux appears many times in my notes.
image

Can't get it to work!

I've tried to install this workflow but it doesn't work.

When I use alfred to search 'ns term I want to search', 'no results go to homepage' comes up, instead of successfully searching through Notion.
I have set isNagivableOnly to false and useDesktopClient to true. I have inserted the cookie and space Id values into alfred.

I am using version 0.3.3.

Workflow environmental variables

Debug info

The Problem

Alfred 3 compatibility?

Are you using any of the new Alfred 4 elements? I have Alfred 3, and it says it's not compatible. :(
Alfred Preferences 2020-05-08 13-44-57

Having "In page" Notion Quick Search Option implemented into the Notion Search Alfred Workflow ?

Hi Will @wrjlewis,

I just managed to make the workflow working after installing Command Line Tools on my Mac, and now it works like a charm ! πŸ™
I have a regular use case where i would need to search only in a specific main page/database i have, without getting "noised" by the others.

Thus, I was wondering if there is currently a way to use the workflow with an equivalent of the "In page" Quick Search option available into Notion ?
If not do you think that would be something you could do as a future improvement please ?

Maybe it could be through the setup of a new environnement variable (as you did with the "Only search titles" and the isNavigableOnly variable) ; or maybe it could be through a kind a modifier key allowing this "In (this) page" search on the one we would have selected through the regular "ns" search feature ?

What do you think about this ? Is it manageable, code wise, according to you ?

Have a good one,
D.

Setup issues

I'm unable to get this workflow to work. I had it working in the past, but I seem to be doing something wrong now.

I'm a developer - is there some way I can check logs? Also, when inputting the cookie/space-id into the alfred var, should it be quoted?

Screenshots
image

Workflow Version: 0.4.0

image

My full cookie (I replaced some of the sensitive info with <OBFUSCATED>

notion_browser_id=99fd5b<OBFUSCATED>f602f89; NEXT_LOCALE=en-US; intercom-id-gpfdrxfd=bd90d49<OBFUSCATED>490052199f; notion_experiment_device_id=8309b57b<OBFUSCATED>c946c4; notion_check_cookie_consent=false; logglytrackingsession=dbb5042a-ca7b-4279-a5db-fc86eaa6a134; notion_locale=en-US/autodetect; csrf=6becef78-c5cc-48c0-8de6-d3f28addac78; token_v2=c2ba0d5<OBFUSCATED>cf4d51e68cdf92afe5<OBFUSCATED>d58d721b64d7; notion_user_id=695eb69<OBFUSCATED>45245bfb; notion_users=[%22d<OBFUSCATED>c-bf4<OBFUSCATED>6c%22%2C%22695eb691-59<OBFUSCATED>45245bfb%22]; ajs_group_id=ce8a23ba<OBFUSCATED>e1ff4bf; ajs_anonymous_id=99fd5<OBFUSCATED>8f602f89; intercom-session-gpfdrxfd=d1NPQ<OBFUSCATED>U4MkJCUGVoUU5sc3piUT09--408a3cd<OBFUSCATED>38ffe049db43; amp_af43d4=99fd5b504c21<OBFUSCATED>602f89.Njk1ZW<OBFUSCATED>YyMmExNDUyNDViZmI=..1fr<OBFUSCATED>0.1frn4ahev.22.p.2r

Any suggestions for how I can debug this would be much appreciated!

Add full-text search support

It would be great to add word search support. So that, for example, the phrase "three black crows" finds the whole article

Not working on Alfred 3.

I am not able to use this lovely workflow on Alfred 3. Is it maybe possible to make it compatible with v3 as well?

Run script is not

Before reporting the issue, did you ?

  • Update your notionSpaceId and cookie value in Alfred Settings. If you don't know how to do this, check this

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behaviour:

  1. Type '...'
  2. Click on or press enter on '....'
  3. See error

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Workflow (please complete the following information):

  • Version [e.g. 0.3.3]

Additional context
Add any other context about the problem here.

Not working in Alfred 5 Mac M1

Before reporting the issue, did you ?

  • Update your notionSpaceId and cookie value in Alfred Settings. If you don't know how to do this, check this

Describe the bug

No results found when trying to search. I'm using the same exact configuration variables on two mac m1s same workflow version. One works the other doesn't.

image

image

To Reproduce

[19:32:09.471] Notion Search[Script Filter] Queuing argument ''
[19:32:09.625] Notion Search[Script Filter] Script with argv '(null)' finished
[19:32:09.628] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "Expecting value: line 1 column 1 (char 0)", "arg": "notion://www.notion.so/"}]}
[19:32:09.764] Notion Search[Script Filter] Queuing argument 'f'
[19:32:09.841] Notion Search[Script Filter] Queuing argument 'fo'
[19:32:09.955] Notion Search[Script Filter] Script with argv '(null)' finished
[19:32:09.957] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "Expecting value: line 1 column 1 (char 0)", "arg": "notion://www.notion.so/"}]}
[19:32:09.969] Notion Search[Script Filter] Queuing argument 'foo'
[19:32:10.062] Notion Search[Script Filter] Queuing argument 'food'
[19:32:10.090] Notion Search[Script Filter] Script with argv '(null)' finished
[19:32:10.091] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "Expecting value: line 1 column 1 (char 0)", "arg": "notion://www.notion.so/"}]}
[19:32:10.198] Notion Search[Script Filter] Script with argv '(null)' finished
[19:32:10.203] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "subtitle": "Expecting value: line 1 column 1 (char 0)", "arg": "notion://www.notion.so/"}]}
[19:32:10.998] Notion Search[Script Filter] Processing complete
[19:32:11.005] Notion Search[Script Filter] Passing output 'notion://www.notion.so/' to Open URL
[19:32:11.008] Notion Search[Script Filter] Passing output 'notion://www.notion.so/' to Run Script

Expected behaviour
Results should pop up when I start typing: "ns food".

Screenshots
If applicable, add screenshots to help explain your problem.

Workflow (please complete the following information):

  • Version [e.g. 0.4.3]

Additional context

  • Tried updating the python license reported in other bugs but it's not installed as an application. I did however try to update from cli:
/usr/bin| => pip3 install --upgrade certifi    

Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: certifi in /Users/blah/Library/Python/3.9/lib/python/site-packages (2022.9.24)

Getting an error

[08:25:31.886] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "Open Notion - No results, empty query, or error", "arg": "notion://www.notion.so/"}]}

Notion cookie is hidden

I went to the navigation tab and clicked on 'search'. Under the request headers, it only shows these
Ultimate-Tasks-for-Notion-c9cca47cffa343dcbbcf4a424afa9bf6 31-10, 20 | 12:02
I can't see any cookie, has this happened to someone else? how do I find the cookie?

Notion SVG icons are not displayed

Notion now supports svg icons for your pages and as it seems Alfred supports only image formats, so instead of displaying page icons in the search there is a default Notion logo presented.

CleanShot 2022-10-06 at 19 43 42@2x

CleanShot 2022-10-06 at 19 45 25@2x

Probably not a bug - but I've been trying to make this work for 4 hours

the closest thing I could find resembling a "notionSpaceId" was at the bottom of the "x-notion-active-user-header" at the bottom of the Request Headers - in Firefox - I started in Chrome, then Safari... sorry, no clue about API whatsoever.

Four hours of trial and error later, here's the bug report:

[00:31:25.633] Notion Search[Script Filter] Queuing argument ''
[00:31:25.711] Notion Search[Script Filter] Script with argv '(null)' finished
[00:31:25.717] ERROR: Notion Search[Script Filter] Code 127: /bin/bash: python3: command not found

please advise, this has broken me.
thanks,
Dan

Workflow error

I've been using this workflow for over a year now and it's been great, thank you for sharing it. However, it is now no longer working for me.

Describe the bug
Whenever I initiate the search I receive the following error.

Screenshot 2021-06-03 at 11 58 53

I've tried to logout and back in to Notion, restarted my computer, updated the variables.

The Error log shows the following:

panic: unable to open database file: operation not permitted

goroutine 1 [running]:
main.PanicOnErr(...)
	/Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search/main.go:406
main.main()
	/Users/sean/Dropbox (MIT)/Dotfiles/Alfred/Alfred.alfredpreferences/workflows/user.workflow.C13422B2-62E5-4A91-A8D9-65E18FA46712/search/main.go:420 +0x636
panic: unable to open database file: operation not permitted

To Reproduce
Steps to reproduce the behaviour:

  1. Type 'ns`

Workflow (please complete the following information):

  • Version 0.3.3

Opening in Notion app

Re: this tip:

If you prefer using the Mac app of Notion, just replace https://www.notion.so with notion://www.notion.so/ in the workflow script.

Where exactly in the script? In every instance of "https://www.notion.so"? Just the line beginning with "searchResultObject.link"?

#Call Notion

headers = {"Content-type": "application/json",
           "Cookie": cookie}
conn = httplib.HTTPSConnection("www.notion.so")
conn.request("POST", "/api/v3/search",
             buildNotionSearchQueryData(alfredQuery), headers)
response = conn.getresponse()
...

#Extract search results from notion response
searchResultList = []
searchResults = Payload(data)
...
	searchResultObject.link = "https://www.notion.so/" + searchResultObject.id.replace("-", "")
	searchResultList.append(searchResultObject)

...

items = {}
if not itemList:
	item = {}
	item["uid"] = 1
	item["type"] = "default"
	item["title"] = "No results - go to Notion homepage"
	item["arg"] = "https://www.notion.so/"
	itemList.append(item)
items["items"] = itemList
items_json = json.dumps(items)

sys.stdout.write(items_json)

Possible to show most recent pages when triggering the workflow?

Is your feature request related to a problem? Please describe.
No

Describe the solution you'd like
Would be great to be able to see the most recently viewed pages when first invoking the workflow similar to how quick search works in Notion.

Additional context
I often find that trying to remember the keyword to search slows things down when instead I know it was a page I was just working on.

Notion app does not launch since update

Since updating to the Alfred 5 version of this workflow the notion Mac app does not launch anymore when hitting enter on a result.
Only time it does still work is if the app is not yet launched. A really annoying bug, I miss the functionality multiple times a day and would be very grateful for a fix.

Kindest regards and thanks for your work

No result display and show back

[15:14:46.398] Logging Started...
[15:14:49.237] Notion Search[Script Filter] Queuing argument ''
[15:14:52.429] Notion Search[Script Filter] Script with argv '(null)' finished
[15:14:52.434] Notion Search[Script Filter] {"items": [{"uid": 1, "type": "default", "title": "There was an error:", "subtitle": "245: [Errno 9] Bad file descriptor", "arg": "https://www.notion.so/"}]}

Unable to load libxcrun

The Notion search command has stopped working all of a sudden, not quite sure why..

Here's what the log output tells me:

[19:06:17.051] Notion Search[Script Filter] Queuing argument ''
[19:06:17.118] Notion Search[Script Filter] Script with argv '(null)' finished
[19:06:17.120] ERROR: Notion Search[Script Filter] Code 1: xcrun: error: unable to load libxcrun (dlopen(/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib, 0x0005): tried: '/Library/Developer/CommandLineTools/usr/lib/libxcrun.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/libxcrun.dylib' (no such file)).

Cookie doesn’t seem to work for me

Hi there,

This seems like a handy idea. I’ve just spent a significant amount of time trying to get it to work, and I still have yet to get more than "No results - go to Notion homepage."

I really feel like I'm using the proper "search" cookie (See below... I cropped it to a point where I don't think there's anything personally identifiable, but you get the point):

Cookie?

I've tried grabbing it from Safari and Chrome and Firefox (my default browser). And none of them work.

So I'm a little stumped. Any ideas about what I might be doing wrong?

Thanks for your work on this and for making it available.

search by text

Using search in notion, you can directly search for relevant keywords, even if keywords can be searched in the article, but it seems that you can only search for the title of the article with this workflow at present, but it can't match the content of the article. I hope this function can be added. Maybe this can directly call the search interface in note?

Here is an automatic way to at least get `notion_browser_id` and such from the cookies

  1. Log in to Notion using Safari.
  2. Install binarycookies cli tool with go get github.com/cixtor/binarycookies/cmd/binarycookies
  3. Decode the resultant cookie and extract what we need binarycookies ~/Library/Cookies/Cookies.binarycookies|grep -i '.notion.so'|awk '{print $5, $6}'

The .binarycookie format is reverse engineered over at the repo mentioned above.
It should be straight forward to programmatically extract the needed parts automatically.
Then, either use some library to decode the embedded binary plist, or fork out to the shell and use the plutil or PListBuddy tools already bundled with macOS.

For the part where we need the spaceID (do we really need it? Is not the tokenv2 enough?) I'm now looking into using httpie and a https request with the output of the above.

I'd like to fix some conditions.

Thank you for the script. I could save the time with debugging.
While using this workflow, I thought it's little bit slow and found some bugs.
If you don't mind, I'd like to pr some code.

Find a way to handle custom page icons

Background

For pages using default emojis for the page icon, the emoji is displayed appropriately in the search results.
When a page uses a custom icon, the icon's URL is displayed, which can be ugly and distracting while sifting through results.


Examples

A result for a page using a default emoji:

image

Results with custom page icons, displaying long URLs:

image


Implementation Ideas

Overriding the Default Workflow Icon
If the workflow is able to identify that a page uses a custom icon, maybe it can read that URL, and use i as the result icon, overriding the default Notion icon? I use an IMDB workflow that utilizes the Movie artwork as result icons, so maybe it's doable? Although that might slow things down significantly, as I believe it downloads the images locally and keeps them in a temp folder.

Here's an example of the IMDB workflow's results:
image

Ignoring Custom Icons

If there isn't an efficient and simple way to handle this, but it's still able to be identified as a custom icon- maybe it would be best to simply hide the URLs of custom icons.


Goal

It would be great if some logic could be added to the workflow so it could handle custom icons in a sensible manner.


Thanks!

Notion Search not working

Before reporting the issue, did you ?

  • Update your notionSpaceId and cookie value in Alfred Settings. If you don't know how to do this, check this
  • Yes, the notionSpaceId and Cookie are up to date.

Describe the bug
CleanShot 2022-09-15 at 19 24 43

Pleas check the attached .gif-file. The notion search does not properly load.

To Reproduce
Steps to reproduce the behaviour:
Variation 1:

  1. Toggle Alfred
  2. Type 'ns' > nothing happens

Variation 2:

  1. Toggle Alfred
  2. Type 'n' > 'Notion Search' comes up in the suggestions
  3. click on 'Notion Search' in the suggestions > nothing happens

Expected behaviour
The Notion search should work and get me some results from my Notion workspace.

Screenshots
Same .gif as above:
CleanShot 2022-09-15 at 19 24 43

Bug Report
Bugreport.txt

Workflow (please complete the following information):

  • Version v0.4.2.

Additional context
Information about my MacBook:
Model: MacBook Air M2 (2022)
System Version: macOS 12.6 (21G115)

Notion Search seems not working...... ( it worked for the first few times)

Describe the bug
I've followed through the process by README.md and filled up my cookie and notionSpaceId, it worked the first few times but didn't work a few days later. ( I didn't change any variables.) (I'm running on macOS Catalina 10.15.6.)

To Reproduce
Steps to reproduce the behaviour:

  1. Type 'no' and the keyword I wanna search (I've changed the workflow keyword to "no").
  2. No result is showing, when I pressed ↡ enter, it didn't show anything
  3. Didn't find any error in the debug mode.

Expected behaviour
A few days ago, the search result showed properly but a bit slow. However, another day later the searching seems not yet working since then. (I didn't change any variables further.)

Screenshots
The searching command:
Screen Shot 2021-03-20 at 3 05 35 PM
My variables:
Screen Shot 2021-03-20 at 3 06 30 PM
The debug: (no error)
image

Workflow (please complete the following information):

  • Version 0.3.3

Additional context
Add any other context about the problem here.

Any way to allow search through all my workspaces?

I was wondering if it would be possible to somehow allow the search to search through all the workspaces I am a part of, I'm not sure how difficult this would be to add.

Amazing workflow, by the way, great work!

The workflow doesn't seem to support text in the search table yet

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

The error "xcrun: error" is output

The following error occurs when trying to use it.
What should I do?

=== log ====
[7:55:49.508 PM] Notion Search[Script Filter] Queuing argument ''
[7:55:49.515 PM] Notion Search[Script Filter] Script with argv '(null)' finished
[7:55:49.517 PM] ERROR: Notion Search[Script Filter] Code 1: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

unicode encording problem.

hi.

I'm a Koren user.
use Korean it dose not working
it always returns "no result"
(I have checked it works with English)

So I did my homework then I think I found out the problem.
here is the key.
unicode on Mac use "NFD"
So I type on Alfred "ν•œκΈ€" but the query string is "γ…Žγ…γ„΄γ„±γ…‘γ„Ή"
I think that makes "no result".

Could you check this?

unicodedata.normalize('NFC',alfredQuery)

I have tried code like this.
but this error come out TypeError: normalize() argument 2 must be unicode, not str

Breadcrumb Separator

I'd love to see a separator for the breadcrumbs under a search result.

Currently, I'm only seeing spaces in between the pages in the hierarchy, which gets confusing when there are spaces in the page names.

So Instead of:

Business Knowledge Article Name

The breadcrumbs would read as

Business > Knowledge > Article Name

Love the Workflow! Much thanks.

Add Support to Open Search Results in New Window (Notion for MacOS)

Is your feature request related to a problem? Please describe.
I constantly have multiple Notion windows open at the same time, but when i usw the ns alfred workflow, the selected result is opened in the most recently used Notion window (which is typically a notion page I want open). It would be great to have the ability to open search results in a new tab or window so that they can be complementary to the existing open tabs.

Describe the solution you'd like
The ideal solution would add another Workflow Environment Variable that is a boolean (e.g. openResultInNewWindow) that can be set by the user. When the user sets this to True, the search result selected would open a new window in the Notion Mac app.

Describe alternatives you've considered
This request, of course, works out of the box when useDesktopClient is set to false, but I much prefer the Notion Mac app.

Additional context
Thank you SO much for the workflow, it's already been such a productivity hack and a timesaver, so thank you!!

Possible search API specification change

Before reporting the issue, did you ?

  • Update your notionSpaceId and cookie value in Alfred Settings. If you don't know how to do this, check this

Describe the bug
I noticed that the workflow stopped working with a {query} argument a couple of days ago. I assume notion.py may need to be changed in accordance with the new search API spec.

Screenshots
image
image

Workflow (please complete the following information):

  • Version
    0.4.1

Python processes uses 300% of my CPU on version 0.5 (intel Mac)

I had updated to the new version 0.5 and when searching I get three Python processes started on my machine with each use 90% of my CPU, also Alfred jumps to around 100% CPU and my laptop will sound like an apache helicopter 🚁. No search results will pop up. I've just downgraded to 0.4.3 and evrything works fine over there.

Alfred 5.0.5

macOS Monterey
Version 12.6 (21G115)
MacBook Pro (15-inch, 2017)
Processor 3,1 GHz Quad-Core Intel Core i7
Memory 16 GB 2133 MHz LPDDR3
Graphics Intel HD Graphics 630 1536 MB

"notion search option" disappears from Alfred

Describe the bug

Video attached below.
It seems that notion search option has disappeared from Alfred since I installed the MacOS 13 several days ago.
(I'am not sure whether the issue is caused by the system update, but the workflows can work weeks ago.)

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots
https://user-images.githubusercontent.com/43163254/200157671-c9ceb062-f440-483a-b9a9-a0fa80cbb9b7.mp4

Workflow

  • Version [e.g. 0.4.3]

MacBook Air (M1 2020); macOS-Version 13.0

Bookmarks

Is it possible in the future to open url (property) that is specified inside pages? Or use search in other fields of the database.

For example, I use Notion as a bookmark manager and sometimes it is more convenient to immediately open an external url so as not to go to a page in Notion.

I would suggest adding a command key for this. By default, the page will open, and when you enter the command key, the URL inside the page would open. Something similar is implemented in Raindrop.app.

Setup
Database Bookmarks (column url)
text

Bookmark the article How to Create Your First Relational Database in Notion
text

  1. Search Pages in Notion and click with key ⌘

text

  1. Open URL article in Safari

text

Ability to cache previous searches

Is your feature request related to a problem? Please describe.
I often find myself searching for the same page several times throughout the day(s). Having to fire off a new search every time slows things down a little.

Describe the solution you'd like
The ability to cache previously retrieved results would speed up things tremendously and remove the 1-3s to fetch results. Additionally, I feel like the pages themselves are relatively stable and don't change that much e.g. renaming / moving

Thx!

Notion Search fails after typing 'ns' in alfred

Describe the bug
The plugin was working really well, but since some days (I don't know precisely), when I type 'ns' to do my search, the plugin activate briefly then disapear and I can't search

Expected behaviour
I expect to conitnue typing and see my search result.

Screenshots
NA

Workflow (please complete the following information):

  • Version 0.4.1

Additional context
I've got the following logs

[10:07:44.070] Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Queuing argument ''
[10:07:44.581] Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Script with argv '(null)' finished
[10:07:44.590] ERROR: Notion Search[[Script Filter](alfredpreferences:workflows%3Eworkflow%3Euser.workflow.382DF0A1-FB1C-46FA-8F66-6129049B2874%3E7DD3BDE5-A157-42E5-9376-F681FB50A4EE)] Code 1: Traceback (most recent call last):
  File "notion.py", line 198, in <module>
    for x in searchResults.pages:
AttributeError: 'Payload' object has no attribute 'pages'

"No results - go to Notion homepage" after fresh install

Describe the bug
Hi, I followed the steps from the readme: installed the workflow, copied my pageId and cookie from the request body and request headers, pasted into the workflow config in Alfred, but when I try to search something I get "No results - go to Notion homepage".
enableIcons is set to True, just like isNavigableOnly and useDesktopClient.

To Reproduce
Steps to reproduce the behaviour:

  1. Follow the steps in the readme.

Expected behaviour
Search results popping up.

Screenshots
image

Workflow (please complete the following information):

  • Version [e.g. 0.3.3]

Additional context
Add any other context about the problem here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.