Any To DICT π½
The converter that feeds Telegram API params
- any
- DICT
Any To DICT is the type adapter in the Telegram Suite that relabels an input as a DICT so a dict-typed port will accept it. It's a pure cast - the object passes through unchanged. No parsing, no key extraction, no conversion of strings into dictionaries.
Where dicts show up in this pack
DICT is a first-class citizen in this suite, which is why this converter matters more than its siblings. Two places you'll meet it:
- API Method takes a
paramsDICT for arbitrary Telegram Bot API calls. If your params come from anywhere other than a native DICT output, this node is the bridge that gets a wildcard signal into that port. - Send nodes return their full response as a
messageDICT - message id, chat info, timestamps. If you ever want to route one of those DICTs through a trigger and keep using it as a dict afterward, Any To DICT restores the type after the wildcard output.
Like the rest of the converter family, it's also the generic fix when any node hands you a * output and a DICT port is waiting downstream.
The honest take
The dictionary is where the pack's types get real: Telegram's whole API speaks in JSON objects, so the send and edit nodes hand back DICTs and the experimental API Method node consumes them. But this specific converter is still plumbing. The value you pass through it is whatever it was - if that's not genuinely a dict, a downstream consumer will misbehave, because the cast doesn't check or convert anything. For the one case that matters - "I have a dict-ish value trapped on a wildcard port, relabel it so my API call accepts it" - it works with zero configuration.
Install
The shared pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
Or "ComfyUI Telegram Suite" from ComfyUI Manager. All converters live in the pack's converters.py, so there's nothing extra to download - install the pack once and the whole converter family comes along.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | β |