omnivore-app / omnivore

Omnivore is a complete, open source read-it-later solution for people who like reading.
https://omnivore.app
GNU Affero General Public License v3.0
12.8k stars 644 forks source link

SetLabelsForHighlight API in webhook Action get 'Unexpected server error' #4385

Open saccohuo opened 4 weeks ago

saccohuo commented 4 weeks ago

Hi, I am using webhook to add label when a highlight is created, and deploy it to Vercel. I get 'Unexpected server error' when using SetLabelsForHighlight API to set label for highlight. My request is as follows, is there something wrong here?

设置高亮标签请求内容: {
  "query": "mutation SetLabelsForHighlight($input: SetLabelsForHighlightInput!) {\n        setLabelsForHighlight(input: $input) {\n          ... on SetLabelsForHighlightSuccess {\n            highlight {\n              id\n              labels {\n                id\n                name\n                color\n              }\n            }\n          }\n          ... on SetLabelsForHighlightError {\n            errorCodes\n          }\n        }\n      }",
  "variables": {
    "input": {
      "highlightId": "88cd6df1-0c6e-4782-84e7-9f2b687fda59",
      "labelIds": [
        "26f474f8-78c7-11ef-a3df-4f419eaf1a83"
      ]
    }
  }
}

BTW, in the same webhook, the label can be created successfully, but the label cannot be added to highlight.

saccohuo commented 2 weeks ago

Or, could you add a variable to get highlightId when export to Logseq?