bookoly icon

bookoly

Interact with the bookoly API

Overview

This node integrates with the Bookoly API to generate subtitle files for video content. Specifically, the "Generate a Subtitle File" operation under the "File" resource allows users to create subtitle files in the ASS (Advanced SubStation Alpha) format with customizable styles, fonts, colors, positioning, and language.

Common scenarios where this node is beneficial include:

  • Automatically generating styled subtitles for videos hosted online.
  • Enhancing accessibility by providing subtitles in multiple languages.
  • Customizing subtitle appearance to match branding or aesthetic preferences.
  • Integrating subtitle generation into automated video processing workflows.

For example, a user can input a public URL of a video and specify subtitle styling options such as font family, size, color, and position. The node then generates a subtitle file that can be downloaded or embedded in the video player.

Properties

Name Meaning
Name The name of the subtitle file to be generated.
URL The publicly accessible and downloadable URL of the video file for which subtitles are to be generated.
Type The subtitle file format. Currently, only "Advanced SubStation Alpha (ASS)" is supported.
Subtitle - Style The visual style of the subtitles. Options include Simple, Signal, Rainbow, Highlight Current Word (default), Signal Highlight Current Word, and Rainbow Highlight Current Word.
Subtitle - Language The language code for the subtitles, e.g., English (en), Spanish (es), French (fr), etc. A wide range of languages is supported.
Subtitle - Font Family The font family used for the subtitle text. Options include Arial, Charm, Eagle Lake, Libre Baskerville, Lobster, Luckiest Guy (default), Marck Script, Nanum Pen Script, Nunito, Pacifico, Roboto, Korean variants, and Chinese variants.
Subtitle - Font Size The font size for the subtitle text, ranging from 1 to 100. Default is 20.
Subtitle - Word Color The color of the subtitle words specified as a HEX color code, e.g., #FEEE15 for yellow.
Subtitle - Line Color The color of the subtitle lines specified as a HEX color code, e.g., #FFFFFF for white.
Subtitle - Line Words Number of words displayed at a time in the subtitle line. Minimum is 1, maximum is 10. Default is 4.
Subtitle - Outline Width The width of the outline around subtitle text. Ranges from 1 to 100. Default is 5.
Subtitle - Position The position on the video screen where subtitles appear. Options include Top Left, Top Center, Top Right, Center Left, Center Center, Center Right, Bottom Left, Bottom Center (default), Bottom Right, Mid Top Center, Mid Bottom Center.
Subtitle - Orientation Text orientation of the subtitles: Left to Right (default) or Right to Left.
Wait for Completion If enabled (true), the node waits until the subtitle file generation is complete before returning the full subtitle file object. If disabled (false), it returns only the ID and creation timestamp immediately.
Webhook URL Optional URL to receive webhook notifications about subtitle file generation status, including the subtitle file ID and URL.

Output

The node outputs JSON data representing the result of the subtitle file generation request. Depending on the "Wait for Completion" property:

  • If waiting is enabled, the output includes the full subtitle file object with details such as the file URL, metadata, and timestamps once generation is complete.
  • If waiting is disabled, the output contains only the subtitle file ID and creation timestamp, allowing asynchronous handling.

The node does not output binary data directly but provides URLs to download the generated subtitle files.

Dependencies

  • Requires an active connection to the Bookoly API service.
  • Needs an API authentication token configured in n8n credentials to authorize requests.
  • The video file must be accessible via a public and downloadable URL.
  • Optional webhook URL can be provided to receive asynchronous notifications.

Troubleshooting

  • Common Issues:

    • Invalid or inaccessible video URL: Ensure the video URL is publicly accessible and downloadable.
    • Missing or invalid API credentials: Verify that the API key or token is correctly set up in n8n.
    • Unsupported subtitle type: Currently, only ASS format is supported; selecting other formats may cause errors.
    • Network connectivity issues with the Bookoly API endpoint.
  • Error Messages:

    • "No handler found for file.generateSubtitleFile": Indicates the operation or resource is not recognized; check configuration.
    • "Failed to execute generateSubtitleFile: <error message>": General failure during execution; review error details for specifics.
    • Timeout or webhook delivery failures if webhook URL is incorrect or unreachable.
  • Resolutions:

    • Double-check all input parameters for correctness.
    • Confirm API credentials and permissions.
    • Test video URL accessibility independently.
    • Use the "Wait for Completion" option to simplify synchronous processing or use webhooks for async handling.

Links and References

Discussion