I’m trying to create a simple dashboard: When a new article is published on WordPress create a new row in a google sheet then pull the google analytics data for the following periods: 0-7 days since published, 8-15days, 16-30 days and more…
So far I’ve been able to match slug and pull the data from wp API but I’m not sure how to work with the dates and then presenting it in a single sheet:
Hey Olivier! Here are the various steps I’d use to accomplish the date categorizations you described:
Use the Add Date & Time step to add the current date stamp as a new column to your flow. This is the column you’ll use to compare dates and calculate the number of days since published
Use the Date Comparison step to calculate the number of days between current day and published day
You can use the Date Formatter step to reformat the date to your preferred style
Finally, I would use the If/Else step to build the conditional logic to bucket your articles by the following periods: 0-7 days since published, 8-15days, 16-30 days, etc