PromptDocker icon

PromptDocker

Interact with PromptDocker API to manage and use prompts

Get Prompt

AI-generated

Overview

The node "PromptDocker" integrates with the PromptDocker API to manage and use text prompts. It supports operations such as listing all available prompts, retrieving details of a specific prompt by its ID, and using a prompt template by substituting variables with user-provided values.

This node is beneficial in scenarios where you want to automate or programmatically interact with prompt templates stored in PromptDocker, for example:

  • Fetching a list of prompts to display or process further.
  • Retrieving detailed information about a particular prompt for review or editing.
  • Using a prompt template dynamically by replacing placeholders with actual content before sending it to an AI service or other processing steps.

Practical example: You have a collection of marketing email templates stored as prompts. You can use this node to fetch a specific template and replace variables like {{customer_name}} or {{product_name}} with real data before sending personalized emails.

Properties

Name Meaning
Operation The action to perform. Options: List Prompts, Get Prompt, Use Prompt
Prompt ID The ID of the prompt to retrieve (used when Operation is "Get Prompt")

Note: For the "Use Prompt" operation, additional properties exist but are outside the scope since only "Get Prompt" operation was requested.

Output

The output JSON structure for the "Get Prompt" operation contains the details of the requested prompt as returned by the PromptDocker API. Typically, it includes fields such as:

  • id: The unique identifier of the prompt.
  • name: The name/title of the prompt.
  • content: The full content/text of the prompt.

If an error occurs (e.g., prompt not found), the output JSON will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential to authenticate with the PromptDocker API.
  • The node makes HTTP GET requests to the PromptDocker API endpoints.
  • The base URL and API key must be configured in the node's credentials.

Troubleshooting

  • Common issues:

    • Invalid or missing Prompt ID: The node requires a valid prompt ID to retrieve prompt details.
    • Authentication errors: Ensure the API key credential is correctly set up and has necessary permissions.
    • Network or API availability issues: The node depends on external API availability; network problems may cause failures.
  • Error messages:

    • "Prompt not found or has no content": Returned if the specified prompt ID does not exist or the prompt content is empty.
    • HTTP request errors: May occur due to invalid credentials or connectivity issues; check API key and network.
  • Resolution tips:

    • Verify the prompt ID exists in your PromptDocker workspace.
    • Confirm API key validity and permissions.
    • Check network connectivity and API endpoint accessibility.

Links and References

Discussion