Hello world tutorial doesnt appear work - and support are unable to confirm whether it works on their end

Hi

Is anyone able to confirm whether this is broken or something unique to my account or how I’m doing it?

I’ve tried many many different things, albeit a few weeks ago and support were unable to assist. I don’t get any buttons in the job card.

I’ve gone back to basics because I couldn’t get buttons to work for a plugin that I’ve made.

Hi David,

The documented expected result for the Hello World add-on is that it adds a job action called “Hello Action” to the online Job Card after the add-on has been activated on your account for development and testing.

A few things are worth checking:

  1. In Settings > ServiceM8 Addons, confirm the add-on appears under Custom Addons and has been connected.
  2. In the manifest, confirm the action is set with type: "online" and entity: "job", as online actions appear in the web platform job/client cards and job actions appear in the Job Card.
  3. Open a job from the Dispatch Board or Job History, then look for the “Hello Action” job action menu item.

If those all match and the button still doesn’t appear, this is likely something we’ll need to check against the specific add-on/account setup rather than diagnose fully in the public forum. Email support@servicem8.com with the add-on name and mention that the Hello World online job action isn’t appearing on the Job Card.

Thanks,
Cody

  1. Confirmed

  2. Confirmed

  3. Not visible on job card - I can see the custom add-on in the add-on section, but there’s no enable button.

Addon Type External Integration Self-Hosted Web Service Function Simple Function (NodeJS)
Manifest 1.0
Status Not Ready (Invalid Manifest)

I’ve tried many many different ways, other example manifests, troubleshooting with claude and chat GPT.

I’m pretty sure it’s broken on Service M8 side.

And regarding support - they sent me here - I’ve already provided all the information in multiple emails regasrding my plugin, and the back-to-basics Hello World tutorial as I couldnt get anything to work.

Support were unable to confirm whether or not the simple hello world tutorial works on their end.

Here, this should work. “Button/text” displays in the jobs card under “More->Addons”, which likely differs from the helpfiles, as I recall the app worked differently when it was first written. Just update the two links in manifest.json to a working .png file - the example icon link does not work.

Manifest.json
{
“name”: “Hello World Addon”,
“version”: “1.0”,
“iconURL”: “XXINSERT WORKING LINK HERE TO .pngXX”,
“supportURL”: “https://support.exampleaddon.com”,
“supportEmail”: “support@exampleaddon.com”,
“actions”: [{
“name”: “Hello Action”,
“type”: “online”,
“entity”: “job”,
“iconURL”: “XXINSERT WORKING LINK HERE to .PNGXX”,
“event”: “hello_world_event”,
“location”: “modal”
}]
}

Index.js

‘use strict’;

exports.handler = function (event, context, callback) {

console.log('Received event:', JSON.stringify(event, null, 2));

// Function URL / API Gateway delivers the SM8 payload as a JSON string in event.body
var isHttp = typeof event.body === 'string';
var sm8Event = isHttp ? JSON.parse(event.body) : event;

var strJobUUID = 'unknown';
if (sm8Event.eventArgs && sm8Event.eventArgs.jobUUID) {
    strJobUUID = sm8Event.eventArgs.jobUUID;
}

var strHTMLResponse = '<html><head>' +
    '<link rel="stylesheet" href="https://platform.servicem8.com/sdk/1.0/sdk.css">' +
    '<script src="https://platform.servicem8.com/sdk/1.0/sdk.js"><\/script>' +
    '<script>var client = SMClient.init(); client.resizeWindow(500, 200);<\/script>' +
    '</head><body>' +
    '<h1>Hello World Lambda Event</h1>' +
    '<p>You have opened job <b>' + strJobUUID + '</b></p>' +
    '<button onClick="client.closeWindow();">Close Window</button>' +
    '</body></html>';

if (isHttp) {
    callback(null, {
        statusCode: 200,
        headers: { 'Content-Type': 'text/html' },
        body: strHTMLResponse
    });
    return;
}

callback(null, { eventResponse: strHTMLResponse });

};

Cheers,

-Chad

Hi Chad

I added the manifest and I get this:

Status Not Ready (Invalid Manifest)

I also got an error with the function:

Error detected verifying function. Check for syntax errors and try again.

Pasting it messes up the formatting, here try this:

Thanks for that Chad, I have a working button! I appreciate your help.

Hi David,

The “Not Ready (Invalid Manifest)” status is the blocker here, rather than the Job Card menu itself. A Job Card action is only expected after the add-on has gone through the documented flow of saving the manifest, connecting it under Settings > ServiceM8 Addons > Custom Addons, and then opening a job from the Dispatch Board or Job History.

For the Hello World tutorial, the add-on type should be Simple Function Add-on (NodeJS), then the example manifest should be uploaded and saved. For the button itself, the manifest action needs the documented action fields, including type “online” and entity “job”, because online actions appear in web job/client cards and job actions appear in the Job Card. The docs also recommend lowercase event names, since the function receives the event name in lowercase.

One thing worth double-checking is the iconURL in the manifest. Both the add-on iconURL and action iconURL need to be publicly accessible image URLs, and a blocked, redirected or unavailable image URL can cause manifest validation to fail.

The relevant docs are here:

If you’ve already reverted to the exact documented Hello World structure and it still shows “Not Ready (Invalid Manifest)”, email support@servicem8.com with the add-on name, the manifest JSON, and a screenshot of that status so we can check the validator result against your add-on.

Thanks,
Cody

Hi David,

Chad’s manifest lines up with the documented requirements: the add-on iconURL must be a publicly accessible image URL, and each job action also needs its own publicly accessible action iconURL.

For the Hello World tutorial, the documented setup is a Simple Function Add-on (NodeJS), then uploading the example manifest, saving it, adding the example code, connecting it from Settings > ServiceM8 Addons under Custom Addons, and opening a job from the Dispatch Board or Job History. The expected result is a new job action menu item called “Hello Action”, which opens a popup populated by the Lambda function.

So the next thing to try is exactly what Chad suggested: replace both iconURL values with a publicly accessible PNG URL, save the manifest, then test the add-on again from an online Job Card.

Thanks,
Cody

Hi David,

The key thing to fix first is the manifest status, because the documented Hello World flow is to upload and save the manifest, then connect the add-on from Settings > ServiceM8 Addons before testing the “Hello Action” on a job.

For a web Job Card action, the manifest action needs name, type, entity, iconURL, and event, with type set to online and entity set to job. Both the top-level add-on iconURL and the action iconURL need to be publicly accessible image URLs.

Try resetting back to the official Hello World files linked in the tutorial, replace both iconURL values with your own publicly accessible PNG/JPG URL, save the manifest first, then use the official Hello World example code in Edit Function.

Thanks,
Cody