Cosense icon

Cosense

Read and write pages in Cosense (formerly Scrapbox)

Overview

This node interacts with Cosense (formerly Scrapbox) to read and write page data within projects. Specifically, the "Get Table" operation under the "Page" resource retrieves table data from a specified page in CSV format. This is useful when you want to extract structured tabular data stored as files on a Cosense page for further processing or integration.

Practical examples include:

  • Extracting a CSV table embedded in a project page to analyze it externally.
  • Automating data retrieval workflows where tables are maintained inside Cosense pages.
  • Integrating Cosense project data with other systems by exporting tables programmatically.

Properties

Name Meaning
Project Name The name of your Cosense/Scrapbox project from which to retrieve the page's table data.
Page Title The title of the page containing the table file to get.
Table Filename The filename of the table (without the .csv extension) to retrieve from the page.

Output

The output JSON contains the table data retrieved from the specified page and filename. It is expected to be the content of the CSV table file as returned by the Cosense API client.

  • The json output field will hold the parsed or raw table data corresponding to the requested CSV file.
  • There is no binary data output for this operation; all data is returned as JSON.

Example output structure (conceptual):

{
  "filename": "table1",
  "content": "CSV content as string or parsed array"
}

Dependencies

  • Requires an API key credential for authenticating with the Cosense API.
  • The node depends on the bundled CosenseApiClient class to communicate with the Cosense service.
  • No additional external dependencies beyond the Cosense API and its authentication.

Troubleshooting

  • Common issues:

    • Incorrect project name or page title may result in empty or error responses.
    • Specifying a non-existent table filename will likely cause the API to return an error or empty data.
    • Missing or invalid API credentials will prevent successful API calls.
  • Error messages:

    • Errors related to authorization typically indicate missing or invalid API keys.
    • "Page not found" or similar errors suggest incorrect project or page identifiers.
    • Parsing errors might occur if the table file content is malformed or not in expected CSV format.
  • Resolutions:

    • Verify that the project name and page title exactly match those in Cosense.
    • Confirm the table filename exists on the page without the .csv extension.
    • Ensure valid API credentials are configured in n8n for the Cosense connection.

Links and References

Discussion