Last active
October 26, 2023 16:19
-
-
Save DV8FromTheWorld/b8715523cbb6cdbc935438f0a19300fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
copy(temp1.error.data.requestBody.transactions[0].operations | |
.filter(operation => operation.command === 'set' && Array.isArray(operation.args) && operation.args.length !== 0) | |
.map(operation => operation.args.flatMap(arg => Array.isArray(arg) ? arg[0] : arg).join('')) | |
.join('\n')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script is for recovering comments posted on notion that, upon submitting, notion instantly deletes.
This is often because some portion of posting it is failed by the server, likely due to notion thinking you're modifying a document that you don't have permissions to modify when commenting. This most often happens on pages where you have permission to comment but not edit.
You must do so before refreshing the page
If you have already refreshed, it is too late. I'm sorry.
How to use
1. Open the console
2. There will be errors. Scroll up until you find a ClientTransactionError
3. Expand the
▶ Object
4. Expand
▶ error
until you can seemiscErrorString
This string is a JSON object containing the entire details of the request and failure. It will contain all the data we need.
5. Double click the
miscErrorString
's content so that it is highlighted.Copy the content.
6. Paste the content into the console.
This content has a leading
"
and a trailing"
that you will need to remove7. Make into a variable
After that, put
const temp1 =
in front of the object and press[enter]
to save the variable8. Now you can run the code snippet above
Something to note is that the beginning of the recovered text will contain the bit of the notion doc that you had highlighted that you were commenting on. Be sure to remove that part!