Stop duplicate records in Make with a Data Store
Remember IDs from one run to another. Block duplicate records. Try a missing ID on Make Free. Overlapping runs, see limits.

A recurring make scenario can reuse actions if the same record is received twice. With the Data Store you can store records between runs (Make Data Stores) You could use this to check the ids already stored before saving another record.
Our make free scenario was a made up order id. First run saved the id. Send that id again, filter in connection (Data Store modules) fires on that and the bundle halts before Add/replace a record can save it. Save a new record with a new id. No live orders, emails, webhook deliveries during trial.
For recurring, nice to have persistent ids. For one-time list, maybe just removing rows with duplicate spreadsheet rows would do.
Before you start
You'll need to be set up with a Make account for this practice. Create a Make Free account (opens in a new tab) or log into an existing account. You'll need a spare Data Store to practice with (not a data store associated with an active scenario). Don't mess up any store associated with an active scenario.
1. Create a store for the IDs
You need a single practice data store. Make's free plan gives you a single store. It has 1 MB capacity. So check out current limits: Make plan limits (opens in a new tab). Before you start, if you already have a data store - don't touch it. Only proceed if you can set up a separate practice store.
- In Make, go to Data stores from left menu. Then click Add data store.
- Give it a name. Name it Seen order IDs practice.
- Don't touch Data structure. We don't need it. In this practice store we save only the primary key. So IDs, the primary keys that identify each record.
- Fill Data storage size in MB - 1. Then click Save.
You should see a new empty store in the list. And you should keep it separated. Don't mix it with the records you use in your working scenario.
2. Add a fictional input ID
- In the Scenarios open Create a new scenario and give it a name. I called mine Duplicate ID practice.
- Next, add Tools to the scenario and select Set variable.
- Enter event_id for Variable name and order-1001 for Variable value.
- Next, use the Save button on the module. Leave the scenario as Inactive and run manually for this practice. This variable gives you a single repeatable example of an ID. The data is only good for the run. The ID will persist in between runs in the Data Store. The difference is explained in Make's documentation for scenario variables here. (opens in a new tab)
3. Check whether the ID already exists
- after Tools make another module. Select Data store and then Check the existence of a record.
- Data store click on Seen order IDs practice
- Key - select output event_id from Tools. For example in this case it is 1. event_id
- Save button of module selection.
Exists output of module is true/false. Both Data Store modules should have the same store and the same mapped ID. If you type in key 'event_id', it will not select the value of the variable (by typing words event_id)
Watch out
Use the same id when this same event occurs again. A new timestamp or random id will break this check. Use an event id if you want all these updates to same customer/order to pass. (Using just a customer id will consider all of these updates to be repeats.)
4. Write only IDs you have not seen
English language make practice has now the second Data store module with Add/replace a record. It chooses Seen order IDs practice for store. It assigns Key to 1. event_id again. No for Overwrite an existing record. Next Save to save this module. Last action in make practice adding unseen ID as a record.
- Double click the arrow in between the two Data Store modules to get to Set up a filter. 2. Set Label to Only unseen IDs. 3. For Condition, choose Exists output of your exists check module. Our module is 2, so token will be 2. Exists.
- Select Boolean operators: Is false. Then click on filter's Save button. 5. Click Save on scenario toolbar.
With this filter, your record writing module will only be executed if check returns false. The record-writing module will only be executed if check returns false. Please check Make's documentation for filtering (opens in a new tab) for explanation about what happens with unmatched bundle at the connection. Bundle is a piece of data that travels through the scenario.
In our case, it will only execute if Exists output of our exists check is false. More about filters for beginners here.
5. Run the same ID twice
- Run Run once. Wait for it to complete.
- Go to the numbered result bubble above Check the existence of a record. (For first run of order-1001 you'll see Exists: false.)
- Confirm that also Add/replace a record was executed. Go to another tab and go to Data stores. Open your practice data store. Find key order-1001.
- again on scenario scenario again run once without changing ID
- open existence check result. you should see Exists: true
- see filter result + final module result. on our repeat run only unseen ids has 0 pass bundles. add/replace record skipped by the filter - not executed module
- set in Tools: Variable value: order-1002. save module. scenario. run once. now it should pass with different ID
we've checked store separately after runs. we've seen order-1001 and order-1002 in store. repeat order-1002 stopped at same filter.
6. Check the missing-ID failure
For the no id practice- just go to the Tools module and set the Variable value to be blank so that the mapped event_id is blank. Save the module and scenario. Then, Run once. We got BundleValidationError and Missing value of required parameter 'key' error on the existence check module. Record writing module did not run.
Do this check yourself. Restore order-1002 afterwards. Then save the module and scenario. Run again. Our restored input went fine and it still stopped on a duplicate. Keep the practice scenario Inactive.
If repeats still get through
Look at the result of exist check for each run. Key input. It should be the same for multiple deliveries. Make sure both modules are using the same store. Mapping the same id. And filter Is false Use the same. Also make sure to look at the module settings in store after you edit.
If Key is blank. Get your mapping source right first. Also do not leave Key blank in write module. Make documents it generates new key if Key is blank. Generated key can't recognize repeated event.
Keep id's for the time you need to recognize repeated event. You can let through the id if you remove a remembered id. Store limited capacity is also used for records. So think what you want to keep before you implement this to a growing workflow.
If you connect a webhook or another action
These are not a live test with a webhook. These are based on documentation and step order.
By default instant webhook scenarios are parallel. This means if two overlapping instances run, it's possible that both can attempt to check for an ID, before either actually saves it. In Process data in order Make's webhooks doc (opens in a new tab) describes this scenario waiting for the previous instance to complete. But it doesn't sync separate scenarios that use the same store.
Second problem if you add a external action. If you save the ID before the external action, then a failure for the action could result in the ID appearing as seen. If you save it after, the external action could be repeated if there was a failure after the external action but before the save. This approach is not exactly once.
Before you send emails, make orders, or take payments, first see if that destination has an idempotency key which they use to identify and reject a repeat request. Plan and test how you'll handle failures with that destination before using the workflow.
To get comfortable with remembering one dummy id to reject repeat, start with Make Free (opens in a new tab) and leave your scenario inactive. Test the duplicate and failure handling of the destination on its own before you add an actual external action.
Sources: Make Data Stores (opens in a new tab), scenario variables (opens in a new tab), filters (opens in a new tab), webhooks (opens in a new tab), and plan limits (opens in a new tab).
Share this post
From holdmytwist.com/blog/make-data-store-stop-duplicates/


