MessageBird Send SMS

Octopus.Script exported 2021-01-21 by bilalmajali belongs to ‘Other’ category.

Send an SMS using MessageBird API.

Parameters

When steps based on the template are included in a project’s deployment process, the parameters below can be set.

MessageBird Key

MessageBird_Key =

API keys give you access to all our REST API methods. This can be created/copied here

From

MessageBird_originator =

The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.

To

MessageBird_Recipients =

The number to send the message to.

Message

MessageBird_body =

The content of the SMS message.

Script body

Steps based on this template will execute the following PowerShell script.

#-----------------------------
#Latest Update 2021-01-21
#Bilal Aljbour - FRISS
#-----------------------------
$url = "https://rest.messagebird.com/messages?access_key=$MessageBird_Key"
$params = @{
href = 'https://rest.messagebird.com/messages'
recipients = "$MessageBird_Recipients"
originator = "$MessageBird_originator"
body = "$MessageBird_body"
}
Invoke-WebRequest $url -Method Post -Body $params -UseBasicParsing | Out-Null
Write-Host 'Message has been sent!'

Provided under the Apache License version 2.0.

Report an issue

To use this template in Octopus Deploy, copy the JSON below and paste it into the Library → Step templates → Import dialog.

{
  "Id": "d5dba42f-ab60-4342-bdaf-b8ecd2f763c3",
  "Name": "MessageBird Send SMS",
  "Description": "Send an SMS using MessageBird API.",
  "Version": 2,
  "ExportedAt": "2021-01-21T13:54:53.610Z",
  "ActionType": "Octopus.Script",
  "Author": "bilalmajali",
  "Packages": [],
  "Parameters": [
    {
      "Id": "8fcbce8e-5d10-442c-a50d-470b2458a481",
      "Name": "MessageBird_Key",
      "Label": "MessageBird Key",
      "HelpText": "API keys give you access to all our REST API methods.\nThis can be created/copied [here](https://dashboard.messagebird.com/en/developers/access)",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "7c06f0e6-84e8-4ed0-b804-aed47d580667",
      "Name": "MessageBird_originator",
      "Label": "From",
      "HelpText": "The sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters. ",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "e4b45a2d-f7ca-4329-88fc-d6f23b1249c4",
      "Name": "MessageBird_Recipients",
      "Label": "To",
      "HelpText": "The number to send the message to.",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "SingleLineText"
      }
    },
    {
      "Id": "e882db5e-d780-4183-956e-e51806163b60",
      "Name": "MessageBird_body",
      "Label": "Message",
      "HelpText": "The content of the SMS message.\n",
      "DefaultValue": "",
      "DisplaySettings": {
        "Octopus.ControlType": "MultiLineText"
      }
    }
  ],
  "Properties": {
    "Octopus.Action.Script.ScriptSource": "Inline",
    "Octopus.Action.Script.Syntax": "PowerShell",
    "Octopus.Action.Script.ScriptBody": "#-----------------------------\n#Latest Update 2021-01-21\n#Bilal Aljbour - FRISS\n#-----------------------------\n$url = \"https://rest.messagebird.com/messages?access_key=$MessageBird_Key\"\n$params = @{\nhref = 'https://rest.messagebird.com/messages'\nrecipients = \"$MessageBird_Recipients\"\noriginator = \"$MessageBird_originator\"\nbody = \"$MessageBird_body\"\n}\nInvoke-WebRequest $url -Method Post -Body $params -UseBasicParsing | Out-Null\nWrite-Host 'Message has been sent!'"
  },
  "Category": "Other",
  "HistoryUrl": "https://github.com/OctopusDeploy/Library/commits/master/step-templates//opt/buildagent/work/75443764cd38076d/step-templates/send-sms-using-messagebird.json",
  "Website": "/step-templates/d5dba42f-ab60-4342-bdaf-b8ecd2f763c3",
  "Logo": "iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAIAAAAiOjnJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAET9JREFUeNrsnV2MG1cVx2fGH2t7vU6zm27TTdxNgCTbVkUKggBFDR9FIKoWVX2o1BeeqNQXHnjgueozD7z2CSQEQgKEqlIVgSjQlrYQWoHaom6a0u7GyWbrxrus159je8zfvonZ2p7xx5w7c2d8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