Receive messages from a topic and send an SMS

For the platform n8n, this workflow receives messages from a Kafka topic and sends an SMS alert via Vonage when the temperature exceeds 50. It automates real-time notifications, ensuring timely responses to critical temperature changes.

7/8/2025
4 nodes
Medium
manualmediumkafkatriggervonagenooplogicconditional
Categories:
Communication & MessagingManual TriggeredMedium Workflow
Integrations:
KafkaTriggerVonageNoOp

Target Audience

This workflow is ideal for:
- Developers looking to automate SMS alerts based on real-time data from Kafka topics.
- Data Analysts who want to monitor temperature readings and get immediate notifications when thresholds are exceeded.
- Operations Teams that require prompt communication regarding environmental conditions or system performance metrics.
- Business Owners who need to ensure that critical temperature thresholds are monitored to maintain operational efficiency.

Problem Solved

This workflow addresses the need for real-time notifications when a specific condition is met, such as when the temperature exceeds 50 degrees. By integrating Kafka for message consumption and Vonage for SMS delivery, it ensures that users receive timely alerts, thus enabling quick decision-making and action to prevent potential issues.

Workflow Steps

  • Kafka Trigger: The workflow starts with a Kafka trigger that listens to messages on the topic topic_test. It is configured to parse incoming messages as JSON.
    2. IF Condition: Once a message is received, the workflow checks if the temperature value in the message exceeds 50. This step uses conditional logic to determine the next action.
    3. Vonage SMS Notification: If the condition is met (temperature > 50), an SMS alert is sent via Vonage, notifying users with the message: "Alert! The value of temp is [temperature value]."
    4. NoOp: If the condition is not met, the workflow proceeds to the NoOp node, effectively doing nothing but completing the process without sending an alert.
  • Customization Guide

    Users can customize this workflow by:
    - Modifying the Kafka topic name in the Kafka Trigger to listen to different data streams.
    - Adjusting the temperature threshold in the IF condition to suit different alerting needs (e.g., setting it to 30 degrees or 70 degrees).
    - Changing the SMS message content in the Vonage node to include additional context or different formatting.
    - Adding more nodes or conditions to handle other types of alerts or integrate with additional services as needed.