• Instructions to Ask a Question

    For any assistance, please click the "Ask a Question" button and select the Pabbly product for which you require support.

    We offer seven comprehensive applications designed to help you efficiently manage and grow your business:

    Our support team endeavors to respond within 24 business hours (Monday to Friday, 10:00 AM to 6:00 PM IST). We appreciate your understanding and patience.

  • Due to Holi celebrations, our team will have limited availability. While we’ll continue to monitor threads, responses may be slightly delayed.

Last user message variable in Pabbly chatflow

Grant Account Access for Support
  1. I authorize the Pabbly Support Team to access my account for troubleshooting purposes.
WhatsApp Number
+9718005775
Email Address
[email protected]
I am looking to send the last message received from the user.

I want to capture it, compare it and send it to Pabbly Connect.

Usecase:

User send a message --> if number send to Pabbly connect
else --> run the flow in chatflow.
 
I do nt what you understood.
What I mean is the most recent message form user.

I also do not know what will be the last user message.

is there anything for most recent message?
 

ArshilAhmad

Well-known member
Staff member
No, there is no trigger step that automatically checks for and triggers the flow based on the most recent message. A flow can be triggered when a specific keyword is received, when a user starts a conversation, when a user replies using a quick reply button, when a WhatsApp template is sent, and so on. There is no trigger available that checks for the most recent message and triggers the flow based on it.

1772656005924.png


Thanks & Regards,
Arshil Ahmad
Customer Support Associate
🌐 Pabbly.com
👉Rate your support
 

Preeti Paryani

Well-known member
Staff member
Hi @Viswanatha Reddy,

If your goal is to process the user's message in Pabbly Connect when it contains a phone number, you can achieve this using a webhook approach.

Steps you can follow:
  1. In Pabbly Chatflow, go to API & Webhooks.
  2. Add a webhook for the Message Received event and connect it to a Pabbly Connect webhook trigger.
  3. In the workflow, add Text Formatter (Pabbly) → Extract Pattern.
  4. Use the following regex to detect a phone number:
(\+?\d[\d\s\-]{7,}\d)
  1. If a number exists in the message, it will appear in the Result field.
  2. Add a Filter step and check that the Result field is not empty.
  3. After the filter passes, you can proceed with the required actions in the workflow.
For the other scenario (when the message does not contain a number), you can handle it directly in Pabbly Chatflow by creating a flow with the trigger Keyword/Regex Match and using the following regex that ensures the text does not contain a phone number:
^(?!.*(\+?\d[\d\s\-]{7,}\d)).*$
This way:
  • Messages containing a phone number → processed in Pabbly Connect
  • Messages without a phone number → handled in Chatflow flow
 
Top