SMS has a link in it and i need a single string from that!

So I have my phone system shoot me a webhook every time a text is recieved. When there is a zillow link in that text I want to extract the zpid and then call the api I use from RapidAPI to send me back property details. Then I take those details and create an custom module entry in zoho crm for each property.

I am totally new to most of this, but I seem to be catching on quick.

I got the webhook, got my filter to decide if there is a zillow link, i then got the zillow url. I am having trouble extracting just the zpid from the url though. I have tried multiple ways and read every forum post, I just can’t seem to get it

the url will always look like this sometimes it will have a variable on the end like this,8
regardless, I just need the “2062411787_zpid” part from every url

This is probably the closest I got using code

def extract_zpid_from_url(urls):
    # Extract the ZPID from the Zillow URL
    parts = urls.split('/')
    zpid_part = parts[-2]  # Get the second-to-last part of the URL
    zpid = zpid_part.split('_')[0]  # Extract the ZPID from the part before the underscore
    return zpid
output = extract_zpid_from_url(urls)

Like I said, I am new to all this, copy paste is my best friend at this point

Running version [email protected] cloud

Hi @djjace, welcome to the community!

Your example code seems to strip the _zpid part, but would otherwise work when testing this just now using the below example workflow:


If you’d rather keep the _zpid part you can simply return your zpid_part value instead in the the new field:

Is this what you had in mind?


You are awesome!!! I knew I was close!!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.