Solved

Automatic date synchronization current day

  • 21 March 2024
  • 4 replies
  • 26 views

  • Registered User
  • 2 replies

Hi all,

I am sorry if this is an ignorant question, but is there a way to automatically make topics change a date in their post to the current day?

As an example we have a topic to indicate which of our shops have irregular opening hours for the present day, but every day we have to change the date.

Thanks for the help! 😃

icon

Best answer by DannyPancratz 22 March 2024, 14:38

View original

4 replies

Userlevel 5
Badge +4

Are you trying to change the date/timestamp of the topic or a date within the content of the post? 

Hi @DannyPancratz, both would work but preferably the date within the content of the post. Thanks!

Userlevel 5
Badge +4

You could do this via the API. There’s no way to do it in Control, but you should have everything you need in the API. 

If you can use an automation tool like Zapier, Workato, etc … you could schedule an API call to run daily and replace the content of the post

Then, the date could be a variable that the system inputs. For example, Zapier has a {{zap_meta_human_now}} option that inserts the current date and time (you’d probably want a formatting step as well to change it to the date format desired for the post.)


But I also suspect there are other variables in the post

indicate which of our shops have irregular opening hours for the present day

Are you changing that content within the post too? 

Assuming so, here’s a solution that could make things easier for the team if you have Zapier or a similar tool. 

  • Google Sheet (I suspect there are similar options for Excel 365)
    • Columns for the date, locations, and Y/N on irregular hours

Trigger the automation to run when a new row has been added. Your automation would have the general template of the post’s content, but spots for the variables input into the sheet. 

Then it runs the API call  to replace the content of the post with the current day’s info. Rather than doing the edits, you’re just filling out a simple sheet. 


My two cents: 

You may also want to automate adding a reply to the post (and deleting the previous day’s reply). The date/timestamp of the post is always going to be the same, so it will continually be buried in the feed. (Unless you’re featuring this post prominently in your community UX, then disregard).

You could add an automated reply to the article that says “this post has been updated with today’s information” which would bump it to the top of the Recently Active feeds on the community. Additionally, any users who have subscribed to the post, would get the email notification. 

As those replies would pile up, you could add a step to your automation to delete the reply after X number of hours. 

Thanks a lot for your detailed answer @DannyPancratz! 😃

Reply