How can I do a basic lookup on Airtable using Node js?

Hi everyone - I’m a total beginner to Node js but it’s very frustrating, that after hours of searching on Airtable Docs as well as through the community, I can’t seem to find the answer to one of the most basic things a user would want to do with a database.

In short - I’m trying to do a lookup. Given a “phone number” of “(454) 382-9029”, I want to return the “Full Name” of “Carol Lerner”. I want Airtable to access the right record and the code to print the “Full Name”.

In Excel this takes 2 seconds to do. I’m at a loss why this has been so difficult to find code for on Airtable Docs or Community on Node js. I know that I’m a beginner. I’m not sure why it’s so difficult to see how to do something like this. My code won’t really be of much help here as I keep getting errors when I try to run it.

Thanks for taking a look and hope you can help.

Hi @J_Mai, and welcome to the community!

And yet, with an insight into what you’re trying, community helpers will be able to avoid wasting their own time starting from scratch. I recommend you share ALL your details if you want to get people to help you. If not, take a look at this.

Okay, great point @Bill.French. Here’s the code.

var carolNumber = "(454) 382-9029"

      maxRecords: 3,
      view: 'Grid view'
  ).firstPage(function page(err, records)
      if (err) { console.error(err); return;  }
      records.forEach(function(record) {
          if(record.get('Phone Number') = carolNumber)
          console.log('Lookup is', record.get('Full Name'));