Best answer

Suppressing Slack notifications for Notion database updates


Userlevel 1

Hi - I set up a zap that sends a slack notification whenever a notion database item is updated. This helps keep my team updated on new information regarding our customers.

 

I’d like to suppress the notifications to only send 1 per database item per day (in the case that an item is updated multiple times in a day). 

 

Is this possible?

 

Thank you!

icon

Best answer by Troy Tessalone 16 August 2023, 21:44

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

10 replies

Userlevel 7
Badge +14

Hi @jbascend 

Good question

You’ll have to add more advanced logic to achieve this.

That means logging the updates per day. (find/create + update)

Then you have to have another Zap that runs on a schedule to find all the applicable records to send to Slack.

Airtable could be used for this, but not if there are lots of items updated per day (e.g. 100+), then even more logic has to be applied.

Userlevel 1

Thanks, I think this is worth looking into. Would this work with Google Sheets? There won’t be more than 10-20 items per day.

If you’re able to point me in the right direction to get up to speed on find/create + update I would really appreciate it, haven’t used that logic before.

Userlevel 7
Badge +14

@jbascend 
GSheets has these Zap actions for getting 1+ rows.

You’ll need to add a Date column (e.g. YYYY-MM-DD) to use to group the item changes by date.

You’d use the Date as the lookup field in the GSheet Zap action. (e.g. find all rows that have 2023-08-15)

 

Userlevel 7
Badge +14

@jbascend 

For the logging/updating of the GSheet data, try these Zap steps:

Action: GSheets - Lookup Row

Check the checkbox to create a row if not found

 

If you need to update the row, then add this Zap action: GSheets - Update Row

 

Userlevel 1

Awesome thank you! I think I have the gsheet and logging zap set up. It creates a row if the notion item name doesn’t exist in the sheet and creates a “pretty date” that zapier can read.

Now I’m creating the find zap and have been able to pull through, but the notion action looks like it only supports looking up one item at a time, would you mind discussing how to create an output of links to multiple notion database items based on output from the gsheet lookup?

Userlevel 7
Badge +14

@jbascend 

You would include the Notion link and other desired data point in other columns when the GSheet row is initially created.

That way you have all the data you need when finding multiple rows later on a schedule.

If you need to format the returned data, look into using the Formatter > Utilities > options for line items

Userlevel 1

This is so helpful, thank you. I’m just about there and got the utilities formatter where I want it, but the line item formatting doesn’t copy over to the slack message. Ideally I want a semicolon and space in between the Customer and Notes and a line break for each line item.

utilities output

 

slack input

 

slack output

 

 

Userlevel 7
Badge +14

@jbascend 

Try this…

 

 

Userlevel 1

That is absolutely savage, thank you so much! 

Here’s the link if helpful: https://zapier.com/shared/7f959533dc762ecb16a0c021e5578a5f7337fd91

Userlevel 7
Badge +6

That’s awesome! I’m glad Troy was able to help and point you to the right direction @jbascend!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help!