{"id":70449,"date":"2018-07-17T11:44:35","date_gmt":"2018-07-17T02:44:35","guid":{"rendered":"https:\/\/support.questetra.com\/twilio-sms-script-task\/"},"modified":"2026-04-14T16:41:41","modified_gmt":"2026-04-14T07:41:41","slug":"twilio-sms-script-task","status":"publish","type":"post","link":"https:\/\/support.questetra.com\/en\/developer-blog\/twilio-sms-script-task\/","title":{"rendered":"Sending a Text Message in the Middle of Workflow Using SMS &#8211; Script Task version"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"58\" data-attachment-id=\"113212\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/message-start-event-http-browser\/attachment\/professional-banner-new-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?fit=1200%2C68&amp;ssl=1\" data-orig-size=\"1200,68\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"professional-banner-new-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?fit=1024%2C58&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en-1024x58.png?resize=1024%2C58&#038;ssl=1\" alt=\"\" class=\"wp-image-113212\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=1024%2C58&amp;ssl=1 1024w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=600%2C34&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?resize=768%2C44&amp;ssl=1 768w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/12\/professional-banner-new-en.png?w=1200&amp;ssl=1 1200w\" sizes=\"auto, (max-width: 1000px) 100vw, 1000px\" \/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n<p>Hi Questetra users! I\u2019m Hatanaka, Questetra&#8217;s CTO.<\/p>\n<p>This post is a continuation of the last blog post.<\/p>\n<p><blockquote class=\"wp-embedded-content\" data-secret=\"pRwVqDAdAF\"><a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/event-http-twilio-sms\/\">Sending a Text Message in the Middle of Workflow Using SMS<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Sending a Text Message in the Middle of Workflow Using SMS&#8221; &#8212; Questetra Support\" src=\"https:\/\/support.questetra.com\/developer-blog\/event-http-twilio-sms\/embed\/#?secret=cKjcPKkPCD#?secret=pRwVqDAdAF\" data-secret=\"pRwVqDAdAF\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>In that post I used a Throwing Message Intermediate Event (HTTP) to achieve the API request to <a href=\"https:\/\/www.twilio.com\/\">Twilio<\/a>.<\/p>\n<p>I would like to substitute that part with a Script Task.<br \/>I will make a Script Task to call the <a href=\"https:\/\/www.twilio.com\/docs\/sms\/api#send-an-sms-with-the-sms-api\">SMS API<\/a>.<\/p>\n<p><a href=\"https:\/\/questetra.zendesk.com\/hc\/en-us\/articles\/360002260611-M230\">M230: Auto Executing Complicated Data Processing (ECMAScript)<\/a><\/p>\n<p>The Workflow diagram will be modified to the following.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"89209\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/twilio-sms-script-task\/attachment\/send-sms-script-task1\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?fit=771%2C104&amp;ssl=1\" data-orig-size=\"771,104\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Send SMS script task1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?fit=771%2C104&amp;ssl=1\" class=\"aligncenter wp-image-89209 size-full\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?resize=771%2C104&#038;ssl=1\" alt=\"\" width=\"771\" height=\"104\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?w=771&amp;ssl=1 771w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?resize=600%2C81&amp;ssl=1 600w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Send-SMS-script-task1.png?resize=768%2C104&amp;ssl=1 768w\" sizes=\"auto, (max-width: 771px) 100vw, 771px\" \/><\/p>\n<ol>\n<li>At the Input Step the destination (phone number) and a message are entered.<\/li>\n<li>The SMS Send (auto) Step is a Script Task, and it calls the SMS API.<\/li>\n<\/ol>\n<p>There is no change to the Data Items. Here, I will show you again.<\/p>\n<table>\n<thead>\n<tr>\n<th>Data Item Name<\/th>\n<th>Data-type<\/th>\n<th>Required<\/th>\n<th>Permission at &#8220;Input&#8221; Step<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Title<\/td>\n<td>String-type single line<\/td>\n<td>No<\/td>\n<td>Editable<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"4\">Phone number<\/td>\n<td>String-type single line<\/td>\n<td>Yes<\/td>\n<td>Editable<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Regular expression to be satisfied: <code>\\+81\\d{9,10}<\/code><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Placeholder: <code>+8175205XXXX<\/code><\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Description:\n<p><\/p>\n<pre>Please start with the country code (+81).&lt;br&gt;Only numeric without a hyphen.<\/pre>\n<\/td>\n<\/tr>\n<tr>\n<td rowspan=\"2\">Text body<\/td>\n<td>String-type multiple lines<\/td>\n<td>Yes<\/td>\n<td>Editable<\/td>\n<\/tr>\n<tr>\n<td colspan=\"3\">Max Length: <code>100<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Settings of the Script Task except for the actual script.<\/p>\n<table>\n<tbody>\n<tr>\n<th>Allow to clear the required item.<\/th>\n<td>Uncheck<\/td>\n<\/tr>\n<tr>\n<th>Token will move to Error Boundary Event when processing fails.<\/th>\n<td>Uncheck<\/td>\n<\/tr>\n<tr>\n<th>Script Engine<\/th>\n<td>GraalJS<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Here is the entire script.<\/p>\n<pre><code>\nconst accountSID = '[Account ID of Twilio (AccountSID)]';\nconst authToken = '[token used for accessing API (AUTHTOKEN)]';\nconst fromPhone = '[The phone number to call]';\n\nconst apiUrl = 'https:\/\/api.twilio.com\/2010-04-01\/Accounts\/' + accountSID + '\/Messages.json';\nconst toPhone = engine.findDataByName('Phone number');\nconst message = engine.findDataByName('Text body');\n\nconst response = httpClient.begin()\n  .basic(accountSID, authToken)\n  .formParam('From', fromPhone)\n  .formParam('To', toPhone)\n  .formParam('Body', message)\n  .post(apiUrl);\n\nconst responseCode = response.getStatusCode();\nconst responseBody = response.getResponseAsString();\nengine.log(\"response: \" + responseCode);\nengine.log(responseBody);\n\nif (responseCode != 201) {\n  throw \"response is not 201: \" + responseCode;\n}\n<\/code><\/pre>\n<p>I will explain part by part.<\/p>\n<pre><code>\nconst accountSID = '[Account ID of Twilio (AccountSID)]';\nconst authToken = '[token used for accessing API (AUTHTOKEN)]';\nconst fromPhone = '[The phone number to call]';\n<\/code><\/pre>\n<p>A Script Task cannot retrieve variables that have been configured within the App.<br \/>Since there is no choice, the same thing is defined as a variable (constant) at the beginning of the script.<br \/>Replace it according to your Twilio account.<\/p>\n<pre><code>\nconst apiUrl = 'https:\/\/api.twilio.com\/2010-04-01\/Accounts\/' + accountSID + '\/Messages.json';\nconst toPhone = engine.findDataByName('Phone number');\nconst message = engine.findDataByName('Text body');\n<\/code><\/pre>\n<p>Next, using the API that was accessed, it retrieves the SMS destination phone number and the text body.<br \/><code><i>engine.findDataByName()<\/i><\/code> is an API for a Script Task which is for retrieving the value of a Data Item that is specified by name.<\/p>\n<p><a href=\"https:\/\/docs.google.com\/spreadsheets\/u\/1\/d\/1cSk9Q-97A_QRVbmDZzLIoZ3R_S12P6QJ9n8Vha0Pfyo\/pub?single=true&amp;gid=1&amp;output=html&amp;widget=true\">[R2301]: Script Data Retrieving \/ Assignment<\/a><\/p>\n<pre><code>\nconst response = httpClient.begin()\n  .basic(accountSID, authToken)\n  .formParam('From', fromPhone)\n  .formParam('To', toPhone)\n  .formParam('Body', message)\n  .post(apiUrl);\n<\/code><\/pre>\n<p>Next, it accesses Twilio&#8217;s API using the API for the Script Task.<\/p>\n<p><a href=\"https:\/\/docs.google.com\/spreadsheets\/u\/1\/d\/1kczqrpNVhosjg9SYt2A9C89xOszHSqy0lpa7r0NQQKo\/pub?single=true&amp;gid=12&amp;output=html&amp;widget=true\">[R2300]: Java Classes available in Script Task<\/a><\/p>\n<p>Execute the POST request with <code><i>httpClient.begin()<\/i> ... <i>post()<\/i><\/code> and return the response.<br \/>On the way, it specifies the basic authentication header using\u00a0<code><i>basic()<\/i><\/code>, and the parameters in the application\/x-www-form-urlencoded format in the request-body using <code><i>formParam()<\/i><\/code>.<\/p>\n<pre><code>\nconst responseCode = response.getStatusCode();\nconst responseBody = response.getResponseAsString();\nengine.log(\"response: \" + responseCode);\nengine.log(responseBody);\n\nif (responseCode !== 201) {\n  throw \"response is not 201: \" + responseCode;\n}\n<\/code><\/pre>\n<p>The status code and the response body are extracted from the response, and the log is output.<br \/>Since a 201 response is returned when the request is successfully completed, an exception is thrown so that the Script Task outputs a processing failure when it is not 201 response.<br \/><code><i>engine.log()<\/i><\/code> is an API for logging output. It is the same thing as I mentioned in the previous post.<\/p>\n<p><blockquote class=\"wp-embedded-content\" data-secret=\"RA8Oo8c0zN\"><a href=\"https:\/\/support.questetra.com\/en\/developer-blog\/script-task-logging\/\">Using Log Output for Debugging a Script Task<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; visibility: hidden;\" title=\"&#8220;Using Log Output for Debugging a Script Task&#8221; &#8212; Questetra Support\" src=\"https:\/\/support.questetra.com\/developer-blog\/script-task-logging\/embed\/#?secret=dZVudWQFbE#?secret=RA8Oo8c0zN\" data-secret=\"RA8Oo8c0zN\" width=\"500\" height=\"282\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe><\/p>\n<p>That&#8217;s all for the App development. An access log like the following figure will be output when accessing Twilio&#8217;s API. A similar log will be output even if it fails.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"70452\" data-permalink=\"https:\/\/support.questetra.com\/en\/developer-blog\/twilio-sms-script-task\/attachment\/twilio-sms-scripttask-log-en\/\" data-orig-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Twilio-SMS-ScriptTask-log-en.png?fit=928%2C415&amp;ssl=1\" data-orig-size=\"928,415\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"Twilio-SMS-ScriptTask-log-en\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Twilio-SMS-ScriptTask-log-en.png?fit=928%2C415&amp;ssl=1\" class=\"aligncenter size-full wp-image-70452\" src=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Twilio-SMS-ScriptTask-log-en.png?resize=928%2C415&#038;ssl=1\" alt=\"\" width=\"928\" height=\"415\" srcset=\"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Twilio-SMS-ScriptTask-log-en.png?w=928&amp;ssl=1 928w, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/Twilio-SMS-ScriptTask-log-en.png?resize=600%2C268&amp;ssl=1 600w\" sizes=\"auto, (max-width: 928px) 100vw, 928px\" \/><\/p>\n<p>Next time I would like to work on creating a Service Task (Add-on) based on this Script Task.<\/p>\n<p>Well, see you around.<\/p>","protected":false},"excerpt":{"rendered":"<p>In my latest blog post, I used a Throwing Message Intermediate Event (HTTP) to realize the API request to Twilio. I would like to substitute that part with a Script Task.<\/p>\n","protected":false},"author":5,"featured_media":102684,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_uag_custom_page_level_css":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_seo_schema_type":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false,"jetpack_post_was_ever_published":false},"categories":[296],"tags":[341],"class_list":["post-70449","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-developer-blog","tag-twilio"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1","uagb_featured_image_src":{"full":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1",1200,675,false],"thumbnail":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=440%2C440&ssl=1",440,440,true],"medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=560%2C315&ssl=1",560,315,true],"medium_large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=768%2C432&ssl=1",768,432,true],"large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1024%2C576&ssl=1",1024,576,true],"1536x1536":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1",1200,675,true],"2048x2048":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-portrait-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=900%2C675&ssl=1",900,675,true],"newspack-article-block-square-large":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=1200%2C675&ssl=1",1200,675,true],"newspack-article-block-landscape-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=800%2C600&ssl=1",800,600,true],"newspack-article-block-portrait-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=600%2C675&ssl=1",600,675,true],"newspack-article-block-square-medium":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=800%2C675&ssl=1",800,675,true],"newspack-article-block-landscape-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=600%2C450&ssl=1",600,450,true],"newspack-article-block-portrait-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=450%2C600&ssl=1",450,600,true],"newspack-article-block-square-intermediate":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=600%2C600&ssl=1",600,600,true],"newspack-article-block-landscape-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=400%2C300&ssl=1",400,300,true],"newspack-article-block-portrait-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=300%2C400&ssl=1",300,400,true],"newspack-article-block-square-small":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=400%2C400&ssl=1",400,400,true],"newspack-article-block-landscape-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=200%2C150&ssl=1",200,150,true],"newspack-article-block-portrait-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=150%2C200&ssl=1",150,200,true],"newspack-article-block-square-tiny":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?resize=200%2C200&ssl=1",200,200,true],"newspack-article-block-uncropped":["https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1",1200,675,true]},"uagb_author_info":{"display_name":"HatanakaAkihiro","author_link":"https:\/\/support.questetra.com\/en\/author\/hatanaka-akihiro\/"},"uagb_comment_info":1,"uagb_excerpt":"In my latest blog post, I used a Throwing Message Intermediate Event (HTTP) to realize the API request to Twilio. I would like to substitute that part with a Script Task.","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9DiIh-ikh","jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":69830,"url":"https:\/\/support.questetra.com\/ja\/developer-blog\/twilio-sms-script-task\/","url_meta":{"origin":70449,"position":0},"title":"\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u9014\u4e2d\u3067\u3001SMS \u3092\u9001\u4fe1\u3059\u308b \u2014 \u30b9\u30af\u30ea\u30d7\u30c8\u30bf\u30b9\u30af\u7248 \u2014","author":"HatanakaAkihiro","date":"2018-07-17","format":false,"excerpt":"\u524d\u56de\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001Twilio \u3078\u306e API \u30ea\u30af\u30a8\u30b9\u30c8\u3092\u3001\u30e1\u30c3\u30bb\u30fc\u30b8\u9001\u4fe1\u4e2d\u9593\u30a4\u30d9\u30f3\u30c8 (HTTP) \u3067\u5b9f\u73fe\u3057\u3066\u3044\u307e\u3057\u305f\u3002\u305d\u306e\u90e8\u5206\u3092\u3001\u3042\u3048\u3066\u30b9\u30af\u30ea\u30d7\u30c8\u30bf\u30b9\u30af\u306b\u5909\u3048\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002","rel":"","context":"In \"Twilio\"","block_context":{"text":"Twilio","link":"https:\/\/support.questetra.com\/ja\/tag\/twilio\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/SMS-sending-script-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":69985,"url":"https:\/\/support.questetra.com\/ja\/developer-blog\/twilio-sms-add-on\/","url_meta":{"origin":70449,"position":1},"title":"\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u9014\u4e2d\u3067\u3001SMS \u3092\u9001\u4fe1\u3059\u308b \u2014 \u30b5\u30fc\u30d3\u30b9\u30bf\u30b9\u30af\u30a2\u30c9\u30aa\u30f3\u7248 \u2014","author":"HatanakaAkihiro","date":"2018-08-13","format":false,"excerpt":"Queststra BPM Suite \u3067\u306f\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30bf\u30b9\u30af\u3067\u884c\u3063\u3066\u3044\u308b\u51e6\u7406\u3092\u3001\u72ec\u81ea\u306e\u81ea\u52d5\u5de5\u7a0b\u3068\u3057\u3066\u629c\u304d\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002\u524d\u306e\u30d6\u30ed\u30b0\u3067\u306f\u3001Twilio \u306e API \u3092\u4f7f\u3063\u3066 SMS \u9001\u4fe1\u3059\u308b\u51e6\u7406\u90e8\u5206\u3092\u3001\u30b9\u30af\u30ea\u30d7\u30c8\u30bf\u30b9\u30af\u3067\u4f5c\u308a\u307e\u3057\u305f\u3002\u3053\u306e\u90e8\u5206\u3092\u3001\u72ec\u81ea\u306e\u81ea\u52d5\u5de5\u7a0b\u3068\u3057\u3066\u4f5c\u308a\u5909\u3048\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002\u4f5c\u308a\u51fa\u3057\u305f\u81ea\u52d5\u5de5\u7a0b\u306f\u3001\u4ed6\u306e\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u30a2\u30d7\u30ea\u3067\u518d\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002","rel":"","context":"In \"Twilio\"","block_context":{"text":"Twilio","link":"https:\/\/support.questetra.com\/ja\/tag\/twilio\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/twilio-sms-add-on-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/twilio-sms-add-on-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/twilio-sms-add-on-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/twilio-sms-add-on-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/08\/twilio-sms-add-on-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":69533,"url":"https:\/\/support.questetra.com\/ja\/developer-blog\/event-http-twilio-sms\/","url_meta":{"origin":70449,"position":2},"title":"\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u9014\u4e2d\u3067\u3001SMS \u3092\u9001\u4fe1\u3059\u308b","author":"HatanakaAkihiro","date":"2018-07-09","format":false,"excerpt":"Twilio \u3067\u306f SMS \u3092\u6271\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u306e\u3067\u3001\u4eca\u56de\u306f SMS \u306e\u9001\u4fe1\u306b\u53d6\u308a\u7d44\u307f\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002","rel":"","context":"In \"Twilio\"","block_context":{"text":"Twilio","link":"https:\/\/support.questetra.com\/ja\/tag\/twilio\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/send-SMS-1200-675.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/send-SMS-1200-675.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/send-SMS-1200-675.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/send-SMS-1200-675.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/07\/send-SMS-1200-675.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":84626,"url":"https:\/\/support.questetra.com\/ja\/addons\/questetra-bpms-process-kick-httpstartevent-by-tsv\/","url_meta":{"origin":70449,"position":3},"title":"Questetra BPMS: \u6848\u4ef6, TSV\u30c7\u30fc\u30bf\u306b\u3088\u308bHTTP\u958b\u59cb\u30a4\u30d9\u30f3\u30c8\u306e\u30ad\u30c3\u30af","author":"IMAMURA, Genichi","date":"2021-02-17","format":false,"excerpt":"TSV\u306e\u6307\u5b9a\u884c\u30c7\u30fc\u30bf\u3092\u7528\u3044\u3066HTTP\u958b\u59cb\u30a4\u30d9\u30f3\u30c8\u3092\u30ad\u30c3\u30af\u3057\u307e\u3059\u3002\u8907\u6570\u884cTSV\u30c7\u30fc\u30bf\u306b\u3088\u308b\u4e00\u62ec\u8d77\u52d5\u3092\u60f3\u5b9a\u3059\u308b\u5834\u5408\u3001\u30eb\u30fc\u30d7\u69cb\u9020\u5185\u306b\u914d\u7f6e\u3057\u307e\u3059\u3002\u884cID\u306f\u30bc\u30ed\u304b\u3089\u59cb\u307e\u308a\u307e\u3059\u3002","rel":"","context":"In &quot;\u30a2\u30c9\u30aa\u30f3&quot;","block_context":{"text":"\u30a2\u30c9\u30aa\u30f3","link":"https:\/\/support.questetra.com\/ja\/category\/addons\/"},"img":{"alt_text":"Questetra BPMS# \u6848\u4ef6: TSV\u30c7\u30fc\u30bf\u306b\u3088\u308bHTTP\u958b\u59cb\u30a4\u30d9\u30f3\u30c8\u306e\u30ad\u30c3\u30af","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/02\/Questetra-BPMS-Process-Kick-HttpStartEvent-by-TSV-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/02\/Questetra-BPMS-Process-Kick-HttpStartEvent-by-TSV-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/02\/Questetra-BPMS-Process-Kick-HttpStartEvent-by-TSV-ja.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/02\/Questetra-BPMS-Process-Kick-HttpStartEvent-by-TSV-ja.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/02\/Questetra-BPMS-Process-Kick-HttpStartEvent-by-TSV-ja.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":97147,"url":"https:\/\/support.questetra.com\/ja\/addons\/google-sheets-sheet-row-update-with-singleline-tsv\/","url_meta":{"origin":70449,"position":4},"title":"Google \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8: \u884c\u30c7\u30fc\u30bf, \u5358\u4e00\u884cTSV\u3067\u66f4\u65b0","author":"IMAMURA, Genichi","date":"2020-10-28","format":false,"excerpt":"\u5358\u4e00\u884cTSV\u30c7\u30fc\u30bf\u3067Google\u30b7\u30fc\u30c8\u3092\u66f4\u65b0\u3057\u307e\u3059\u3002TSV\u306e\u5148\u982d\u5024\u3068\u5b8c\u5168\u4e00\u81f4\u3059\u308bA\u30bb\u30eb\u3092\u63a2\u7d22\u3057\u3001\u6700\u521d\u306b\u5408\u81f4\u3057\u305f\u884c\u306b\u3064\u3044\u3066\u4e0a\u66f8\u304d\u3057\u307e\u3059\u3002\u305d\u308c\u305e\u308c\u5024\u306f\u3001\u624b\u5165\u529b\u3057\u305f\u969b\u3068\u540c\u69d8\u306b\u81ea\u52d5\u89e3\u6790\u3055\u308c\u307e\u3059\u3002\u3082\u3057\u5408\u81f4\u3059\u308b\u884c\u304c\u7121\u3044\u5834\u5408\u306f\u3001\u672b\u5c3e\u8ffd\u8a18\u3055\u308c\u307e\u3059\u3002","rel":"","context":"In &quot;\u30a2\u30c9\u30aa\u30f3&quot;","block_context":{"text":"\u30a2\u30c9\u30aa\u30f3","link":"https:\/\/support.questetra.com\/ja\/category\/addons\/"},"img":{"alt_text":"Google \u30b9\u30d7\u30ec\u30c3\u30c9\u30b7\u30fc\u30c8: \u884c\u30c7\u30fc\u30bf, \u5358\u4e00\u884cTSV\u3067\u66f4\u65b0","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-ja.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-ja.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-ja.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2020\/10\/Google-Sheets-Sheet-Row-Update-with-Singleline-TSV-ja.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":69037,"url":"https:\/\/support.questetra.com\/ja\/developer-blog\/receive-task-webhook-twilio\/","url_meta":{"origin":70449,"position":5},"title":"\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u9014\u4e2d\u3067\u3001\u81ea\u52d5\u7684\u306b\u96fb\u8a71\u3092\u304b\u3051\u308b","author":"HatanakaAkihiro","date":"2018-06-26","format":false,"excerpt":"11.7 \u306e\u65b0\u6a5f\u80fd\u300c\u53d7\u4fe1\u30bf\u30b9\u30af \uff08Webhook\uff09HTTP \u30ec\u30b9\u30dd\u30f3\u30b9\u5185\u5bb9\u3092\u8a2d\u5b9a\u3067\u304d\u308b\u3088\u3046\u306b\u5bfe\u5fdc\u300d\u3068\u3001Twilio \u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3001\u30ef\u30fc\u30af\u30d5\u30ed\u30fc\u306e\u9014\u4e2d\u3067\u81ea\u52d5\u7684\u306b\u96fb\u8a71\u3092\u304b\u3051\u308b\u3053\u3068\u3092\u5b9f\u73fe\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002","rel":"","context":"In \"Twilio\"","block_context":{"text":"Twilio","link":"https:\/\/support.questetra.com\/ja\/tag\/twilio\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/06\/receive-task-webhook-twilio-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/06\/receive-task-webhook-twilio-1200x675-1.png?fit=1200%2C675&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/06\/receive-task-webhook-twilio-1200x675-1.png?fit=1200%2C675&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/06\/receive-task-webhook-twilio-1200x675-1.png?fit=1200%2C675&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/support.questetra.com\/wp-content\/uploads\/2018\/06\/receive-task-webhook-twilio-1200x675-1.png?fit=1200%2C675&ssl=1&resize=1050%2C600 3x"},"classes":[]}],"amp_enabled":false,"_links":{"self":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/70449","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/comments?post=70449"}],"version-history":[{"count":8,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/70449\/revisions"}],"predecessor-version":[{"id":119480,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/posts\/70449\/revisions\/119480"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media\/102684"}],"wp:attachment":[{"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/media?parent=70449"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/categories?post=70449"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/support.questetra.com\/en\/wp-json\/wp\/v2\/tags?post=70449"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}