It's worth noting that as of today the public Notion API does not support the full feature set of the private API. Notably, you cannot access the entire workspace, only a subset. In other words, you cannot get all your pages using the public API, instead you get all the sub pages of whatever page or database you share with the integration.
This issue will likely pose some difficulties for this workflow.
That being said, the Notion API is in beta, so hopefully they will update it to allow full workspace access.