Integrate with external publishing system
A step-by-step tutorial to integrate your external publishing system
Sirius offers a bidirectional communication system with any publishing system. It gives you the opportunity to synchronize work with the entire newsroom.
Internally Sirius uses a branch system to make it possible. When a periodical publication is linked to the article, Sirius automatically creates a branch of that periodical. It is possible to subscribe to this branch and to submit changes to this branch.
When a branch is updated by Sirius (manually using "Print export button" or automatically), an "articleBranch" event is emitted with a "published" action.
Using a updateBranch
mutation it is possible to update a branch. Changes are automatically visible in Sirius.
Receive article from Sirius
Subscribe to "articleBranch" event
- Manage your apps (
https://*.sirius.press/admin/apps
) - Select
"Branche d’article"
event - events contains branch data (
title
,chapo
,blocks
...), query API for missing fields - Event > articleBranch
- Add a status to inform users when success copies or failed
see App documentation for further details & watch the "Apps & Events" screencast
Trigger event
- Create "print" export
- Select which periodical, section and edition date (see
https://*.sirius.press/admin/periodicals
to manage periodicals)
or from API with
updateArticle
mutation:
articleBranch: [ArticleBranchInput!]!
See GraphQL playground
- Then export to your print system
- Well received ✅
Article print edition
At this moment, Sirius has no more control in the article, it follows your print system life-cycle...
Before sending back article, you have to register your external workflow state into Sirius.
Register external workflow state
These records will be useful while you update article "print" branch to inform version state. State will be displayed directly into Sirius article version panel (with chosen acronym + color)
Query Article branches
Once article has related periodical (periodicalId
), you able to query article branches.
⚠️ Currently, articles have only one branch for printing
query {node(id: "<Article ID>") {id... on Article {branches {publishedfirstPublishedAtpublishedAtarticle {id}titlechapoblocks {id}featureImage {image {id}}periodical {id}periodicalSection {id}periodicalSectionLayout {id}periodicalRelease {id}periodicalEditionDateexternalWorkflowState {id}}}}}
Update article print branch
Now, you can update your article print branch!
For instance:
- Redefined
title
&chapo
- Created four new blocks
- set new external workflow state
mutation {updateArticleBranch(input: {articleId: "<Article ID>"title: "New title"chapo: "New chapo"blocks: [{ type: text, textBlock: { textType: paragraph, html: "block text" } }{ type: image, imageBlock: { imageView: { imageId: "<Image ID>" } } }{type: linklinkBlock: {url: "https://twitter.com/LarsJohanL/status/1543612532291674115"}}{ type: separator }#...]externalWorkflowStateId: "<Previously created external workflowState ID>"}) {featureImage {image {id}}article {id}publishedAtfirstPublishedAtpublishedtitleblocks {... on TextBlock {textTypehtmlstyleName}... on ImageBlock {imageView {image {id}croppings {aspectRatio {key}widthheighttopleft}defaultCropping {aspectRatio {key}widthheighttopleft}captionurl(width: 20, height: 50)}captionpositionsize}... on LinkBlock {url... on ArticleLinkBlock {titlearticle {id}displayModeprefix}... on TweetLinkBlock {tweet {id}}... on VideoLinkBlock {video {id}}}... on SnippetBlock {snippet {id}}... on ProductBlock {product {id}}... on ProductSummaryBlock {productSummary {idname}}}}#...}
If you don't pass
blocks
,title
and/orchapo
in input, these will be copied from previous version
On Sirius
Go on your article > Select "Historique" > "Versions" tab. Here, you are able to visualize your changes, and restore article from this version.
This panel will be upgrade soon! Better branches visualization, and so on
You're now able to integrate your external publishing system 🚀
Unlink article print branch
Sometimes you want to notify Sirius that the article print branch is no longer linked in the publishing system. You can do this by sending a updateArticleBranchLink
mutation with articleId
and linked
fields.
(relinking the article print branch is not supported yet).
Edit this page on GitHubmutation {updateArticleBranchLink(input: {articleId: "<Article ID>"linked: false}) {article {id}}