Cosense icon

Cosense

Read and write pages in Cosense (formerly Scrapbox)

Overview

This node interacts with Cosense (formerly Scrapbox) to retrieve a specific snapshot of a page within a project. The "Get Snapshot" operation fetches the content of a page at a particular point in time, identified by a timestamp ID. This is useful for scenarios where you need to access historical versions of a page, such as auditing changes, restoring previous content, or comparing different versions.

Practical examples:

  • Retrieving a backup of a page before recent edits.
  • Displaying a timeline of changes by fetching snapshots at various timestamps.
  • Integrating with version control workflows to review past states of documentation or notes.

Properties

Name Meaning
Project Name The name of your Cosense/Scrapbox project where the page resides.
Page Title The title of the page from which to get the snapshot.
Timestamp ID The unique identifier of the snapshot timestamp to retrieve the specific version of the page.

Output

The output is a JSON object representing the snapshot data of the specified page at the given timestamp. The exact structure depends on the API response but typically includes the page content and metadata corresponding to that snapshot.

If multiple items are processed, each output item corresponds to one snapshot retrieval.

No binary data output is involved in this operation.

Dependencies

  • Requires an API key credential for authenticating with the Cosense API.
  • The node uses an internal API client to communicate with Cosense endpoints.
  • Proper configuration of the API credential in n8n is necessary for successful requests.

Troubleshooting

  • Common issues:

    • Invalid or missing API credentials will cause authentication failures.
    • Incorrect project name or page title may result in "page not found" errors.
    • An invalid or expired timestamp ID will cause the snapshot retrieval to fail.
  • Error messages and resolutions:

    • "Page not found": Verify the project name and page title are correct.
    • "Invalid timestamp ID" or "Snapshot not found": Confirm the timestamp ID corresponds to an existing snapshot for the page.
    • Authentication errors: Ensure the API key credential is correctly set up and has sufficient permissions.

Links and References

Discussion