⬇️ Install package: OJS 3.4 — or browse all Releases.
A generic plugin for Open Journal Systems (OJS) that sends HTTP webhooks along the whole editorial workflow — submission started and completed, files, editorial decisions, review steps, participants, publication, versions and issues — so that other systems (a CRM, a message queue, an automation service) can react without polling OJS.
Developed and maintained by OJSBR. See the Credits & authorship section below.
| OJS version | Branch | Plugin release |
|---|---|---|
| OJS 3.4.x | stable-3_4_0 (default) |
4.0.0.0 |
Upgrade from 1.0.0.x. Earlier versions saved the endpoints and ran the Test button without checking the form's CSRF token, so a page opened by a logged-in journal manager could replace the endpoints and receive the journal's submissions. 1.0.1.0 requires a POST with the token, accepts only
http/httpsendpoints and no longer writes endpoint URLs to the server log. Upgrading is strongly recommended.1.1.0.0 delivers webhooks from the OJS job queue instead of inside the request that created the submission or published the article, so the editor no longer waits for the endpoints; a failed delivery is tried again twice, a minute apart. The queue must be processed (OJS's
job_runner, on by default, or a worker/cron: see the PKP documentation on jobs).
OJS has no outgoing notification for "a submission arrived" or "an article went public". Systems that need to know either poll the API or depend on e-mail, and both miss the one case that matters: an article scheduled in a future issue only becomes public when the issue is published.
-
21 events, chosen per endpoint (or
*for all of them, including events added later):Group Event When Submission submission.createdThe author starts the submission wizard (or an import/the API creates it). The submission is still incomplete: submission.isSubmittedisfalse.submission.submittedThe author finishes the wizard and the submission reaches the journal. submission.status_changedThe status changes (queued, scheduled, published, declined), with statusChange.previousStatus/status.submission.file_uploadedA file is added to the submission: by the author, a revision, a reviewer, a discussion, or a copy made when the file moves to the next stage — file.fileStageNametells them apart.submission.deletedThe submission is deleted (sent before it leaves the database). Editorial workflow decision.recordedAn editorial decision (accept, decline, send to review, request revisions…), in decision.decision.recommendedA recommendation by an editor who can only recommend. participant.assigned/participant.removedA user is assigned to / removed from the submission. Review review.assignedA reviewer is assigned (also when the request is resent). review.accepted/review.declinedThe reviewer answers the request. review.submittedThe reviewer submits the review (recommendation in review.recommendationName).review.confirmedThe editor confirms (acknowledges) the review. review.cancelled/review.reinstatedThe editor unassigns / reinstates the reviewer. Publication publication.createdThe article becomes public — not when it is merely scheduled in a future issue; it fires when that issue is published. publication.unpublishedA public article is unpublished. publication.version_createdA new version of a published article is created. Issues issue.published/issue.unpublishedAn issue is published / unpublished (each of its articles also sends its own publication.created). -
Several endpoints per journal, each one with its events and an Active switch.
-
Signed payloads: with a secret, every request carries
X-OJSBR-Webhook-Signature: sha256=<hmac>, computed ashash_hmac('sha256', $body, $secret). -
Headers:
X-OJSBR-Webhook-Event,X-OJSBR-Webhook-Delivery(theidof the payload, the same in every retry, to drop repetitions),X-OJSBR-Webhook-Attempt,X-OJSBR-Webhook-TimestampandUser-Agent: OJSBR-Webhook/<version>. -
Test button per endpoint: choose the event and it sends a sample in the real format, filled with the latest submission of the journal, and shows the HTTP status.
-
Recent deliveries: the last 50 attempts of the journal (event, host, HTTP status, attempt) in the settings.
-
Delivered from the OJS job queue, up to 5 attempts, 5 minutes apart. A webhook never breaks the editorial action that caused it.
- Install via Settings → Website → Plugins → Upload A New Plugin, or extract the folder
into
plugins/generic/so that you getplugins/generic/ojsbrWebhook/. Do not rename the folder: OJS derives the plugin's class namespace from the directory name. - Enable OJSBR Webhook in the Generic plugins list.
The package is also published to GitHub Packages on every push to a stable branch
(ghcr.io/ojsbr/ojsbrwebhook:3.4.latest, pulled with ORAS).
Open the plugin's Settings: one block per endpoint, with its URL, an optional secret, the
Active switch, the events it receives (grouped, or All events), a Test button with the event
to test and a Delete button. Only absolute http and https URLs are accepted, and an endpoint
with a URL needs at least one event. Below, the recent deliveries of the journal.
Payload (version 2; the fields of version 1 — event, occurredAt, contextId, baseUrl,
object — are all still there):
{
"id": "6f1c2a7e-8b1d-4c55-9f0e-2d7a1b3c4e5f",
"event": "review.submitted",
"payloadVersion": 2,
"occurredAt": "2026-11-29T12:00:00+00:00",
"test": false,
"contextId": 1,
"baseUrl": "https://journal.example.org",
"context": { "id": 1, "path": "journal", "name": "Journal", "acronym": "JRN", "url": "https://journal.example.org/index.php/journal" },
"actor": { "id": 9, "username": "reviewer", "fullName": "Rui Costa", "email": "rui@example.org", "orcid": null },
"submission": {
"id": 123, "contextId": 1, "locale": "pt_BR",
"status": 1, "statusName": "queued", "stageId": 3, "stageName": "review",
"submissionProgress": "", "isSubmitted": true, "dateSubmitted": "2026-11-20 10:00:00",
"title": "Article title", "titles": { "pt_BR": "Título", "en": "Article title" },
"currentPublication": { "id": 130, "version": 1, "status": 1, "doi": null, "...": "..." },
"authors": [ { "fullName": "Ana Silva", "email": "ana@example.org", "orcid": null, "affiliation": "USP", "isPrimaryContact": true } ],
"urls": { "workflow": "https://…/workflow/access/123", "authorDashboard": "https://…/authorDashboard/submission/123", "public": null }
},
"review": {
"id": 55, "round": 1, "stageName": "review", "reviewMethodName": "doubleAnonymous",
"recommendation": 2, "recommendationName": "pendingRevisions",
"dateAssigned": "…", "dateDue": "…", "dateCompleted": "…",
"reviewer": { "id": 9, "fullName": "Rui Costa", "email": "rui@example.org" }
},
"object": { "id": 55, "class": "PKP\\submission\\reviewAssignment\\ReviewAssignment", "submissionId": 123, "contextId": 1, "data": {} }
}Each event adds its own block: decision (type, label, isRecommendation, stageName,
round, editor…), review, participant (user, userGroupName), file (fileStageName,
name, genreId, uploaderUserId…), statusChange, publication and issue. actor is the
user who did it (null in scheduled tasks and the CLI). Reviewer identities are sent as they are:
the endpoint belongs to the journal, so keep it private in double-anonymous review.
The endpoints are stored per journal in the plugin setting webhookEndpoints (JSON), with a
site-wide fallback in context 0. The legacy settings webhookUrl / webhookSecret are still
read when no endpoint list exists.
- Hooks
Submission::add,Submission::updateStatus,Submission::delete::before,SubmissionFile::add,Publication::publish(the status must beSTATUS_PUBLISHED; a scheduled publication is skipped and announced when its issue is published),Publication::unpublish,Publication::version,IssueGridHandler::publishIssueandIssueGridHandler::unpublishIssue. - The application events
SubmissionSubmitted(the author finished the wizard) andDecisionAdded(decisions and recommendations), which have no hook. - The review steps and the participants have no hook of their own, but each one is written to the
submission event log:
EventLog::addturns those entries intoreview.*andparticipant.*. - The hooks are always registered and each callback checks that the plugin is on in the journal of the submission, so submissions created by imports, the API or scheduled tasks are announced too. An event is queued once per object within a request, and the payload is only built when an active endpoint wants it; a failure while building it is logged and never reaches the editor.
- Each delivery is a queued job (
jobs/SendWebhook.php, on PKP'sBaseJob) that posts through the HTTP client of the application (Application::getHttpClient(), which carries the proxy ofconfig.inc.php), with a 5 s connection and 15 s total timeout, HTTP and HTTPS only, without following redirects. A failure fails the job, so the queue tries again (5 attempts, 5 minutes apart), and is logged with the event, the endpoint's host and the status — never the full URL, which can carry a token. Every attempt is kept in the plugin settingdeliveryLog(the last 50 per journal) and shown in the settings. - Settings form on PKP's
FormwithFormValidatorPost,FormValidatorCSRFand a check that every URL is absolutehttp/httpsand has an event; the Test button requires a POST with the form's CSRF token. Adding, removing and testing rows is done byjs/settings.js.
-
PHPUnit (
tests/*Test.php, onPKP\tests\PKPTestCase): the classes against the installed PKP, the plugin found by PKP's plugin registry, the URLs that may receive webhooks, a delivery signed and posted through the application's HTTP client without redirects (mocked), errors naming the host only, a failed delivery failing the job, endpoint normalization (events, wildcard, active), the settings form (validators, rows kept, rows without events refused), webhooks queued only in journals where the plugin is on, only to active endpoints and only for publications that become public,submission.submittedandsubmission.status_changedwith their payloads, the delivery headers, the hooks and events used, the templates and the 38 translations. From the OJS root:lib/pkp/lib/vendor/bin/phpunit --configuration lib/pkp/tests/phpunit.xml --no-coverage "$PWD/plugins/generic/ojsbrWebhook/tests" -
Cypress (
cypress/tests/functional/OjsbrWebhook.cy.js): enables the plugin, refuses afile://endpoint and an endpoint without events in the settings form, runs the Test button against a closed local port (HTTP 0, without showing the URL's token), saves the endpoint and finds it again, checks that a test request without the form's token is refused, and sends a chosen event to a local receiver, checking the signature, the delivery id and the payload version, and finding the attempt among the recent deliveries. The endpoints are put back after the run. -
Verified on OJS 3.4.0.10, including a delivery job dispatched to the database queue and received by a local receiver with a valid signature.
-
test-server/holds a small Node/Express receiver for local development.
Tests are kept in the repository and are not part of the release package.
- Developed and maintained by OJSBR — original plugin.
- Distributed under the GNU GPL v3.
Generative AI (Claude, by Anthropic) was used to write and run tests, improve the code and bring it in line with PKP standards. Every change is reviewed and tested by OJSBR, which is responsible for the published releases.
Issues and pull requests are welcome. See CONTRIBUTING.md.
Distributed under the GNU GPL v3. See LICENSE and docs/COPYING.
Plugin genérico para o Open Journal Systems (OJS) que envia um webhook HTTP quando uma submissão é criada e quando um artigo é de fato publicado, para que outros sistemas (CRM, fila de mensagens, automação) reajam sem ficar consultando o OJS.
Desenvolvido e mantido pela OJSBR. Veja a seção Créditos e autoria abaixo.
| Versão do OJS | Branch | Release do plugin |
|---|---|---|
| OJS 3.4.x | stable-3_4_0 (padrão) |
4.0.0.0 |
Atualização a partir da 1.0.0.x. As versões anteriores salvavam os endpoints e rodavam o botão Testar sem conferir o token CSRF do formulário: uma página aberta por um gestor logado podia trocar os endpoints e passar a receber as submissões da revista. A 1.0.1.0 exige POST com o token, só aceita endpoints
http/httpse não grava mais a URL do endpoint no log do servidor. A atualização é fortemente recomendada.A 1.1.0.0 entrega os webhooks pela fila de jobs do OJS, e não mais dentro da requisição que criou a submissão ou publicou o artigo: o editor não espera os endpoints, e uma entrega que falha é tentada mais duas vezes, com um minuto de intervalo. A fila precisa ser processada (
job_runnerdo OJS, ligado por padrão, ou worker/cron; veja a documentação da PKP sobre jobs).
O OJS não avisa ninguém quando chega uma submissão ou quando um artigo fica público. Quem precisa saber consulta a API ou depende de e-mail, e os dois perdem o caso que importa: o artigo agendado numa edição futura só fica público quando a edição é publicada.
- 21 eventos, escolhidos por endpoint (ou
*para todos, inclusive os de versões futuras):- Submissão:
submission.created(o autor inicia a submissão — ainda incompleta,submission.isSubmittedéfalse),submission.submitted(o autor conclui a submissão),submission.status_changed,submission.file_uploaded(qualquer arquivo;file.fileStageNamediz de onde veio) esubmission.deleted. - Fluxo editorial:
decision.recorded(decisão editorial: aceitar, rejeitar, enviar para avaliação, pedir correções…),decision.recommended,participant.assignedeparticipant.removed. - Avaliação:
review.assigned,review.accepted,review.declined,review.submitted,review.confirmed,review.cancelledereview.reinstated. - Publicação:
publication.created(artigo público — não quando só foi agendado numa edição futura; dispara quando essa edição é publicada),publication.unpublishedepublication.version_created. - Edições:
issue.publishedeissue.unpublished.
- Submissão:
- Vários endpoints por revista, cada um com seus eventos e a opção Ativo.
- Payload versão 2, compatível com o anterior:
idúnico,context,actor(quem fez),submission(situação, etapa, título, autores, links) e um bloco por evento (decision,review,participant,file,statusChange,publication,issue). - Payload assinado: com segredo, cada requisição leva
X-OJSBR-Webhook-Signature: sha256=<hmac>; tambémX-OJSBR-Webhook-Delivery(igual nas novas tentativas),X-OJSBR-Webhook-AttempteX-OJSBR-Webhook-Timestamp. - Entrega pela fila de jobs do OJS, até 5 tentativas com 5 minutos de intervalo; o webhook nunca quebra a ação editorial que o causou.
- Botão Testar por endpoint, com o evento escolhido e dados da última submissão da revista.
- Entregas recentes: as últimas 50 tentativas da revista nas configurações.
Instale em Configurações → Website → Plugins → Enviar um novo plugin, ou extraia a pasta em
plugins/generic/ (ficando plugins/generic/ojsbrWebhook/). Não renomeie a pasta. Depois ative
o OJSBR Webhook na lista de plugins Genéricos. O pacote também sai no GitHub Packages
(ghcr.io/ojsbr/ojsbrwebhook:3.4.latest).
Nas Configurações do plugin, um bloco por endpoint: URL, segredo opcional, Ativo, eventos
(agrupados, ou Todos os eventos), Testar com o evento escolhido e Excluir; abaixo, as
entregas recentes. Só são aceitas URLs absolutas http e https, e um endpoint com URL precisa de
ao menos um evento. Exemplo de payload na seção em inglês. A lista fica no setting
webhookEndpoints (JSON) da revista, com recuo para o contexto 0.
PHPUnit em tests/ (sobre PKP\tests\PKPTestCase), com o comando da seção em inglês: classes
contra o PKP instalado, plugin encontrado pelo registro de plugins, URLs aceitas, entrega assinada
e enviada pelo cliente HTTP da aplicação sem seguir redirecionamento (simulado), erro só com o
host, entrega que falha derrubando o job, normalização dos endpoints (eventos, curinga, ativo),
formulário (validadores, linhas mantidas, linha sem evento recusada), webhook enfileirado só onde
o plugin está ligado, só para endpoints ativos e só para publicação que fica pública,
submission.submitted e submission.status_changed com seus payloads, cabeçalhos da entrega, hooks usados, templates e as 38 traduções. Cypress em cypress/tests/functional/: liga
o plugin, recusa endpoint file:// e endpoint sem evento, roda o botão Testar contra uma porta local fechada (HTTP 0,
sem mostrar o token da URL), salva o endpoint e o encontra de novo, confere que o teste sem o
token do formulário é recusado e envia um evento escolhido a um receptor local, conferindo
assinatura, id da entrega, versão do payload e a tentativa nas entregas recentes; os endpoints voltam ao que eram no fim. Verificado no OJS
3.4.0.10, inclusive um job de entrega na fila database recebido por um receptor local com
assinatura válida. test-server/ traz um receptor Node/Express para desenvolvimento local.
Os testes ficam no repositório e não fazem parte do pacote da release.
- Desenvolvido e mantido pela OJSBR — plugin autoral.
- Distribuído sob a GNU GPL v3.
Foi usada IA generativa (Claude, da Anthropic) para escrever e rodar testes, melhorar o código e alinhá-lo aos padrões da PKP. Toda mudança é revisada e testada pela OJSBR, que responde pelas releases publicadas.
Distribuído sob a GNU GPL v3. Veja LICENSE e docs/COPYING.