Gravity Input

Listens for messages from Gravity

Overview

This node acts as a trigger that listens for messages published on a specified Redis channel from the Gravity service. It establishes a subscription to a Gravity event bus and emits incoming messages as workflow data in real time. This is useful for workflows that need to react immediately to events or data pushed by Gravity, such as monitoring alerts, real-time analytics updates, or any custom event-driven automation.

Practical examples include:

  • Triggering a workflow when a new Gravity query result is available.
  • Reacting to specific Gravity events for logging or notification purposes.
  • Integrating Gravity event streams into other systems via n8n workflows.

Properties

Name Meaning
Channel The Redis channel to subscribe to. This determines which stream of Gravity messages the node listens for. Default is gravity:query.

Output

The node outputs an array of JSON objects representing the received Gravity messages. Each emitted item corresponds to one message payload extracted from the subscribed channel event. The output JSON structure directly reflects the content of the Gravity event's payload.

No binary data output is produced by this node.

Dependencies

  • Requires an API key credential for authenticating with the Gravity service.
  • Connects to Gravity’s event bus using the provided server URL and API key.
  • Subscribes to a Redis channel prefixed internally by Gravity’s event channel prefix.
  • Requires network access to the Gravity server endpoint.

Troubleshooting

  • Connection issues: If the node fails to subscribe, verify the Gravity server URL and API key are correct and accessible.
  • Missing or invalid credentials: The node requires valid credentials; ensure these are configured properly in n8n.
  • Channel subscription errors: Confirm the channel name is correct and that the Gravity service is publishing to it.
  • Message processing errors: If an error occurs while emitting messages, the node will emit an error object containing the error message and original message for debugging.
  • Logs: The node logs detailed debug information to the console, which can help diagnose connection and subscription problems.

Links and References

Discussion