Best answer

Add call code to phone number

  • 14 July 2022
  • 2 replies

This post has been edited by a moderator to remove personal information. Please remember that this is a public forum and to remove any sensitive information prior to posting.

Hi there, I am trying to solve the following problem.

I have some phone numbers that get input into my current database sometimes with the country code, and other times without the country code.

These numbers are posted via API into a CRM, and actions in the CRM trigger activities to occur via Zapier.

I wish to use this Zapier trigger to action the sending of an SMS/Viber message. 

The platform I am using to send requires that the phone numbers contain international call code infront. I am in Greece, so this is 30, without the plus sign. 

So a number 6910xxxxxx would change to 306910xxxxxx.

Basically any number that begins with 69, which is all Greek mobiles, would change to 3069, and the rest of the number. 
A number that already begins with 30 should not change.

How can I achieve this with the existing Zapier filters / text transforms?


Best answer by Danvers 14 July 2022, 17:22

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @Christian Homi!

The simplest way to achieve this would be to use Paths by Zapier. You can use paths to set up a filter so that if a phone number starts with ‘30’, the Zap follows one set of steps (ie nothing is added to the number) and if it starts with ‘69’ then it follows another set of steps where the ‘30’ is added to the front of the number. If you don’t have a Professional Plan or higher, you wont have access to Paths but don’t worry, there’s another way to do the same thing. 

You can create two Zaps and add a filter just after the trigger step (or whichever step finds the phone number). For one Zap, set up the filter so that it will only continue if the number starts with 30 and for the other Zap, set the filter so that the Zap will only continue if the phone number starts with 69. So, your filter step would look a little like this:

Does that help you get started in the right direction? Let me know if you need any help with the filter step, or if you’d like to know what steps to use afterwards let me know what apps you’re passing the information to and we can have a think about where to go next :)

Thank you. Works a charm.