We are using Noloco for building our app for keeping track of delivery of our courses. We can send SMS-messages to participants in the courses, and they can respond to these. We have a table in Noloco for these responses. We would like to use make.com to maintain this table.
blueprint.json (16.0 KB)
The issue: we don’t want a new record created if it exists in the Noloco table from before.
- Twilio module: We get the last 20 incoming messages from Twilio (one field is messageID)
- Array aggregator (makes this in to an array)
- Noloco module: Get all messages from the table. The messageID is not the primary key, but is one of the fields.
- Array aggregator (makes these into an array)
- Iterator (to make the rest of the scenario loop 20 times for the Twilio messages)
- Router (if messageID do not exists, make record, if not do nothing)
I can’t figure out how to check if the messageID already exists in the router. How to check all of the records from Noloco, for each of the 20 iterations. One more iterator? Or something completely different?
How is the filter setup?
Just have each item from twillio be filtered through from the iterator by using the array contains filter.
Issue is that this solution might not be ideal as your database grows. Searching through a large array each time will increase the time and data the scenario uses. Although this saves you operations you might want to have a search step for each bundle that comes out from twillio. This way it will be built to scale.
Thank you for your answer!
We’ll make another scenario that will delete records older than a month. It will not be that many records.
So what you mean is something like this:
- Twilio module: We get the last 20 incoming messages from Twilio (one field is messageID)
- Array aggregator (makes this in to an array)
- Iterator (to make the rest of the scenario loop 20 times for the Twilio messages)
- Noloco module: Search for this message in existing table
- Router, if there’s 0 records returned, make a record else do nothing
The number 4 will be a bit hard, as it wants the primary key to search for, which is something else than messageID.
This is the filter for the router, before any changes. This will clearly not work!
Okay i see.
Looks like you just need to fix the filter. You cannot use text operators, instead use an array operator.
Map the array from noloco aggregator. Then use the array aggregator contains. Then map the message id from the iterator for the bottom value.
Basically what this does is it will search the array for any values that contain the specificed text value.
Hope this helps!
1 Like