Skip to content

Twilio SMS NotificationΒΆ

Class: TwilioSMSNotificationBlockV1

Source: inference.core.workflows.core_steps.sinks.twilio.sms.v1.TwilioSMSNotificationBlockV1

The πŸ“² Twilio SMS Notification βœ‰οΈ block enables sending text message notifications via the Twilio SMS service, with flexible features such as dynamic content, message truncation, and cooldown management.

The block requires Twilio setup - this article may help you configuring everything properly.

✨ Key Features¢

  • πŸ“’ Send SMS: Deliver SMS messages to designated recipients.

  • πŸ”— Dynamic Content: Craft notifications based on outputs from other Workflow steps.

  • βœ‚οΈ Message Truncation: Automatically truncate messages exceeding the character limit.

  • πŸ•’ Cooldown Control: Prevent duplicate notifications within a set time frame.

  • βš™οΈ Flexible Execution: Execute in the background or block Workflow execution for debugging.

Type identifierΒΆ

Use the following identifier in step "type" field: roboflow_core/twilio_sms_notification@v1to add the block as as step in your workflow.

PropertiesΒΆ

Name Type Description Refs
name str Enter a unique identifier for this step.. ❌
twilio_account_sid str Twilio Account SID. Visit the Twilio Console to configure the SMS service and retrieve the value.. βœ…
twilio_auth_token str Twilio Auth Token. Visit the Twilio Console to configure the SMS service and retrieve the value.. βœ…
sender_number str Sender phone number. βœ…
receiver_number str Receiver phone number. βœ…
message str Content of the message to be sent.. ❌
message_parameters Dict[str, Union[bool, float, int, str]] Data to be used in the message content.. βœ…
message_parameters_operations Dict[str, List[Union[ClassificationPropertyExtract, ConvertDictionaryToJSON, ConvertImageToBase64, ConvertImageToJPEG, DetectionsFilter, DetectionsOffset, DetectionsPropertyExtract, DetectionsRename, DetectionsSelection, DetectionsShift, DetectionsToDictionary, Divide, ExtractDetectionProperty, ExtractImageProperty, LookupTable, Multiply, NumberRound, NumericSequenceAggregate, PickDetectionsByParentClass, RandomNumber, SequenceAggregate, SequenceApply, SequenceElementsCount, SequenceLength, SequenceMap, SortDetections, StringMatches, StringSubSequence, StringToLowerCase, StringToUpperCase, ToBoolean, ToNumber, ToString]]] Preprocessing operations to be performed on message parameters.. ❌
fire_and_forget bool Boolean flag to run the block asynchronously (True) for faster workflows or synchronously (False) for debugging and error handling.. βœ…
disable_sink bool Boolean flag to disable block execution.. βœ…
cooldown_seconds int Number of seconds until a follow-up notification can be sent. Maximum value: 900 seconds (15 minutes). βœ…
cooldown_session_key str Unique key used internally to implement cooldown. Must be unique for each step in your Workflow.. ❌
length_limit int Maximum number of characters in SMS notification (longer messages will be truncated).. βœ…

The Refs column marks possibility to parametrise the property with dynamic values available in workflow runtime. See Bindings for more info.

Available ConnectionsΒΆ

Compatible Blocks

Check what blocks you can connect to Twilio SMS Notification in version v1.

Input and Output BindingsΒΆ

The available connections depend on its binding kinds. Check what binding kinds Twilio SMS Notification in version v1 has.

Bindings
  • input

    • twilio_account_sid (Union[secret, string]): Twilio Account SID. Visit the Twilio Console to configure the SMS service and retrieve the value..
    • twilio_auth_token (Union[secret, string]): Twilio Auth Token. Visit the Twilio Console to configure the SMS service and retrieve the value..
    • sender_number (string): Sender phone number.
    • receiver_number (string): Receiver phone number.
    • message_parameters (*): Data to be used in the message content..
    • fire_and_forget (boolean): Boolean flag to run the block asynchronously (True) for faster workflows or synchronously (False) for debugging and error handling..
    • disable_sink (boolean): Boolean flag to disable block execution..
    • cooldown_seconds (integer): Number of seconds until a follow-up notification can be sent. Maximum value: 900 seconds (15 minutes).
    • length_limit (integer): Maximum number of characters in SMS notification (longer messages will be truncated)..
  • output

    • error_status (boolean): Boolean flag.
    • throttling_status (boolean): Boolean flag.
    • message (string): String value.
Example JSON definition of step Twilio SMS Notification in version v1
{
    "name": "<your_step_name_here>",
    "type": "roboflow_core/twilio_sms_notification@v1",
    "twilio_account_sid": "$inputs.twilio_account_sid",
    "twilio_auth_token": "$inputs.twilio_auth_token",
    "sender_number": "+1234567890",
    "receiver_number": "+1234567890",
    "message": "During last 5 minutes detected {{ $parameters.num_instances }} instances",
    "message_parameters": {
        "predictions": "$steps.model.predictions",
        "reference": "$inputs.reference_class_names"
    },
    "message_parameters_operations": {
        "predictions": [
            {
                "property_name": "class_name",
                "type": "DetectionsPropertyExtract"
            }
        ]
    },
    "fire_and_forget": "$inputs.fire_and_forget",
    "disable_sink": false,
    "cooldown_seconds": "$inputs.cooldown_seconds",
    "cooldown_session_key": "session-1v73kdhfse",
    "length_limit": "$inputs.sms_length_limit"
}