• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

email splitter not working properly

sdamceski

Member
Your Task History ID
IjU3NjMwNTY1MDYzMzA0MzU1MjZlNTUzNzUxMzQ1MTYzNTQzMiI_3D_pc
I'm have a workflow where an lead email is received in the Pabbly Email Parser in adf format. That is also the trigger of this workflow. Then we use text formatter/text parser to extract specific information in our example is the lead information which is First Name, Last Name, Phone Number, Email address etc.... and then we use LeadConnector V2 to create/update contact in GHL.

The lead source send the email in adf format that is captures by pabbly, in our example we noticed a problem. The phone number of the prospect is provided in this format "<phone type="home">(740) 253-6483</phone>" What we do is we use the text formater/text parser to extract the phone number. In the
Text match: after, we enter <phone type="home"> and in Text match: before, we enter </phone>. The text parser then works perfect. But sometimes the lead source email instead of "<phone type="home">(740) 253-6483</phone>" it comes as follow "<phone>(740) 253-6483</phone>". In this case the text formatter/text parser extract everything before </phone> in that body text of the e-mail so its very large text. And then this workflow fails when LeadConnector V2 with a message "The string supplied is too long to be a phone number" since the message body for the phone number field is too long when it tried to create new contact.

So I was trying to find a good solution for this. I thought that if the step for extracting the phone number should fail since it cannot find any field that is "<phone type="home">" it should fail instead of pulling everything before </phone>. If it would fail there I could use the Ignore Error function for this step and have another step right after this that will recapture the phone number if the phone information was like this <phone>(740) 253-6483</phone>. And I could use a filter to ignore the second capture if the firstone is exicuted.

So im looking for some help and good solution for this. Thank you.
 

ArshilAhmad

Moderator
Staff member
Hi @sdamceski,

You can add a Router to your workflow with the following filter condition.

Route 1: This Route will be executed only when the text contains <phone type="home">
1711312972246.png


Route 2: This Route will be executed only when the text does not contain <phone type="home">


https://connect.pabbly.com/workflow...LUzIOGlZSCF4GdQMZU0FQU1wmA05RKlQZXG8IVgMrVzY#

Both of these routes have Text Parsers with different conditions and will provide the correct value to the LeadConnector action step. You need to add LeadConnector action steps to both of these routes.
 

sdamceski

Member
Thank you. I got it figured out and its working fine. However I have another question related to this. Is it possible for the text parser lets say it is suppose to extract the phone number from this line "<phone type="home">(888) 888-8888</phone>" in the text match after we will add <phone type="home"> and in the text match before we will add </phone>. In case that this information does not exist in the email captured can it be set to fail? and if it fails I can use "Ignore Error (Enable)" function to skip this provess and the workflow to continue and send everything over to lead connector without that field been populated?
 

ArshilAhmad

Moderator
Staff member
In case that this information does not exist in the email captured can it be set to fail?
I am assuming that by "does not exist", you mean that the information will come in this manner: <phone type="home">

If so, then no, the Text Formatter won't give you an error but rather output the same value it was fed.

1711828024610.png
 

sdamceski

Member
Well in the Text (Required) field we need to have the body text message so that the text formatter will reference to it to find and extract the information we are seeking. Thats how I understand this to work.

In this situation we have a line of text that has <phone type="home">(888) 888-8888</phone> so by setting up the text formatter as its set up above it will extract the phone number which is what we are intending to.

The question is if the email that was captured was missing that line so there is no line that exists as <phone type="home">(888) 888-8888</phone> then the formater will apply the whole body text to that field. So insted of applying the whole body text to the field meant for the phone number to be extracted can it be like blank or something?? because what happens sometimes is if that information is not presented in the captured email then we get the whole body text message in the phone number field and when that is tramismitted to leadconnector it fails because the text phrase is too long for that field in leadconnector. I hope this makes more sense. I know that I could use the Filter option as you mentioned above but was looking for an easier alternative.

Another reason im seeking better solution is that we have multiple lead sources that we use to capture leads and they all use very similar adf format to transmit the lead information and right now we have to use seperate workflow for each lead provider since there few variables that are different in their email format. It would be easier if we used one workflow to capture all the leads in the same workflow.

Thank you.
 
Last edited:

ArshilAhmad

Moderator
Staff member
Well in the Text (Required) field we need to have the body text message so that the text formatter will reference to it to find and extract the information we are seeking. Thats how I understand this to work.

In this situation we have a line of text that has <phone type="home">(888) 888-8888</phone> so by setting up the text formatter as its set up above it will extract the phone number which is what we are intending to.

The question is if the email that was captured was missing that line so there is no line that exists as <phone type="home">(888) 888-8888</phone> then the formater will apply the whole body text to that field. So insted of applying the whole body text to the field meant for the phone number to be extracted can it be like blank or something?? because what happens sometimes is if that information is not presented in the captured email then we get the whole body text message in the phone number field and when that is tramismitted to leadconnector it fails because the text phrase is too long for that field in leadconnector. I hope this makes more sense. I know that I could use the Filter option as you mentioned above but was looking for an easier alternative.
You can try using Code by Pabbly to create such a tool, but we won't be able to assist you with the code as it's beyond our scope of expertise. (You can use ChatGPT to write such code).

Other than that, adding a Router to your workflow in the manner I have suggested above is the only way you can achieve your use case.
 
Top