FB Messenger DM reply using google sheets data
Status: Open · Asked by Milind Natu on · 0 views

Hi Milind,
Thank you for explaining your use case in detail. Based on your requirement, we suggest slightly changing the workflow logic so that the system first understands the customer's message and identifies their intent and the information they have already provided.
For example, if a customer simply says:
“Hi, I want to buy a property.”
There is no specific requirement available yet. In this case, the workflow should not search the Google Sheet. Instead, the AI should respond naturally by asking for the required information, such as:
Preferred location/locality
Property type (2 BHK, 3 BHK, shop, plot, etc.)
Budget
Mobile number
However, if the customer says:
“I am looking for a 2 BHK in Vijay Nagar. My budget is around ₹50 lakh.”
The workflow should first extract the information already provided in the customer's message. It should then identify what information is still missing, if any, and ask only for the missing details.
Once all the required information is available, the workflow can proceed to the Google Sheets – Get Rows step and retrieve the relevant property records based on the customer's requirements. The retrieved property data can then be passed to the OpenAI/ChatGPT step, which can generate a natural and concise response for Facebook Messenger.
So, the recommended flow would be:
Facebook Messenger → AI/Intent & Requirement Analysis → Check Required Information → Router/Filter
If information is missing:
→ Ask the customer only for the missing details → Wait for the next message
If all required information is available:
→ Google Sheets – Get Rows → Filter/Match Properties → OpenAI/ChatGPT → Generate Reply → Facebook Messenger
This approach will make the automation more conversational because the AI will first understand what the customer wants and what information they have already provided, instead of asking the same questions every time.
Your current prompt is trying to handle all of these scenarios inside a single AI step. It would be more reliable to divide the process into these stages and pass the output of each stage to the next step.
For the OpenAI step that generates the final reply, you can then provide the customer's message, extracted requirements, and the matching property data from Google Sheets. The AI should be instructed to use only the information provided by the workflow and generate the exact message that should be sent to the customer.
This structure should be more suitable for the use case you described and will also make it easier to manage different types of customer inquiries.
Thanks & Regards,
Soumya Tripathi
Customer Support Lead
🌐 Pabbly.com
Dear Soumya Ji,
Thank you for prompt reply. How to do "AI/Intent & Requirement Analysis", which module should I use to do this?