1001fx - NoCode functions icon

1001fx - NoCode functions

1001fx is a set of functions for any automation platform. Our functions are simple, very well tested, scalable and offer features that most automation platforms do not offer.

Actions74

images → Convert Texts to an Image

AI-generated

Overview

This node converts one or more text elements into an image, allowing you to specify the background color, dimensions, and detailed formatting for each text block (such as position, alignment, font size, and color). It is useful in scenarios where you need to dynamically generate images with custom text overlays, such as creating certificates, badges, social media graphics, or personalized banners.

Practical examples:

  • Generating event tickets with attendee names.
  • Creating dynamic promotional images with variable offers.
  • Producing certificates with participant details.

Properties

Name Meaning
Background color The image background color. If left empty, the background will be transparent.
Width The width of the generated image (required; range: 1–10,000 pixels).
Height The height of the generated image (required; range: 1–10,000 pixels).
Texts Input Mode Choose how to provide the texts:
- Expression: Supply a JSON array via expression.
- Manual: Enter texts manually using a form.
Texts (Expression) Data to be displayed, provided as a JSON array when "Texts Input Mode" is set to Expression. Each entry should define text content and its properties.
Texts (Manual) Data to be displayed, entered manually as a collection. For each text element, you can specify:
• Text
• X coordinate
• Y coordinate
• Maximum width/height
• Alignment (X/Y)
• Font size
• Text color
Binary Property Name of the binary property to which the generated image will be written (required; default: data).

Manual Text Entry Options

For each text item:

  • Text: The text to print.
  • X coordinate: Horizontal position from the top-left corner.
  • Y coordinate: Vertical position from the top-left corner.
  • Maximum width: Max width for the text area.
  • Maximum height: Max height for the text area.
  • Horizontal alignment: left, center, or right (default: left).
  • Vertical alignment: top, middle, or bottom (default: top).
  • Font size: 8, 16, 32, 64, 128, or auto (default: auto).
  • Text color: Color of the text (default: #000000).

Output

  • The node outputs a binary property (default name: data) containing the generated image file.
  • The output also includes the original input JSON data.
  • The binary property contains the image in the format specified by the API response (e.g., PNG, JPEG).

Example output structure:

{
  "json": { /* original input fields */ },
  "binary": {
    "data": {
      "data": "<base64-encoded image>",
      "fileName": "generated-image.png",
      "mimeType": "image/png"
    }
  }
}

Dependencies

  • External Service: Requires access to the 1001fx API.
  • API Key: You must configure the 1001fxApi credential in n8n.
  • Environment: No additional environment variables are required beyond standard n8n setup.

Troubleshooting

Common issues:

  • Invalid image dimensions: Ensure that width and height are within the allowed range (1–10,000).
  • Missing or invalid texts: At least one text entry must be provided; check your input mode and data format.
  • Authentication errors: Make sure your 1001fxApi credentials are correctly configured.
  • Output not found: If the binary property name does not match what you expect, verify the "Binary Property" field.

Error messages:

  • "error": "Request failed with status code 401" — Check your API key configuration.
  • "error": "Invalid input data" — Review your text entries and image settings.
  • "error": "Image generation failed" — The API may have rejected the request due to unsupported parameters.

Links and References

Discussion