So far I’ve got:
The client signs up on squarespace & a trigger is sent to notion & it updates a database with all the variables I want.
One issue I have, is with the router.
I cant figure out how to make it so that when a customer already exists, the database item just updates one single variable, rather than create a new database item all together.
Here’s what I have so far:
If a new client signs up, it checks for their email and if it doesn’t exist, it creates a new item in the database
If the email does exist, it just updates the existing item and only changes the “type” value in notion.
However this doesn’t work, I think maybe there’s a problem with what I’m specifying in the filter and targeting the correct item in the database when attempting to update it.
Also, I can’t figure out how to update my notion database when a customer cancels their order.
any ideas on this?
You made a lot of progress in it. What you want to do is, before the Router that you have, you need to Search the database items for the given database.
You can search using field Email against the email that you are getting from Squarespace. Once that is done, then you need to change the filter of each router path, IF the Search in Notion Yields item then you will need to update the items if not then create a new database item.
That nearly works! The filter is now correct.
But I get an error at this point when it’s trying to update the existing database
- The operation failed with an error.  path failed validation: path.page_id should be a valid uuid, instead was
What you need to do is in the Database Item ID, Use the ID from Notion instead of the Email that you are currently getting.
Got it! That works!
1 more question, sorry!
I can’t figure out how to update my notion database when a customer cancels their order.
I want to update a field when a customer cancels their subscription.
I’ve tried using the “cancelled” fulfillment option in squarespace, but i realised that when a customer cancels their order, it doesn’t actually update the fulfillment option to “cancelled”
Is there a workaround for this to get the same outcome?
Thank you so much
Here’s what I’m trying to do instead:
In simple terms:
Email Module watches for an email with the cancellation text & the same email that’s in the notion database - then it updates a field in that same item in the notion database
But stuck with how to specify the email address