• Instructions to Ask a Question

    Click on the "Ask a Question" button and select the application for which you would like to ask questions.

    We have 5 different products namely - Pabbly Connect, Pabbly Subscription Billing, Pabbly Email Marketing, Pabbly Form Builder, Pabbly Email Verification.

    The turnaround time is 24 hrs (Business Hours - 10.00 AM to 6.00 PM IST, Except Saturday and Sunday). So your kind patience will be highly appreciated!

    🚀🚀Exclusive Discount Offer

    Just in case you're looking for any ongoing offers on Pabbly, you can check the one-time offers listed below. You just need to pay once and use the application forever -
     

    🔥 Pabbly Connect One Time Plan for $249 (🏆Lifetime Access) -  View offer 

    🔥 Pabbly Subscription Billing One Time Plan for $249 (🏆Lifetime Access) - View offer

Lookup a value in one SQL table with another SQL table

I want to look up a value in one SQL table and compare it with another SQL table. If the value is found, then I want to send a message to the contact number associated with that value
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

Can you please elaborate on the exact use case you are trying to achieve? Please try to explain the scenario as:

1. Trigger (If this happens)
2. Action (Do this)
3. Action (Do this).............
 
1 Trigger (New Row in a 1st Mysql table): Take a value(Example battery serial number) in column
2 Action: look for the battery serial number in the 2nd MySQL table and pick the contact number associated with that battery serial number
3 Action: send a message to that contact number
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

We have created a reference workflow in your account which can fulfill your use case. Please add a test record in the SQL capture the response on the "Save and Send Test Request" button and map the details accordingly, refer to the attached screenshot to learn more about the workflow.

Workflow Name: pabbly test
Workflow URL: https://connect.pabbly.com/workflow/mapping/IjU3NjYwNTZjMDYzMDA0M2M1MjZiNTUzYzUxM2Ei_pc

1731485807372.png


Do a few tests and let us know if it works for you.
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

Can you please confirm if you have added a new row in the table before clicking the Save and Send Test request button?

1731492033260.png


If not please add a row and capture the response by clicking the Save and Send Test Request button.
 
Hi Preeti, My exact requirements are as follows.

We need to send messages(Saying reconnect your battery to Bluetooth) to customers whose updated time is more than 10 days from today's date
pab req.png


1 Trigger : Check for the updated time in the table for more than 10 days
2 Action: If the update time is more than 10 days, get the battery number(DeviceNames) in the MySQL(BMS Cloud DB)
3 Action: Look for that battery number in another MySQL(SQL PURE)
4 Action: fetch the contact number from MySQL(SQL PURE) and send a message
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

Your use case seems to be feasible.

Can you please confirm the Table names of both the required tables under BMS Cloud DB and SQL PURE? Also, please provide us a device details whose update time fulfills the condition of your use case.

Please note that the trigger can't be a search event. If you want to run this workflow at a particular period you can use Schedule(Pabbly). Also, we have made a few changes in the pabbly test workflow please avoid making any changes to it.
 
Table 1 (BMS Cloud DB): DL_ThingBase
Table 2 (SQL PURE): Master_Vehicle_Inventory

Device details whose update time fulfills the condition:
1 UpdateTime Less than 10 days (Should not trigger message)
2 UpdateTime More than 10 days (Need to trigger message)
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

Does the Battery number is in the same format in Table 2 (SQL PURE): Master_Vehicle_Inventory as it is in Table 1 (BMS Cloud DB): DL_ThingBase? Can you please provide us with the screenshot of the table2?
 
Hi Preeti,

We tried the above workflow, but we feel many complications in the Database from our side. To simplify, we moved the data to a sheet. Now the requirements as follows

1 Get all contact numbers from the sheet(which UpdateTime is more than 10 days from the current date). For example, Toady is 15th November so we should get all contact numbers that UpdateTime is all backward from 5th November
2 Action: sent SMS from SMS alert (Template: tmpl-183713)
3 Action: get the SMS delivery/failure report

I have created a sample flow. please review and if it wont works please help me with the flow
Flow Link: https://connect.pabbly.com/workflow/mapping/IjU3NjYwNTZjMDYzMTA0MzA1MjZjNTUzMTUxMzQi_pc
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

Upon checking your workflow it seems that as per the current structure, it will not fulfill your requirement you might have to make some adjustments. It would be better if you could join us on a Google Meet, this way we could better assist you.

Please let us know a convenient time for you to join us between Monday - Friday between 11:00 AM - 1:00 PM IST or 4:00 PM - 5:00 PM IST.
 

Preeti Paryani

Well-known member
Staff member
Hello @Madhav.Seelam

To resolve this issue I have added a free step to your workflow after the iterator step to get the UpdateTime in Timestamp format, refer to the attached screenshot.

1732608770418.png


I have also made changes to the step before the filter step to get the current date in timestamp as well, refer to the attached screenshot.

1732608868182.png


I have then mapped the UpdateTime timestamp received from step 4 in the filter as a label and then mapped the current date timestamp received from step 8 in the value field, now it seems to be working fine.


1732608943649.png
 
Top