|
| 1 | +{ |
| 2 | + "name": "pageComments", |
| 3 | + "displayName": "Page Comments", |
| 4 | + "description": "Comments and discussion threads on a single Notion page", |
| 5 | + "tags": ["Comments"], |
| 6 | + "baseDataSourceName": "httpRequestScopedSingle", |
| 7 | + "config": { |
| 8 | + "httpMethod": "get", |
| 9 | + "endpointPath": "comments", |
| 10 | + "getArgs": [ |
| 11 | + { "key": "block_id", "value": "{{object.rawId}}" } |
| 12 | + ], |
| 13 | + "postRequestScript": "pageComments.js", |
| 14 | + "paging": { |
| 15 | + "mode": "token", |
| 16 | + "pageSize": { "realm": "queryArg", "path": "page_size", "value": "100" }, |
| 17 | + "in": { "realm": "payload", "path": "next_cursor" }, |
| 18 | + "out": { "realm": "queryArg", "path": "start_cursor" } |
| 19 | + }, |
| 20 | + "errorHandling": { |
| 21 | + "type": "script", |
| 22 | + "script": "result = response.status === 403 ? 'Notion did not grant the Read comments capability. Enable \"Read comments\" on your Notion integration, then reconnect the plugin in SquaredUp.' : ((data && data.message) || ('Notion comments API returned status ' + response.status));" |
| 23 | + } |
| 24 | + }, |
| 25 | + "matches": { |
| 26 | + "sourceType": { "type": "oneOf", "values": ["Notion Page"] } |
| 27 | + }, |
| 28 | + "metadata": [ |
| 29 | + { "name": "id", "displayName": "ID", "shape": "string", "visible": false }, |
| 30 | + { "name": "createdTime", "displayName": "Created", "shape": "date" }, |
| 31 | + { "name": "text", "displayName": "Comment", "shape": "string", "role": "label" }, |
| 32 | + { "name": "createdById", "displayName": "Created By ID", "shape": "string", "visible": false }, |
| 33 | + { |
| 34 | + "name": "author", |
| 35 | + "displayName": "Author", |
| 36 | + "sourceId": "createdById", |
| 37 | + "sourceType": "Notion User", |
| 38 | + "objectPropertyPath": "name" |
| 39 | + } |
| 40 | + ], |
| 41 | + "timeframes": false |
| 42 | +} |
0 commit comments