Zapier webhooks to query API

Hi Monday community,

Essentially my question is:

How do I get zapier to match an incoming phone number parsed from an email to any items on any board that have the same phone number then place an update on that item?

Just a quick step by step of what I am trying to do for context:

  1. SMS send or recieved (trigger)
  2. Third party app forwards SMS to zapier dedicated email (done)
  3. Zapier parses the email to recognise phone number and message (done)
  4. Query Monday API through PUT webhook on zapier (struggling on this bit please see below)
  5. input text message into update of item id grabbed from previous step(not done)

I am a non-coder and have been following the developers documentation. I now have a coding question.
I have actually figured out how to do different queries through a POST webhook request from zapier. BUT I still can’t get the information that I want.

I have attached a picture below of the code I am using in case anyone is unfamiliar with the Zapier layout.

This is the same code as the one in the pic and it yields me the results for 1 board as I have used 1 board id only. However I want to scan for items across 5 board ids.

Query:
{
items_by_column_values (board_id: 12345678, column_id: “phone”, column_value: “0123456789”) {
id
name
}
}

I can scan multiple boards using this:
Query:
{

boards

(ids: [12345678,23456789,34567890,45678901]) {

name

state

board_folder_id

owner {

id

}

}

}

However when using the format to incorporate multiple board id’s I get an error telling me the id format is incorrect. I have the feeling this is just not possible this way.

Another possible workaround would be just scanning all “phone” columns on all boards but I don’t know how to do that either.

Essentially my question is:

How do I get zapier to match an incoming phone number parsed from an email to any items on any board that have the same phone number then place an update on that item?

This seems complex to me but I am hoping it is simple for someone else. Looking forward to hearing back.

Cheers,

Elliot.

Hey there @Elliot :wave:

Thanks for reaching out and allowing the community to provide their insight and support!

To be transparent with you, it seems like you would need to run an items_by_column_values query within the 5 boards that you’ve referenced, and I’m afraid that the items_by_column_values would only run for a single board at a time. I think that you might just have to go with this route, although it isn’t the most efficient.

What do you think? Let me know!

If anyone else has a better solution, I’d really appreciate your suggestions to help Elliot and other users within the community :slight_smile:

-Alex

Hi @AlexSavchuk ,

Thanks for your response on this. I was hoping I’d hear from you as you seem to have some good answers and understanding on a lot of other similar posts.

I thought you might say multiple queries would be the answer. I have already tried doing multiple queries. However the format is not accepted.
There is the option to add another line on Zapier however please see the screen shot for the message that appears.

The query tag at the start is then changed to:

I have 2 pieces of working code to run a search on 2 separate boards and I can’t get them to run in the same zap. I don’t think that there is an issue with any of the software it’s more just my lack of knowledge on how to drive them.

So you have any advice on how I might run this query that would be swell.

Looking forward to hearing back.

Cheers,

Elliot.

Hi community ,

Just an update on how I went with this.

I have heard back from Monday support about this. They have confirmed that you can only query the API once with the webhook. The feature to add more lines must must have been put there by zapier so it would work with different API’s for different software’s.

I ended up doing webhooks. It is actually an over complex process in my opinion, but it does work at the moment.

For anyone that’s interested the current flow is:

  1. SMS received on phone
  2. third party app used to forward to email (zapier automated email)
  3. parsing engine picks out number, messege text and status of incoming or outgoing
  4. zapier filter checks if the number is any of my personal contacts(put in the numbers)
  5. If not a number then continues (task 1)
  6. then does a path of A=outgoing message or B=incoming message (1 task)
  7. either path do 1 webhook to check if an item on my monday board(sales board) matches the phone number from the text (1 task)
  8. Then a second webhook to check if an item on my monday board (event planning board) matches the phone number from the text (1 task)
  9. Then there is another path way C/E= item ID exists on sales board OR D/F= item ID exists on event planning board (1 task)
  10. If either of them exist then it will update the respective board and item with the message of the text. (1 task)

The reason I have an incoming or outgoing step is so that I can have “Elliot text: message text here” or “Customer name text: message text here” show up in the monday item update. It is much neater on the other end.

For an unsuccessful message that gets through the first filter it is 4 tasks before being stopped by step 9.

For a successful update it is 6 tasks.

I think I can reduce the steps of the unsuccessful texts by putting the board search first and having the incoming/outgoing filter later.

The developer of the third party app is looking to have an option of blacking listing numbers that get forwarded so I won’t need the first filter step in the process. Obviously I would have to wait for that.

I am not a coder but I am interested in trying to put together some PHP or Python or one of those code options on zapier to maybe condense some of these steps.

Ideally the final result would be:

  1. SMS is pre-filtered by third party app
  2. email received by zapier as a trigger
  3. code is run to check boards for matching numbers and determine incoming outgoing status, then mutate board by adding text to item with matching number (1 task)
  4. Or update board with text message here is can’t be done in code step (OR 1 tast)

As it stands, even if all messages were successful ones. I have 2000 tasks per month. I can do 333 texts per month sent and received. That is if I am doing no other zaps. which I am so it is less than that.

So unless I can get it down to 1 or 2 steps it is not really a viable option.

There is a lot of information there I hope it helps someone haha.

Cheers,

Elliot.

Hey @Elliot,

your insight is really appreciated. You are a big gain to the community.

Thank you