Create a lookup table

I’m moving across from make/integromat to n8n. In make I was using a data store to store a user ID and unique link for each user. Depending on what data came in, if user 1 sent a request the data store would be checked and the link used later down the scenario.

Here is an example from make:

1 Like

Hi @tonybelonie

Welcome to the community!

You can use a tool like baserow or airtable to create a table to use.
There is no such thing in n8n available itself at this time. But most tools like this should have a node you can use, so it should be fairly straightforward to set it up.

1 Like

One workaround would be using a Set-Node to store all the different users (could also be Baserow, Airtable, Google Sheets, … as @BramKn mentioned). And then have a separate workflow for each user. The DB (whatever you choose) would then save the information about which user links to which workflow.

Here an example workflow:

You can obviously also extend it by for example pretending an IF-Node that checks if there is an entry for a user and if not, do something totally else.

1 Like

Seconding that idea, here is a just a small screenshot as inspiration from a competitor tool which makes it super easy to use :slight_smile:

Hi @Olivier_de_Lamotte

If you are able to install community nodes.
There are 2 I created that might be of help for you.
You still need an external tool to set the values if using a template or use the code node for example to set this template. But it might make life a bit easier for you, so wanted to mention it anyways.

1 Like

Thanks @BramKn,
I do use for instance Google Spreadsheet to do it… but I sometimes tend to be rate limited as I have multiple tables. It’s doable but it’s quite overkill to use a Spreadsheet etc. just to do a lookup between (for instance) 10 values :slight_smile:

if it is just 10 values you can easily put those in code nodes as well. Or Set node.
Just create an array of json objects with a from & to value, and then split that in a item lists node.

It’s what I did for a case with 6 values, I used a Set node, but in terms of UX and readability, if you compare the 2 solutions here, it’s quite obvious which is the easiest to use :slight_smile:
On the one hand, I have 6 entries containing in total 12 ‘values’, in a table very easy to understand.
On the other hand, I have 12 pairs of entries containing in total 24 ‘values’, underneath one another which isn’t as easy to read.

And it’s 6 entries, of course I sometimes work with around 20 entries. Which doesn’t really make sense to use a database for, but isn’t small enough for this solution :slight_smile:

All in all, I’m not saying what I want to achieve isn’t possible, it is, but I really believe there could be some nice UX improvement on it!

Yeah you are correct it would be a nice UX improvement.
But to be honest, I personally prefer having the tables outside of the tool that is doing the integrations. As it gives you more flexibility and also a way for less tech savvy people to maintain.

There should be an actual feature request for this, so you might want to vote on that. :slight_smile:

Hey @BramKn,

I’m trying your applymap node, but I’m not sure how to actually create that map to use. Could you give an example in n8n?

Hi @bartv

There should be an example on npmjs/git

Sorry, I wasn’t clear: it does have an example, but it just says ‘make the table’, and I’m not sure how that works.

It should have a screenshot of an example table.

It does. I don’t know how to make a table :slight_smile:

Ahh, yeah then you need to try and find out how. You could use a code node. Or use an external table like google sheet and grab that :wink: