How do I validate and format a phone number when I don’t know which country it is from?

I can’t seem to be able to deal with processes when BREVO module marks the phone as invalid

the phone validation module imposes me to pick an area code…

How do I validate and format a phone number when I don’t know which country it is from?

Welcome to the Make community!

Can you provide some examples?

Can you verify what format Brevo requires? You can find this information from the Brevo API documentation.

If you need further assistance, please provide the following:

1. Screenshots of module fields and filters

Please share screenshots of relevant module fields and filters in question? It would really help other community members to see what you’re looking at.

You can upload images here using the Upload icon in the text editor:
Screenshot_2023-10-07_111039

2. Scenario blueprint

Please export the scenario blueprint file to allow others to view the mappings and settings. At the bottom of the scenario editor, you can click on the three dots to find the Export Blueprint menu item.

Screenshot_2023-08-24_230826
(Note: Exporting your scenario will not include private information or keys to your connections)

Uploading it here will look like this:

blueprint.json (12.3 KB)

3. And most importantly, Input/Output bundles

Please provide the input and output bundles of the modules by running the scenario (or get from the scenario History tab), then click the white speech bubble on the top-right of each module and select “Download input/output bundles”.
Screenshot_2023-10-06_141025

A.

Save each bundle contents in your text editor as a bundle.txt file, and upload it here into this discussion thread.

Uploading them here will look like this:

module-1-input-bundle.txt (12.3 KB)
module-1-output-bundle.txt (12.3 KB)

B.

If you are unable to upload files on this forum, alternatively you can paste the formatted bundles in this manner:

  • Either add three backticks ``` before and after the code, like this:

    ```
    input/output bundle content goes here
    ```

  • Or use the format code button in the editor:
    Screenshot_2023-10-02_191027

Providing the input/output bundles will allow others to replicate what is going on in the scenario even if they do not use the external service.

Following these steps will allow others to assist you here. Thanks!

2 Likes

Here you go sam

thank you

INPUT
[
{
“email”: “ifo604635211@qq.com”,
“listIds”: [
16
],
“attributes”: {
“SMS”: “39456565”,
“USCITA”: “13-03-2024”,
“CHECKIN”: “11-03-2024”,
“LASTNAME”: “Test”,
“WHATSAPP”: “39456565”,
“FIRSTNAME”: "Daniele ",
“STRUTTURA”: “FLAT”
},
“updateEnabled”: true,
“emailBlacklisted”: false
}
]

OUTPUT

[
null
]

blueprint (1).json (108.1 KB)

According to the Create a contact endpoint in Brevo, the accepted formats are as follows:

Mobile Number in SMS field should be passed with proper country code. For example:
{"SMS":"+91xxxxxxxxxx"} or {"SMS":"0091xxxxxxxxxx"}

Try adding a plus symbol in front of your phone number, or add two zeros.

2 Likes

Yes I am aware of that. I already process tens of numbers everyday with the module processing them succesfully
BUT
Sometimes even if there’s an area code the number is for some reason tagged as INVALID (probably too short), this makes BREVO module not to create the contact and place the process in the incomplete section.

My question is what to do in those cases as I would still want Brevo module to create the contact even without telephone number (I also import email and contact details)

Attached the google sheet sample from which I pull the data

In that case, you could just link a cloned module into the error handler, and remove SMS from the attributes.

2 Likes

that’s an Idea I was testing…

I just wanted to find a cleaner solution… :smiley: