Whatsapp API with Webhook querying immediately

Hello,

I have the scenario below that runs immediately when a message arrives on WhatsApp, but it is consuming a lot of operations. I wanted it to check only messages that arrive from certain numbers, but every message that arrives individually or from groups is checked and consumed by the webhook. What is the best way to adjust this scenario and only check messages from specific numbers? Is it better to use another module to start the scenario instead of the webhook?

thanks!

Welcome to the Make community!

That’s how webhooks work.

However, you can ignore the ones from continuing to the other modules in the scenario by creating a Filter.

For more information, see the Filtering page in the Make Help Centre, which covers the following:

  • Adding a filter
  • Operators
  • Copying a filter

and also,

  • Basic operators
  • Other operators

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

Thank you @samliew for the answer!!
I understand the idea perfectly and your suggestion is great!
But please help me with one more question: The Webhook that I set up to check incoming messages is the beginning of the scenario, do I add the filter later?
Because I’m thinking of leaving the webhook to check immediately when a new message arrives, but could you tell me how many operations the webhook consumes if it’s going to keep checking every time a new message arrives?
Do I need to add this filter to the Webhook? To validate only the WhatsApp numbers that I want it to check?

Thanks!

Minimum of one operation per scenario run.

Put your filter here:

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

No problem, glad I could help!

1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.

2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.

This marks the topic as solved, so that:

  • others can save time when catching up with the latest activity here, and
  • allows others to quickly jump to the solution if they come across the same problem

To do this, simply click the checkbox at the bottom of the post that answers your question:
Screenshot_2023-10-04_161049

3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.

This filter idea is great where you mentioned it, however, I still have a problem. If WhatsApp receives about 300 messages per day (between chats and groups) just to trigger the webhook it already takes 300 operations, even with the filter holding it so that it doesn’t go through to the others in the scenario.
Is there any way I can create a scenario that only responds to specific messages that arrive? Using Z-Api?? If you see any other way to build the scenario I accept suggestions. Note that my intention is to remain on the free Make plan (where I have 1,000 operations per month).
Thank you again for your help!
If you have any suggestions for a different scenario, because what I would like is: basically to respond to the message that the first scenario triggered, just that, I also use the ID of the message sent to respond.
Thank you again for all your help and attention.

In Make you can’t filter items as they reach the webhook.

You should investigate if you can configure WhatsApp to only send certain events to your webhook (I don’t know because I don’t use WhatsApp).

A webhook receives everything into the queue, and it’s up to you to process them or filter out.

Hope this helps! Let me know if there are any further questions or issues.

@samliew

P.S.: Investing some effort into the Make Academy will save you lots of time and frustration using Make.