Attempting to make a simple addon, and the docs are clear to make sure to use node12, but the lambda returns an error when attempting to use the event, context, callback arguments. and states that it is no longer supported. but all the examples and such still use the callback to send the rendered page back.
Can anyone help me with the new response since my standard code 200 etc. is not displaying anything regardless of what i am attempting to render.
To get something to display in the ServiceM8 UI, the key is that Action events must return a complete HTML document (including <html>, <head>, and <body>), because ServiceM8 renders that returned HTML inside an iframe.
If you’re testing via a Webhook (not an Action button click), nothing will display because no output is required and any return value is ignored for webhook events.
For Lambda/serverless execution, ServiceM8 provides the invocation data as the first event argument to your handler function.
Also, the samples and docs have been updated to Node 24, so you’ll want to align your add-on code with the current Node 24 examples rather than older Node 12 references.
A good quick sanity check is to have your handler return a full HTML page directly (for an Action event), for example:
The SDK Examples are also a solid end-to-end reference for a working “Hello World” style Action popup: Examples
Reply here with whether you’re triggering this from an Action button or a Webhook, and whether it’s a Simple Function Add-on or a Web Service Hosted Add-on, and we’ll point you to the exact expected output format for that path.
You’re right, for the current NodeJS Simple Function pattern, the working response is to return an object with eventResponse containing the HTML string.
For an Action event, that eventResponse value should still be a complete HTML document, because Action events render HTML and JavaScript inside a ServiceM8 UI window/iframe.
A minimal NodeJS v24 pattern would be:
exports.handler = async (event) => {
const html = `<!doctype html>
<html>
<head><meta charset="utf-8"><title>Hello</title></head>
<body>Hello from ServiceM8</body>
</html>`;
return {
eventResponse: html
};
};
Webhooks are the exception, because webhook event return values are ignored.
We’ll take this as a docs/example clarity issue as well, since the Simple Function docs specify NodeJS v24 and point developers to the event data/examples for the expected input and output.