Skip to main content

Publishing

To make your plugin available in Automation, you must register on the Plugin Portal and submit it as an npm-compatible package using npm pack.

This guide covers everything from registration to publishing.

🏒 Step 1: Register Your Organization​

Before publishing a plugin, your organization must be registered.

  1. Go to: automation.labxpert.io/portal
  2. Click Register as Publisher
  3. Fill in:
    • Organization name
    • Contact email
    • Website (optional)
  4. Once approved, you’ll receive a publisher ID

This ID must be used in your automation.json.

πŸ“¦ Step 2: Prepare Your Plugin​

Your plugin must be a plain JavaScript package.


your-plugin/
β”œβ”€β”€ automation.json # Required plugin definition
β”œβ”€β”€ index.js # Entrypoint JS file
β”œβ”€β”€ README.md # Plugin documentation
β”œβ”€β”€ package.json # Required for npm compatibility
└── (optional) helpers/

TypeScript is not allowed in the final package.
If you're using TypeScript during development, compile to JavaScript first and submit only the compiled version.

Required files​

  • automation.json
  • index.js
  • package.json
  • README.md

πŸ“ Example: automation.json​

{
"id": "plugin-dhis2-uploader",
"name": "DHIS2 Uploader",
"version": "1.0.0",
"publisher": {
"id": "medx",
"name": "MedX International"
},
"entrypoint": "index.js",
"readme": "README.md",
"capabilities": {
"Observation": { "actions": ["receive"] }
},
"category": "system",
"system": {
"vendor": "DHIS2",
"product": "DHIS2",
"version": "2.39",
"authMethod": "basic",
"configFields": [
{ "key": "baseUrl", "label": "API URL", "type": "string", "required": true },
{ "key": "username", "label": "Username", "type": "string" },
{ "key": "password", "label": "Password", "type": "password" }
]
}
}

πŸ“€ Step 3: Package the Plugin​

Run the following inside your plugin directory:

npm pack

This will create a file like:

plugin-dhis2-uploader-1.0.0.tgz

That’s the file you’ll upload.

πŸ“¬ Step 4: Submit via Portal​

  1. Visit the Plugin Portal
  2. Click Submit Plugin
  3. Upload your .tgz file
  4. Fill in any metadata (if prompted)

Your automation.json and README.md will be extracted and validated.

πŸ”Ž Step 5: Review & Approval​

Once submitted:

  • Automation runs automated validation

  • A reviewer checks:

    • Plugin metadata
    • Capabilities
    • Safety (no dangerous APIs)
    • Documentation quality
  • You’ll be notified by email once approved or with feedback

🌍 Step 6: Publish​

Once approved:

  • Your plugin will appear in the Plugin Registry
  • Its documentation will be extracted from README.md
  • It can now be installed by any Automation instance

πŸ” Updating Your Plugin​

To publish a new version:

  1. Bump version in both package.json and automation.json
  2. Run npm pack again
  3. Upload the new .tgz file via the portal

βœ… Summary​

StepDescription
RegisterSign up your organization on the portal
Prepare PluginJS only, with required metadata + README
Run npm packGenerates the .tgz you’ll upload
Submit PluginUpload via portal for review
Get ApprovedPlugin appears in registry + Automation website