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.

1 Like

Hey @Elliot,

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

Thank you

@elliott

I am so sorry for my lack of response to you in this thread, especially as you were depending on it! I am really glad the support team was able to help you with your specific question faster than I was.

To be transparent with you, based on the workflow you are looking to set up, I’m not quite sure if Zapier is the right choice overall as it will indeed include multiple zaps along the way and take a lot of tasks/actions to achieve what you are looking for. I believe what you’re looking to achieve might be best to set up by using our API directly instead, but I definitely understand that might be stretching it at this point.

I appreciate your feedback and you sharing your workflow with us - I do think that’s a really nice and clean way to tackle this. :slight_smile: Perhaps in the future when we will be able to improve on the offering on our Zapier integration, it would be possible to run with fewer actions/steps as well.

-Alex

@AlexSavchuk is this something that an app inside of Monday could be built for? Or is the app platform not the right way to go about it?

I’m also interested in finding a solution for receiving sms and posting them as an update on a specific item. For CRM or support purposes.

Hi,

I have the exactly the same usage as you. My solution was to use integromat, which has something called router that could search different board for matching phone number and then post send or received msgs. It works well for me

Also, my number is a twilio number, I could use new message as a trigger to post update

1 Like

@Anderson

That’s a great question! Since apps use our API as well, I do believe this is something you’d be able to set up using both the Custom Integration Recipes blocks to get data from other platforms into your board using the API. This can also be used to pass your SMSs to the platform as updates or values to your board - I’d suggest taking a look at the quickstarts below:

API Quickstart Tutorial - Javascript

It should be a great way to get an overall feel of the API and how to get started with the framework there :slight_smile:

@captain Awesome, I am a big fan of Integromat as well! Their Router feature is just fantastic in my opinion :slight_smile: Glad it works for your use case!

-Alex

Hey @Anderson,

you can also check the apps section and get inspiration from the awesome apps people built.

Greetings

Hey Captain,

I might look into Integromat. Good to know it is possible on there. Trouble Is I have already paid the year subscription for Zapier and would have to rework so many Zaps across to Integromat and see if they recredit a partial year.

It’s a fair bit of work but may be worth it if I can solve a few issues at once.

Cheers,

Elliot.

Hey Alex,

I kind of have an idea of the script writing bit. I am just trying to get my head around the trigger.

Once I have the code. How do I actually execute it? I feel like I don’t know how to ask the question properly so it is really hard to find on google. It just keeps coming up with javascript code writing guides.

I have seen that you can use your browser but also read in the quickstart guide you can’t do that. (see pic)

So when it says “execute code on a server” is this another program? Do you have any suggestions on a good place to start with this?

Looking forward to hearing back.

Cheers,

Elliot.

For anyone interested,

This is how I managed this without code. I wouldn’t recommend it without a huge Zapier plan or only a handful of leads because it uses a lot of Zaps. Hopefully if gets you on the right track and you can make it more efficient for your use case.

Looking forward to hearing how others have achieved this also.

Cheers,

Elliot.