Actions22
Overview
This node integrates with the BookStack platform to manage its resources programmatically. Specifically, for the Page - Get Many operation, it retrieves multiple pages from BookStack based on user-defined criteria such as sorting, filtering, pagination (count and offset). This is useful when you want to fetch a list of pages for reporting, synchronization, or bulk processing.
Practical examples include:
- Fetching all pages sorted by creation date in descending order.
- Retrieving pages that match specific filters, e.g., pages with a certain tag or created after a particular date.
- Paginating through large sets of pages by specifying count and offset.
Properties
| Name | Meaning |
|---|---|
| Sort By | Field to sort the results by (e.g., name, created_at, updated_at). |
| Sort Direction | Direction of sorting: "Ascending" or "Descending". |
| Filters | One or more filters to apply on fields. Each filter includes: |
| - Field: The field name to filter on. | |
| - Operation: Comparison operator (Equals, Greater Than, Greater Than or Equals, Less Than, Less Than or Equals, Like, Not Equals). | |
| - Value: The value to compare against. | |
| Count | Maximum number of results to return (minimum 1, maximum 500). |
| Offset | Number of results to skip before starting to return results (for pagination). |
Output
The output is an array of JSON objects representing the pages retrieved from BookStack. Each object corresponds to a page resource with its properties as returned by the BookStack API.
- The
jsonfield contains the page data. - There is no binary data output for this operation.
Example output structure (simplified):
[
{
"id": 123,
"name": "Sample Page",
"html": "<p>Content</p>",
"book_id": 45,
"chapter_id": null,
"tags": ["tag1", "tag2"],
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-02T12:00:00Z"
},
...
]
Dependencies
- Requires connection to a BookStack instance via an API key credential.
- The node uses HTTP requests to the BookStack REST API endpoints.
- No additional external services are required beyond BookStack itself.
- Ensure the API credentials have sufficient permissions to read page data.
Troubleshooting
Common issues:
- Invalid or missing API credentials will cause authentication errors.
- Using unsupported filter fields or operations may result in API errors.
- Requesting too many results (above 500) will be rejected; keep count ≤ 500.
- Providing neither
book_idnorchapter_idwhen creating pages (not relevant here but related) causes validation errors.
Error messages:
"Either book_id or chapter_id must be provided when creating a page"— occurs only during page creation, not get many.- API error messages from BookStack will be propagated; check the message for details.
- Network or connectivity errors should be checked by verifying endpoint URL and network access.
Resolution tips:
- Verify API credentials and permissions.
- Use valid field names and operations in filters.
- Limit count to 500 or fewer.
- Check BookStack API documentation for supported query parameters.
Links and References
- BookStack Official API Documentation
- BookStack GitHub Repository
- n8n Documentation on Creating Custom Nodes