FlowmageDocs

Look up phone number

BetaReads data

Validates a phone number and gives its country, type and formats.

Settings

SettingWhat it is
ConnectionRequiredThe MessageBird connection the step signs in with.
Phone numberRequiredIn international format (+31612345678). A national number works too when you fill in the country below.
CountryThe two-letter country of a national number, e.g. NL. Leave it empty for an international number.
Fail on an invalid numberOff, an unusable number answers valid = false so the flow can branch. On, the run stops there.
Technical details
KeyValue
connectiontexta connection id from `requires.connections` (provider `messagebird`)
phoneNumbertextits `{{ }}` must give a string
countryCodetext
failIfInvalidtrue/false, by default false

Output

FieldType
lookupEverything MessageBird knows about the numberobject
validWhether MessageBird could read the numberboolean
typeKind of line (mobile, fixed line, voip)string
formatsThe number written four waysobject
countryCodeCountry the number belongs tostring
Sample output, and the expression for each field
  • countryCode"NL"
  • formats
    • e164"+31612345678"
  • lookup
    • countryCode"NL"
    • type"mobile"
  • type"mobile"
  • validtrue

Errors

When a step of this node stops a run, the run page shows a code. Look it up:

Example step

The step as a flow file holds it. Replace each value in <…>.

{
  "config": {
    "connection": "<connection id>",
    "countryCode": "",
    "failIfInvalid": false,
    "phoneNumber": "<phone number>"
  },
  "label": "Look up phone number",
  "type": "messagebird.lookupNumber",
  "version": 1
}