I have a “contact” database collection (name, phone number) and a “message” collection (number, message and relationship to “contact” collection).
Here’s what I’m trying to do:
An incoming text message (via Integromat) will contain a phone number and message. Integromat listens for incoming text and then creates an Adalo “message” record with the number and message fields.
Now what I want to do is show the contact name associated with the message. So a list of contact names where there is a message record. I need to lookup the contact record based on number field or add contact ID to “message” record.
Is this possible natively in Adalo, or is it possible to somehow do it in Integromat, but without having to get a list of all contacts into Integromat first (which would be a really long list every time).
Ok if anyone cares, I solved this by adding a Data Store in Integromat that is updated with phone number, and Adalo Contact ID. Then when receiving an incoming message it gets the stored record based on phone number and creates the Adalo messages record with Contact ID.
This works. Unless someone sends more than one text message in which case I end up with duplicates, which I don’t want because I need to count unique responses
So my next questions is, how can I only show the latest message record and ignore previous records in a list for a contact ID or number? Doesn’t look like I can compare two dates in the same record…
I’m beginning to think I need an external database…