Help

Generating a biweekly digest

Topic Labels: Automations Formulas
Solved
Jump to Solution
560 2
cancel
Showing results for 
Search instead for 
Did you mean: 
Julia_Kim
4 - Data Explorer
4 - Data Explorer

I have a table with the fields "Title" and "Status". I want to automatically post to a Slack channel every 2 weeks, a list of the "Titles" that have had their "Status" fields updated to a particular value within the past two weeks. Currently, I can only generate a list of ALL the "Titles" with the particular "Status" value. How can I limit it to show only the recently updated ones? Do I need to write a script instead?

1 Solution

Accepted Solutions
JLindem
6 - Interface Innovator
6 - Interface Innovator

Hi @Julia_Kim!

You don't need to write a script for this, but you will need to create an automation. To accomplish what you need fully, we can break it down into three steps.

 

1) We need to establish when "Status" was last modified. Create a "Last modified time" field in the table. When creating it, click "Specific fields" and select "Status". We now have the data we need. 

2) We need to check whether the date in the previous step is within the last two weeks. To do this, create a new formula field to the right of the date field we created in step 1. In this field, input the following formula.

 

IF(IS_BEFORE({DATE}, DATEADD(TODAY(), -14, 'days')), FALSE, TRUE)

 

Replace {DATE} with the name of the field from the previous step. The formula checks if the date in this field is before today's date minus 14 days (i.e., two weeks ago). If it's before that date, it returns FALSE, otherwise, it returns TRUE.

3) We can now use the value in the formula field to trigger an automation. Create an automation with the trigger "When a record matches conditions". Select the table in question on the right panel, and under condition, enter "When Status is TRUE". Then, add an action under this trigger (click on the plus underneath the trigger in the middle panel). Select Slack, send message, and set up your message.


This will now send a slack message, when "Status" has been updated within the last two weeks. If it is older than that, it will not send a message.

If you need to send a list of the records matching this condition in the message, you can use the "Find Records" action before the "Send Slack Message" action. If you want to do this, select "Find records on condition", and enter the same condition that you entered in step 3. Then, when sending your slack message, you can press the + button in the top right to "map" a value from a previous step in the automation. Select the "Find Records" action, and either select "List of records" to return all fields, or "Make a new list of … Field Values", and select the field containing the values you want to include in your slack message.

Hope it works! Let me know if you have any issues, and I'll try to help you out. 

See Solution in Thread

2 Replies 2
JLindem
6 - Interface Innovator
6 - Interface Innovator

Hi @Julia_Kim!

You don't need to write a script for this, but you will need to create an automation. To accomplish what you need fully, we can break it down into three steps.

 

1) We need to establish when "Status" was last modified. Create a "Last modified time" field in the table. When creating it, click "Specific fields" and select "Status". We now have the data we need. 

2) We need to check whether the date in the previous step is within the last two weeks. To do this, create a new formula field to the right of the date field we created in step 1. In this field, input the following formula.

 

IF(IS_BEFORE({DATE}, DATEADD(TODAY(), -14, 'days')), FALSE, TRUE)

 

Replace {DATE} with the name of the field from the previous step. The formula checks if the date in this field is before today's date minus 14 days (i.e., two weeks ago). If it's before that date, it returns FALSE, otherwise, it returns TRUE.

3) We can now use the value in the formula field to trigger an automation. Create an automation with the trigger "When a record matches conditions". Select the table in question on the right panel, and under condition, enter "When Status is TRUE". Then, add an action under this trigger (click on the plus underneath the trigger in the middle panel). Select Slack, send message, and set up your message.


This will now send a slack message, when "Status" has been updated within the last two weeks. If it is older than that, it will not send a message.

If you need to send a list of the records matching this condition in the message, you can use the "Find Records" action before the "Send Slack Message" action. If you want to do this, select "Find records on condition", and enter the same condition that you entered in step 3. Then, when sending your slack message, you can press the + button in the top right to "map" a value from a previous step in the automation. Select the "Find Records" action, and either select "List of records" to return all fields, or "Make a new list of … Field Values", and select the field containing the values you want to include in your slack message.

Hope it works! Let me know if you have any issues, and I'll try to help you out. 

Hi @JLindem!

Thank you so much for your help!