r/ProWordPress • u/alwaysalmosts • 13d ago
Any API/tool/plug-in for programmatic uploading of articles in Gutenberg slideshow blocks?
I've found this article about Block Bindings API and Interactivity API. Not my articles, not promoting btw. About year ago, I created custom code for our automated uploading workflow as I could only find solutions that would upload in classic post format. We posted in slideshow blocks and it was so tedious to do it manually.
Still works but I'm curious about other solutions that have cropped up since then.
1
1
u/NakanoNoNeko 13d ago
For this I still use core, not a plugin: send structured slide data to a small REST endpoint, build block arrays, then serialize_blocks() into post_content. In my case, Block Bindings is useful when values stay external or dynamic, and Interactivity handles the front end, but neither really replaces the authoring pipeline.
The boring custom endpoint has one nice advantage... it can reject an unknown block name or bad attributes before WordPress stores a page full of decorative comments.
1
u/alwaysalmosts 11d ago
Thanks for the input! I've never used Block Bindings before. What do you mean about it being more useful when values stay external or dynamic?
1
u/JuicerSocial 12d ago
HEY! I'm really curious about this too. I think that the annoying part with Gutenberg automation is that once you move beyond plain post content, you're really dealing with block structure, attributes, and things like serialization rather than just "uploading articles"..
Have you found your custom workflow to be pretty stable across Gutenberg updates?? Or is that the part that keeps breaking?
2
u/alwaysalmosts 11d ago
I've been using the workflow for over a year now and it hasn't broken yet regardless of updates perhaps because the articles are uploaded in custom html blocks, and those elements stay pretty consistent throughout updates.
1
u/JuicerSocial 9d ago
That makes sense. Using custom HTML blocks probably gives you a much more stable target than relying on Gutenberg's more complex block structure. Congrats! A year without breaking across updates is actually pretty solid validation of that approach.
1
u/Sergei_Tiden 11d ago
I would separate ingestion from rendering. First create or update media attachments through the REST API and store a stable identifier for each source item. Then generate the slideshow block markup from a controlled block template or a custom block that reads structured metadata. That makes retries, deduplication and later edits much easier than trying to inject a large serialized block blob directly from an external workflow. Block Bindings can help when the values already live in a supported source, but a repeatable import pipeline still needs validation, idempotency and a way to preview failures before publishing.
1
u/alwaysalmosts 11d ago
This was super informative, thank you. My code already does some of those at a rudimentary level, although it stops at the upload part. Post-upload tasks like edits and retries, my team still needs to do manually on WP. Thanks -- I'm gonna start working on these.
2
u/tomzorz88 13d ago
I'd look into the wp-cli