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 https://twilio.com/console to set up SMS service and fetch the value.. βœ…
twilio_auth_token str Twilio Auth Token. Visit Twilio Console to set up SMS service and fetch the value.. βœ…
message str Content of the message to be send. ❌
sender_number str Sender phone number. βœ…
receiver_number str Receiver phone number. βœ…
message_parameters Dict[str, Union[bool, float, int, str]] References data to be used to construct each and every column. βœ…
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, RandomNumber, SequenceAggregate, SequenceApply, SequenceLength, SequenceMap, SortDetections, StringMatches, StringSubSequence, StringToLowerCase, StringToUpperCase, ToBoolean, ToNumber, ToString]]] UQL definitions of operations to be performed on defined data w.r.t. each message parameter. ❌
fire_and_forget bool Boolean flag dictating if sink is supposed to be executed in the background, not waiting on status of registration before end of workflow run. Use True if best-effort registration is needed, use False while debugging and if error handling is needed. βœ…
disable_sink bool boolean flag that can be also reference to input - to arbitrarily disable data collection for specific request. βœ…
cooldown_seconds int Number of seconds to wait until 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 https://twilio.com/console to set up SMS service and fetch the value..
    • twilio_auth_token (Union[secret, string]): Twilio Auth Token. Visit Twilio Console to set up SMS service and fetch the value..
    • sender_number (string): Sender phone number.
    • receiver_number (string): Receiver phone number.
    • message_parameters (*): References data to be used to construct each and every column.
    • fire_and_forget (boolean): Boolean flag dictating if sink is supposed to be executed in the background, not waiting on status of registration before end of workflow run. Use True if best-effort registration is needed, use False while debugging and if error handling is needed.
    • disable_sink (boolean): boolean flag that can be also reference to input - to arbitrarily disable data collection for specific request.
    • cooldown_seconds (integer): Number of seconds to wait until 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",
    "message": "During last 5 minutes detected {{ $parameters.num_instances }} instances",
    "sender_number": "$inputs.sender_number",
    "receiver_number": "$inputs.receiver_number",
    "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"
}