Skip to main content

My zapier function gets some data from a webhook , such as Client Name, Client phone, etc. and it also contains the URL.

then I cross reference the URL on a google sheet table to figure out where to send it to.

My issue is that the URL that comes in on the webhook is 1 or 2 formats

domain.com/page or domain.com/page/ (one has a trailing slash and the other dosent)

and when I cross reference, I dont want to have to split and duplicate function for a version with and without a trailing slash

 

so Im trying to do something like dynamic value] || dynamic value]/ as the lookup value for the excel column, but that dosent work. 

 

Ive tried making the website 100% send the data with a trailing slash but that is way to complicated. Ive tried htaccess and all this stuff, and it still isnt 100% consistent. any ideas?

Hi @Dane M 

Good question.

We would need to see screenshots with how the data is formatted in the GSheet.


Gsheet is very simple. no screenshot needed - sheet has 2  columns

“Lookup Value URL” in Column A  and “Email” in B

 

The zapier workflow looks like this - 

  1. The webhook comes in with 3 values of Data - URL, Client Name, Client Phone
  2. Google Sheets Lookup column feature - URL is checked on Column A for Value of URL to Grab that Rows values
  3. Zapier sends an email using gmail zap - Email is Sent containing info from step 1 to the email address which matches in Step 2

Very simple stuff, but yea, the issue is that in Step 1  the URL comes in 2 formats. with trailing slash and wihtout.

In Step 2 the google sheet lookup , I use odynamic value from Step 1 URL] but I want to do that OR t“ “]/ (with the trailing slash), If I cant the workflow breaks


@Dane M 

We would need to see screenshots with how the data is formatted in the GSheet.


 


 


@Dane M 

I’d recommend using Airtable instead of GSheets as the lookup table.

In Airtable you can have 2 field for the URL w/ and w/o the trailing slash.

 

Zap Action: Airtable - Find Record

You can use the Search Formula field to search by both fields.

 


as you can see in my images, your “lookup spreadsheet row in google sheets” function has the ability to do an “AND Operand” with the “supporting lookup column”

If I were to fill this in, it would function the same as the AND operand.

However, the OR operand is either missing, or Im not sure how to fill it out. I tried the standard || notation from C++, and PHP and some other languages but that didnt really work.

 

Not sure what these screenshots are going to help you accomplish. It really just boils down to does this function have it or not.


Yea your Airtable function makes sense and would probably work, but I have about 20 excel databases filled in on google shared drive unfortunately. also its free with my email.

and then I have about 20 zaps programmed to these GSheets aswell sadly.

 

Well thanks for your time, I guess I just have to split and duplicate the code with a split function :(… reminds me of this nightmare I had to do lol 

 

 


@Dane M 

All you need to do is standardize the URL value using a Zap step, so that it matches the format of the URL in the GSheet.

A Code step could be used to do this.