wrjlewis / notion-search-alfred5-workflow

An Alfred5 workflow to search Notion with instant results
GNU General Public License v3.0
72 stars 3 forks source link

Bug Notion Search #4

Closed FantomasRx closed 1 year ago

FantomasRx commented 1 year ago

Before reporting the issue, did you ?

I did it

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

Setup info Workflow name: Notion Search Workflow version: v.0.5.1-alfred5 Alfred version: 5.05 macOS version: 13.0.1 Architecture: (Intel or Apple Silicon) Intel Description of issue Hello Vitor,

I used 3 browsers Chrome firefox and safari and didn't find "spaceId" so I used "notionuser id" I found "notion_browser_id" for cookie

I put those data in "configure workflow" as requested and in [x] in respective defalt value

The workflow doesn't work

Can you tell me where I made a mistake

Thank you

Best regards,

Romaric

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. 2 in attachement

Workflow (please complete the following information):

Additional context Add any other context about the problem here.

205461040-7ea3cee6-fa48-44d9-91a0-4849411bc033 205461046-c9d81bbd-1a15-4bea-9c4a-e3223ed9c077

wrjlewis commented 1 year ago

HI

Your cookie and space id are not the correct values, because the notion_browser_id and notion_user_id that you're using are different identifiers and not the same.

Have you gone through the readme step by step? There is explains where to find the correct values. You need to use notion quick search in the web app, try searching for something, and the values you need will be in the 'search' request.

FantomasRx commented 1 year ago

Hello,

This time, I did it the right way. I found cookie and spaceId with "search" on Notion I had this value in configure Workflow and [x] but unfortunately that doesn't work. I don't know why

wrjlewis commented 1 year ago

So you've updated both cookie and space id to the correct figures, and still not getting anything when you type 'ns [query]'?

If you click the bug icon in the top right of the workflow page in Alfred, what do you get in the debugger when you try to search?

FantomasRx commented 1 year ago

Screenshot 2022-12-05 at 21 34 15

I have this error message

wrjlewis commented 1 year ago

Thanks, does that change at all when you actually try to type something after ns?

Also what is in this section here:

Screenshot 2022-12-05 at 20 57 02
FantomasRx commented 1 year ago

Screenshot 2022-12-06 at 06 47 57 Screenshot 2022-12-06 at 06 48 38 Screenshot 2022-12-06 at 06 48 46

FantomasRx commented 1 year ago

Update for installing cairosvg (optional) people should have install python too https://www.python.org/downloads/release/python-3110/

wrjlewis commented 1 year ago

Definitely looks like an issue with the cookie and space id, I would try again. Make sure the cookie contains a token_v2= value in there somewhere to confirm you're copying the right thing. Some people have had success by copying the values to a notepad first, then copy and pasting from there into Alfred.

FantomasRx commented 1 year ago

Thank you for your help. It works.

  1. So first install Python https://www.python.org/downloads/release/python-3110/
  2. Go in Python application folder to install certificate (double-click) -> screenshot
  3. Open Notion in Chrome and login
  4. Open Chrome inspector (mouse right click -> Inspect)
  5. Tape "Search" in Notion quick Search
  6. Look [Network - headers] in Chrome inspector (Gif above)
  7. Copy past Cookie value in Text edit
  8. Isolate Token_v2="value Token_v2"
  9. Past only "value Token_v2" in Cookie Alfred configure Workflow
  10. Same thing for spaceId (-> [Network - Payload]
  11. It works -> screenshot

Screenshot 2022-12-06 at 16 21 21 Screenshot 2022-12-06 at 16 31 12

wrjlewis commented 1 year ago

Just to say you should not have to isolate the token_v2 figure, but I'm glad it is working none the less.