I have a collection for Church Services that I would like some services to be added automatically for regular services that happen most weeks.
A bit like a cron job to automate every calendar week adding the 4 services to the collection and then the user could go in and amend if they are moved and/or cancelled.
So, the Church has regular services everyweek such as Eucharist. I don't want them to have to add these manually as having to add that content every week is busy work, especially as it is pretty much always the same.
I'd love to automate this hitting the api and adding content with the standard template of this type of content. The client would then be able to go in and edit say a Eucharist in April if the time and details change, or delete it etc, but know that the content is added by the system automatically.
Previously I would have done with with a cron job or I was thinking about creating a Lamda function that hit the api to add this content
Also extra services that are not regular - say a memorial service would be added manually using the Prismic CMS.
Unfortunately, it's not possible to add content by hitting the API for the moment as Prismic doesn't have a write API. We have already discussed it internally and tracking it as a feature request for future improvements.
@webdev2 I agree that this is disappointing. Here is a detailed discussion about write api.
To bulk insert content in Prismic, you can use our Import/Export feature. The Import/Export tool is available starting on the Medium Plan. More about pricing.
You can schedule the publication of a new document or changes to a document. Learn more about scheduling and previews. You can also check our article Draft, Plan, and Schedule Content that link I shared with you before.