Hi, I want to save in the database the views of a specific page (that i am getting through plausible API) with the following data fields:
- page name (which is PAGE as data type)
- date
- number of views
I want to set an automatic workflow to run every midnight that creates a row for everyday total page views for every page.
So if i have 50 pages, i need to create 50 new data rows every day. If the next day i add 30 new pages, then the workflow would add 80 new rows.
Can anyone help me with this?
Thank you!
Somewhere in you’re app you’ll need a list of pages. You could do this by having a ‘Page’ table which just has ‘pageURL’ (text).
Then, have a ‘Page Views’ data type. It has a date, number of views, and Page.
Whenever you create a page, add the page to the database.
Have a recurring daily workflow in the backend. Schedule an API workflow on a list (Do a search for Pages). In that API workflow, get the views for This Page, and create a ‘Page View’ thing which will be saved to the DB.
I already have a separate data type called pages.
The data type that i want to create is called Analytics and it is connected to the pages through the data field “page”. So I need to create rows for the data type Analytics.
@georgecollier you mean that i should add a backend workflow as “new recurring event”?
How do i tell the system that i want to add a number of multiple things and how do i start the event for the first time?
Schedule API workflow on list
Create a button on an admin page that will initiate it