Comparing info from API against Airtable data

Describe the problem/error/question

I am trying to compare a video ID that gets pulled into my workflow from an API against the ID’s already stored in Airtable. My desired outcome would be that if there is no match, the data continues on to be processed, and if there was a match then it would just disregard. I am using the IF node right now and it works, the only issue is it doesn’t pass the data of the non matching ID’s through, It just comes up as empty from the Airtable search. I have tried to used the compare datasets node but haven’t figured it out and the verbiage in the documentation really confuses me. Any help is appreciated.

What is the error message (if any)? No error, is my process sound? Is there a better way to do it?

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 0.220.0
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Self Hosted - No docker
  • Operating system: Ubuntu 22.04

** UPDATE **

I pretty much got it to work. If anyone has any suggestions on ways to streamline it I’d welcome that feedback. I kept getting the entire list nodes data in one of the outputs, and also received an empty value in one of the outputs (both from the first IF node (not in the loop)) so that is why there is some extra set nodes.

HI @wtheory, if your workflow works I’d leave it at that tbh. A working workflows is a good workflow as far as I am concerned :wink:

But seeing you’re asking for advice, perhaps you can share examples of the JSON data you want to compare? You can of course redact any actual confidential values, this is just to give me an idea of the data structures you’re working with.

To avoid duplicates, you might also want to look at the Merge node: Merge - n8n Documentation

1 Like

Hi @MutedJam, thank you for replying! Here is the workflow that I came up with. I haven’t extensively tested it. Sometimes I just have to step away and work on another part of the workflow. Then in the middile of the night I’m like “WAIT! Let me try this!” :slight_smile: and jump back in. But I have tested it a bit and it seems to accomplish what I was after.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.