This topic was automatically generated from Slack. You can find the original thread here.
Good Day, any chance someone has a quick moment to help me figure out where & how I’m supposed to add the code snippets for Notion API filtering in Pipedream? I want to add new Orders from my LemonSqueezy into two separate Notion Databases. The 1st capturing the Contact info, and the second capturing the Order detail (those two pages would then be related to one another) —— but I want to first check if the contact exists first… I’m having trouble figuring out how to search (filter) a Database by an Email property column. (edited)
Here’s a screenshot of my attempt… though I just kinda threw some AI generated lines of code in between a section then replaced certain values to try & make it connect to my workspace/database/email-property. I’m sure the code will look horrible to anyone who’s proficient in JS, so pardon me lol.
Hey, yeah I guess I am far too new to using Javascript, but I just don’t know how or where to place the filter code lines when it comes to the Pipedream side.
When you first create a Node.js action for Notion, it pre-populates with some code… and I’m guessing it’s necessary? So I just didn’t know how or where to modify it with the specific code injections from the Notion API
Sure thing. You’ll just have to look at the scaffolded Node.js code and compare it against that Notion API endpoint for querying a database, and just try to run a sample request first. Then learn how to modify the request to pass that email value dynamically.
not gonna lie I’m pretty overwhelmed by this & feel as though I should have learned JavaScript years ago to be able to make this make sense… not sure why the smallest things are foiling me on this lol, but okay. I’ll keep trying to get through it and make sense of it. Appreciate ya.
Sure thing. There are quite a few Javascript basics courses out there. Any one of them should teach the fundamentals, then you can learn how to send API requests, which unlocks this power to integrate apps together like you’re trying to here.