Telegramify Markdown icon

Telegramify Markdown

Telegramify Markdown

Overview

This node converts input text into Telegram-compatible Markdown format. It is useful when you want to prepare text content for sending via Telegram bots or APIs, ensuring that the formatting adheres to Telegram's Markdown rules. For example, it can transform standard Markdown or other markup styles into a version that Telegram supports, handling unsupported tags according to user preference.

Common scenarios include:

  • Formatting messages dynamically before sending them through a Telegram bot.
  • Converting rich text inputs into Telegram-friendly markdown for chatbots.
  • Sanitizing or escaping unsupported markdown tags in user-generated content.

Properties

Name Meaning
Text The input text string to convert into Telegram Markdown. This can be static text or an expression referencing previous node data.
Output Field The name of the field in the output JSON where the converted Telegram Markdown text will be stored.
Escape Mode Strategy for handling unsupported tags in the input text. Options are:
Escape: Escape unsupported symbols.
Remove: Remove unsupported tags (default).
Keep: Leave unsupported tags as-is.

Output

The node outputs the original input data with an additional field (as specified by the "Output Field" property) containing the converted Telegram Markdown text. The output JSON structure includes all original fields plus this new field holding the transformed text.

No binary data is produced by this node.

Example output snippet:

{
  "json": {
    "originalField1": "value1",
    "output": "Converted Telegram Markdown text here"
  }
}

Dependencies

  • Uses the external library telegramify-markdown to perform the conversion from generic text/markdown to Telegram Markdown.
  • No external API keys or services are required.
  • Requires proper configuration of input expressions if dynamic text is used.

Troubleshooting

  • Common issues:
    • Input text may contain unsupported markdown tags that could be removed or escaped depending on the chosen escape mode.
    • If the output field name conflicts with existing fields, it may overwrite data unintentionally.
  • Error messages:
    • Errors during conversion typically relate to invalid input types or unexpected values. The node throws errors with item index context to help identify problematic input.
  • Resolution tips:
    • Verify that the "Text" property contains valid strings.
    • Choose an appropriate "Escape Mode" to handle unsupported tags gracefully.
    • Ensure the "Output Field" name does not clash with important existing data fields.

Links and References

Discussion