Messenger Collector

Generates an action plan and executes it. Can use external tools.

Overview

The Messenger Collector node collects messenger service data from input items, processes it, and outputs a summary of the collected messengers. It supports services like Telegram and Bale, extracting relevant information such as service name, bot token, and optionally metadata like timestamp and index. This node is useful for aggregating messenger data from multiple sources and generating a consolidated report or action plan.

Use Case Examples

  1. Collect messenger data from multiple input items and output a summary object listing each messenger service and its details.
  2. Include metadata such as timestamp and index for each collected messenger to track when and where the data was collected.

Properties

Name Meaning
resource The resource type, fixed as 'Default' for this node.
operation The operation to perform, fixed as 'Default' for this node.
options Additional options for the operation, such as output format and whether to include metadata.

Output

JSON

  • messengers - The collected messenger data, either as an object keyed by service or as an array.
  • totalCount - The total number of messengers collected.
  • message - A summary message listing the names of the collected messengers.
  • collectedAt - Timestamp of when the messengers were collected, included if metadata is enabled.

Dependencies

  • n8n-workflow package for node framework utilities
  • ../utils/getMessengerInputs for input handling

Troubleshooting

  • If no input data is provided, the node will output an empty array; ensure input data is correctly connected.
  • If the service field in input data is missing or unrecognized, the messenger name defaults to 'Unknown'.
  • Ensure the 'options' parameter is correctly set to control output format and metadata inclusion to avoid unexpected output structure.

Discussion