Twilio Delete

In this article

Overview

Use this Snap to delete existing data objects from Twilio.

Prerequisites

  • Valid Twilio Account SID
  • Auth Token corresponding to the Account SID

Support for Ultra Pipelines

Works in Ultra Pipelines.

Limitations and Known Issues

None.

Snap Input and Output

Input/OutputType of ViewNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document



  • Min:1
  • Max:1
  • Mapper Snap
  • Copy Snap
  • CSV Parser
  • JSON Parser
A document containing details of the entity or data object to delete a Twilio entity.
Output

Document

Binary

Binary or Document

  • Min:0
  • Max:1
  • Mapper Snap
  • Copy Snap
  • XML Formatter
  • JSON Formatter

A document containing details indicating whether the delete operation is successful or not.

Snap Settings

Parameter NameData TypeDescriptionDefault ValueExample 
LabelString

Required. The name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your Pipeline.

Twilio DeleteTwilio Delete
API objectString/Expression

Required.  Select the API that you want to delete in Twilio instance. This property provides a set of business objects defined by Twilio.

Programmable SMSNone
EntityString/Expression

Required. Select an entity that belongs to the corresponding API object chosen above. 
For example, Messages entity belongs to the Programmable SMS API object.  On selecting Programmable SMS API object, the available entities are dynamically populated in the suggestion drop-down list.
You can choose an entity from the suggestion list or type a valid entity manually.

MessagesAssistant
Entity SIDString/Expression

Required. Specify a unique ID for the entity that determines one specific resource under the given entity type.

None
SMb5c5dcjklp475e863fj52f821u
Required SIDs

Use this field set to add parent entity SID(s) necessary for accessing the requested resources, if there are any.
Twilio's API designs follow a hierarchical pattern to indicate relationships among entities. For example, you can build an autopilot assistant to answer incoming calls with a task model. In this case, the Task entity is considered as a property of Assistant entity. Each assistant has a unique SID, and one assistant can have multiple tasks associated with it. To retrieve the record for one of the tasks, you must provide the task's parent assistant SID in the Require SIDs table.

Click  to add a new row in this table and define the values accordingly.

This field set comprises the following fields:

  • SID name
  • SID value

SID name

String/Expression/SuggestionSpecify the name of the parent SID of the input Entity.  The available entities are dynamically populated in the suggestion list based on the specified Entity. You can choose an entity from the suggestion list or enter a static value.    NoneAssistantSid

SID value

StringSpecify the value of the referred SID name.NoneUA12ab3656hjhd098ksvou946hgfd56
Connection details

Use this field set to configure the network connection parameters.

This field set contains the following fields:

  • Connection timeout
  • Number of retries
  • Retry interval (seconds)

Connection timeout

IntegerRequired. Specify the connection timeout duration in seconds.3060

Maximum requests attempts

IntegerRequired. Specify the maximum number of connection attempts in case of a failure or time-out.06

Retry request interval 

IntegerRequired Specify the time in seconds to wait before retrying the connection request.03
Snap ExecutionDrop-down list

Select one of the three following modes in which the Snap executes:

  • Validate & Execute. Performs limited execution of the Snap and generates a data preview during Pipeline validation, then performs full execution of the Snap (unlimited records) during Pipeline runtime.
  • Execute only. Performs full execution of the Snap during Pipeline execution without generating preview data.
  • Disabled. Disables the Snap and all Snaps downstream from it.

Execute OnlyValidate & Execute

Troubleshooting

ErrorReasonResolution

The input entity does not exist.

An invalid entity has been entered.

Select a valid entity from the suggestion drop-down list.

One or more Required SIDs are missing.

The Required SIDs are mandatory for this endpoint.

Check your settings under the Required SID table and enter valid entries if any of them are missing.

You have an empty value in the SID name/value field for the Required SID.

The SID name/value field must not be empty for Required SIDs.

Enter a valid SID name/value for the Required SID.

Examples

Deleting a message sent through Programmable SMS

In this example, we want to delete a message record sent through Programmable SMS using the Twilio Delete Snap. 
To use this example, you must 
have a valid Twilio Account (see Twilo Account) and a Twilio phone number (including a trial phone number). You should also have sent at least one message with that Twilio phone number.

First, we configure the Twilio Delete Snap with the following settings:

  • API object: Programmable SMS
  • Entity: Messages
  • Entity SID: $MessagesSid

In the Entity SID field you must provide the message SID retrieved from your own account. Here, we can use an expression to capture the message SID from the upstream document generated by the Mapper Snap

Then, we configure the Mapper Snap as shown below

.

Subsequently, we edit the JSON text in the JSON Generator Snap and also edit the Target path and provide a $MessageSid expression in the Mapper snap.

You must provide a valid message SID retrieved from the Twilio account, else the Snap will not execute successfully.



A successful validation of this pipeline results in the following API response in the output view of the Twilio Delete Snap, which we later convert into XML format and stream to an XML Writer Snap. We should be able to see the XML file in the project workspace.

Download this Pipeline.

Downloads

Important Steps to Successfully Reuse Pipelines

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.

  File Modified

File Example_Twilio_Programmable_SMS_Delete_Messages.slp

Feb 22, 2021 by Kalpana Malladi

Snap Pack History

 Click here to expand...
ReleaseSnap Pack VersionDateTypeUpdates
February 2024main170 LatestFixed security vulnerabilities in the Twilio Snap Pack.
February 2024main168 StableUpdated and certified against the current SnapLogic Platform release.
November 2023main155 StableUpdated and certified against the current SnapLogic Platform release.

August 2023

main138

 

Stable

Updated and certified against the current SnapLogic Platform release.

May 2023

main130 

Stable

Upgraded with the latest SnapLogic Platform release.

February 2023main114 StableUpgraded with the latest SnapLogic Platform release.
November 2022main113 StableUpgraded with the latest SnapLogic Platform release.
August 2022main111
 
StableUpgraded with the latest SnapLogic Platform release.
4.29main108
 
StableUpgraded with the latest SnapLogic Platform release.
4.28main100
 
StableUpgraded with the latest SnapLogic Platform release.
4.27main93
 
Stable

Upgraded with the latest SnapLogic Platform release.

4.26main88
 
Stable

Upgraded with the latest SnapLogic Platform release.

4.25main80
 
Stable

Upgraded with the latest SnapLogic Platform release.

4.24 Patch424 patch(main80)
 
Latest

Introduced the Twilio Snap Pack that enables you to perform various communication functions using its Web Service APIs. This Snap Pack offers the following Snaps:



See Also