Why Rocket.Chat webhook scripts need checking before 9.0
If you run incoming or outgoing webhook scripts in Rocket.Chat, the check has to happen before you upgrade past 9.0.0. The reason is a timing gap in the platform: from Rocket.Chat 8.4.0, the bodies of integration script class methods run in strict mode, and from 9.0.0, Rocket.Chat no longer uses Babel to transpile them. A script that worked on an older line can fail once the runtime stops accepting the patterns it relied on, so the compatibility check belongs in the window before the 9.0 upgrade, not after it.
Strict mode is the first signal to watch for. Scripts that assign to undeclared variables, use this inside nested functions, call arguments.callee, use legacy octal literals, or declare duplicate parameter names may already produce errors or behave differently on 8.4.0 and later. Those errors can be easier to trace on a test workspace than in production, so review your script inventory for each integration, including its owner, its trigger and whether it is incoming or outgoing. The Rocket.Chat integrations documentation describes the script environment and is the reference to read alongside your own code.
This page covers only the script checks. It does not cover the rest of the 9.0 upgrade path, such as database prerequisites, other removed features or hosting changes, which should be planned separately and confirmed against the release notes for the version you are moving to. Ask your team to confirm which Rocket.Chat version you run today and which integrations depend on scripts, so the checks in the following sections have a defined scope before any code is changed.
What changes in strict mode and 9.0 for integration scripts
This table compares the three changes that affect incoming and outgoing webhook scripts: strict mode from 8.4.0, Babel removal in 9.0.0, and the skipTranspile option for testing. Read each row as a question to answer for your own scripts before you plan the upgrade, starting with the Action column.
| Change | Impact | Action needed |
|---|---|---|
| Strict mode for class method bodies (from 8.4.0) | Class method bodies in integration scripts run in strict mode, so implicit globals, this in nested functions, arguments.callee, legacy octal literals and duplicate parameter names can throw errors. | Search each script for these patterns and fix them while still on 8.x, then run the script against sample payloads. |
| Babel removed (from 9.0.0) | Babel is no longer used to transpile scripts, so syntax and behavior that relied on it may stop working after the update. | Confirm that every script runs as plain JavaScript in your target runtime before upgrading to 9.0. |
| skipTranspile option on create and update integration endpoints | Lets administrators run an integration with transpilation turned off to see how it behaves before 9.0 removes Babel. | Test each integration with skipTranspile in a staging workspace and record any failures before the production upgrade. |
| Nested functions and implicit globals | Code that assigns undeclared variables or uses this inside nested functions may fail once strict mode applies. | Declare all variables explicitly and bind or pass the context your nested functions need. |
| Legacy octal literals and arguments.callee | Older syntax used in copied scripts may now raise errors at runtime. | Replace octal literals with modern notation and remove arguments.callee references. |
Which sloppy-mode script patterns break
Strict mode changes how JavaScript treats certain shortcuts that older integration scripts often rely on without anyone noticing. Rocket.Chat runs class method bodies in strict mode from 8.4.0, and Babel is removed in 9.0.0, so each pattern below needs a check in your own script code, not an assumption that the script is safe.
Implicit global variables
Assigning to a variable that was never declared with var, let or const creates a global in sloppy mode. Strict mode throws an error instead, so the script fails at the point of assignment. Search your scripts for assignments to names with no declaration. A compatible rewrite declares the variable first, as in this illustrative snippet: let total = 0; followed by total = total + amount;.
This inside nested functions
In sloppy mode, a plain nested function called without a receiver gets the global object as this. In strict mode, that this is undefined, so property reads fail. Look for helper functions inside script methods that refer to this. A compatible rewrite captures the outer value first, as in this illustrative snippet: const self = this; then self.config.channel inside the helper.
arguments.callee
arguments.callee gives a function a reference to itself, which strict mode forbids. Scripts that use it for recursion or self-reference will throw when the method runs. Search for callee across your script bodies. A compatible rewrite names the function, as in this illustrative snippet: function countDown(n) { return n > 0 ? countDown(n - 1) : 0; }.
Legacy octal literals
Numbers written with a leading zero, such as 0755, are read as octal in sloppy mode and are a syntax error in strict mode. Scripts that copy numeric values from old configuration or file-permission examples often contain them. Search for numeric literals starting with 0 followed by digits. A compatible rewrite uses the explicit prefix, as in this illustrative snippet: 0o755, or a plain decimal if octal was never intended.
Duplicate parameter names
A function that declares the same parameter name twice, such as function send(a, a), is allowed in sloppy mode but rejected in strict mode. Scripts with generated or copied helper signatures can hide this. Check every function signature in the script, including inner callbacks. A compatible rewrite gives each parameter a unique name, as in this illustrative snippet: function send(channel, message).
Testing scripts with skipTranspile before the 9.0 upgrade
Use the skipTranspile option on the create and update integration endpoints to run a script without transpilation on a test server before Rocket.Chat 9.0 removes Babel. The point of the test is to see, with your own scripts and your own payloads, which lines fail once the code is no longer passed through the transpiler. Treat the option as a compatibility test tool, not as a production setting, and confirm its exact behavior in the integration documentation for the version you are running, since the option's details can differ between releases.
Run the test as a short loop. Create or update a test integration with the script set and skipTranspile enabled, then send a sample payload that matches a real trigger from production, such as a message posted to a monitored channel or a request from an external system. Capture the error output from the server logs and from the integration's failed response. Fix the specific construct that failed, such as an implicit global assigned without let or const, then update the integration and resend the same payload. Repeat until the output matches the result you recorded from the current production script for every payload type you have.
Keep a written record of each payload, the expected output and the fix applied, because this becomes your regression set for the 9.0 upgrade rehearsal. Ask whether your team can reproduce each sample on the test server with the same identities, channel settings and external endpoints used in production, since a script that passes with simplified input can still fail on edge cases. Plan to rerun the full set after any change to the Rocket.Chat version on the test server, and confirm with the vendor which versions of the integration endpoints support the option before you schedule the work.
How the script review decision path flows
The review starts with an inventory of every incoming and outgoing webhook script, including scripts whose owners have left. Each script is checked for the five sloppy-mode patterns, then run through skipTranspile on a non-production server. Failing scripts loop back to the fix step and are retested. Scripts that still depend on behavior the team cannot judge go to the owner for sign-off before the 9.0 decision is recorded.
Script review path from inventory through testing to the 9.0 decision.
What to gather before testing webhook scripts
Testing integration scripts against a Rocket.Chat 9.0 change only works when the team knows which scripts exist, has a place to run them, and holds real input to test with. The four items below are the working set, and each one protects a different part of the check.
Script inventory by integration
List every incoming and outgoing webhook with its direction, the channel or user it posts as, the owner who can explain its logic, and every external system it calls. Include scripts that look dormant, because a rarely fired outgoing webhook can still fail on the first event after an upgrade. Mark which scripts are inline class methods, since strict mode applies to those bodies from 8.4.0. The owner column matters most: without a named person, nobody can confirm that a changed result is intended.
Integrations docsNon-production instance on today's version
Stand up a test workspace running the exact Rocket.Chat version production uses, with the same MongoDB replica set setup and the same Node.js runtime from the official image or chart. Testing on a different version hides the differences you are trying to find. Confirm with your platform team that the test instance can reach the same external systems through a sanitized route, so outgoing scripts behave the way they do in production.
System requirementsSample payloads with sensitive data removed
Capture representative inbound request bodies and outbound event payloads from production logs or the external systems themselves, then strip personal data, tokens and customer identifiers before the samples leave the production boundary. Include edge cases such as missing fields, unusual characters, and nested arrays. Scripts that pass on a clean sample can still fail on malformed traffic, so keep a set of deliberately odd payloads alongside the typical ones.
Backup of workspace and integration configuration
Take a backup of the workspace database and export the integration definitions, including script text, channel targets, and aliases, before any change. The backup is the rollback path if a skipTranspile test or a later edit alters behavior. Store it under the same access controls as production data, because integration definitions can contain endpoint addresses and credentials. Confirm with the database owner how the backup is restored and how long that restore takes in your environment.
How to check and fix scripts in order
This sequence takes each incoming and outgoing webhook script from an unknown state to a tested, owner-approved version that still runs after Rocket.Chat 9.0 removes Babel. Each step produces a record that the next step depends on.
Build a complete integration inventory
Export or list every incoming and outgoing webhook in the workspace, including the script body, the target channel or user, the owning team and the business process it supports. Mark which integrations have script logic and which only forward payloads, because only scripted integrations are affected by the strict mode and Babel changes. Name one owner for each scripted integration. The step is complete when the inventory has one row per integration, no integration lacks an owner, and the inventory is saved in a location the upgrade team can edit. Keep the untouched export of the original configuration so you can restore any script that is later changed.
Scan each script for the listed patterns
Review every scripted integration for the patterns that break under strict mode and in 9.0: implicit globals (assignments to variables that were never declared), the this keyword inside nested functions, arguments.callee, legacy octal literals such as 017, and duplicate parameter names. Record each finding against the integration ID with the line reference. A manual read works for small sets, and a linter configured for strict mode can flag candidates faster, but the reviewer should confirm each hit. The step is complete when every script has a recorded result, even if the result is no findings. Keep the scan notes and the original script text together.
Reproduce current behavior with sample payloads
For each script, prepare sample inbound and outbound payloads drawn from real traffic where your data policy allows, or from anonymized examples that match the shape of real messages. Run them against the current production-equivalent version and record the output, the messages posted, any HTTP calls made and any errors. This baseline is what you compare against after changes, so it must capture the expected result, not only whether the script ran. The step is complete when each script has a stored input and expected output pair. Keep the payload files and baseline outputs, since they are the reference for every later retest.
Run scripts with skipTranspile on the test server
On a test server running the upgrade target, apply the integration create or update endpoints with the skipTranspile option set so each script runs without Babel transformation. The option exists so administrators can test script compatibility before 9.0. Run the same payloads from the baseline and compare outputs. Any script that fails or changes its output is a candidate for a fix. The step is complete when every scripted integration has a pass or fail result from this run. Keep the test server configuration, the Rocket.Chat version used, and the failing outputs as evidence.
Fix scripts and retest until they match
For each failing script, make the smallest change that restores the baseline behavior: declare variables explicitly, replace this inside nested functions with a captured reference, remove arguments.callee, convert legacy octal literals to their modern form and rename duplicate parameters. Do not change business logic while fixing syntax. Rerun the payloads from the baseline after each change. The step is complete when every script matches its baseline output with skipTranspile in effect. Keep the original script text next to each fixed version so a rollback can restore either one, and note which fixes were applied.
Record results for every integration
Consolidate the inventory, scan findings, baseline outputs, test results and fixes into one register with a row per integration. Include the owner, the original and final script versions, the test date, the Rocket.Chat version tested, and any integration that remains unresolved or was retired. Flag any script whose fix changed behavior the owner did not expect. The step is complete when the register covers every integration with no blank result fields. Keep the register under version control or in your change record system, since auditors and the upgrade team will both ask for it.
Confirm sign-off from each script owner
Send each script owner their integrations, the baseline and post-fix results, and a short description of every change. Ask them to confirm in writing that the behavior matches what the integration must do, and to name any scenario the test payloads did not cover. Only after every owner has signed off should the 9.0 upgrade date be scheduled. The step is complete when every scripted integration has a recorded owner approval or a documented decision to retire it. Keep the signed approvals and the final register together, because they define the state you would return to if the upgrade is rolled back.
What makes script preparation take longer
This table lists the drivers that change how long webhook script preparation takes and how each one should be scoped. Use it to read a quote, since a fixed-scope proposal should trace its effort back to these drivers. The main takeaway is that the script count alone understates the work when external systems, unavailable owners or several test environments are involved.
| Driver | Why it matters | How to scope it |
|---|---|---|
| Number of integrations | Each incoming or outgoing webhook has its own script, input format and downstream consumer, so effort grows with the count. | Inventory every integration in Administration, then list each with its direction, owner and version of the script. |
| Scripts using the risky patterns | Implicit globals, this in nested functions, arguments.callee, legacy octal literals and duplicate parameter names are the patterns that can break under strict mode and without Babel. | Search each script for these patterns and record which scripts need a rewrite and which only need a test pass. |
| External systems needing test access | A script that calls an outside API cannot be fully tested without a sandbox or test credentials, so the work waits on other teams. | Confirm for each script whether it calls an external system and whether a non-production endpoint and credentials exist. |
| Owner availability for sign-off | Only the people who understand a script's business purpose can confirm that its output is still correct after changes. | Name a sign-off owner for each integration and confirm their availability before the schedule is set. |
| Number of environments to test | Each environment, such as development, staging and production, may have different integrations, data and versions, so each needs its own test pass. | List every environment that runs the integrations and state which ones will receive the skipTranspile test. |
| Retest after fixes | A rewritten script usually needs a second round of testing and sign-off, which adds time that a first estimate may leave out. | Ask the proposal to state how many retest cycles are included and who performs them. |
Questions teams ask before checking webhook scripts for 9.0
Can our own team check webhook scripts for 9.0 without a partner?
Yes, most teams with an administrator and a developer who knows the scripts can run the check in-house. Start by listing every incoming and outgoing webhook, then read each script for the patterns the integrations documentation names: implicit globals, this inside nested functions, arguments.callee, legacy octal literals and duplicate parameter names. Those patterns are where scripts break once strict mode applies from 8.4.0 and Babel is removed in 9.0.0. Confirm the current rules in the Rocket.Chat integrations documentation before you begin, since your own script logic decides the outcome.
What does the work need from our team?
Plan for three inputs: a complete inventory of integrations with their owners, a non-production Rocket.Chat instance where you can edit and test scripts, and named owner time to review each script's behavior. The inventory is the easiest to skip and the most costly to miss, because scripts often live in integrations nobody has touched in years. Ask who can approve a change to each script and who will verify the downstream system still receives the right messages.
What drives the cost of this check?
The main driver is the number of scripts and how much of their logic you must understand before testing. Cost rises with undocumented scripts, scripts that call external systems, and integrations whose owners have left. The work is largely one-time for the check itself, but test runs and any later edits recur each time you retest against a new release. Ask any partner for a quote that lists the inventory step, per-script review, test cycles, and the retest after fixes, so you can compare it with your own staff time.
How do we use the skipTranspile option?
Use skipTranspile on the create and update integration endpoints to test whether a script already runs without Babel before 9.0 removes it. Apply it to a test integration first, run the script with sample payloads, and compare results with the production behavior. Record each script that fails under this setting, because those are the ones to fix before the upgrade. Confirm the exact request format in the integrations documentation for your version.
What happens if a script breaks after the upgrade?
The integration stops producing its expected output, and messages or actions it handles may fail silently or return errors. This is why testing and a rollback plan matter before the 9.0 upgrade. Keep a copy of each working script, schedule the upgrade in a window where owners can watch their integrations, and check the downstream systems after the first live events. Confirm your rollback steps with your own backup process, because the script copy alone does not restore a full workspace.
When should we bring in an outside partner for this work?
Consider a partner when the inventory is large, scripts depend on systems no one on your team can access, or the integrations carry regulated data and need evidence of testing. DeployOpen implements, customizes, integrates and supports self-hosted open-source platforms inside your own infrastructure, and works from a written, fixed scope with agreed deliverables and timelines. Ask for the scope in writing before work starts, and confirm whether the support you need is part of the engagement or a separate retainer.
Does the 9.0 check also cover Rocket.Chat version timing?
Yes, the script check should sit inside your wider upgrade plan. Rocket.Chat 8.x requires MongoDB 8.0 or later as a replica set, and standard releases get 6 months of support while LTS releases get 12 months. Use the Rocket.Chat version durability documentation to confirm the support window for the line you run, and schedule script testing so it finishes before any end-of-life date that affects your target version.
How DeployOpen works on this
DeployOpen approaches webhook script preparation as a written, fixed-scope piece of work inside your own Rocket.Chat environment. The work starts with an inventory of every incoming and outgoing webhook script, then tests each one against strict mode and the 9.0 Babel removal before any production change is made.
How we scope
- Inventory every incoming and outgoing webhook script, with its owner, trigger and downstream systems it calls.
- Agree in writing which scripts are in scope, which are retired, and which need an owner decision first.
- Confirm your target Rocket.Chat version, your test instance and who signs off each script before work begins.
How we build
- Review each script for the patterns that break in strict mode, such as implicit globals and nested this usage.
- Test each script on a staging copy using the skipTranspile option on the create and update integration endpoints.
- Rewrite affected scripts and record each change, the test result and the expected behavior in a change log.
How we hand over
- Deliver a compatibility report listing each script, its status, the fix applied and any open item for your team.
- Provide updated script source, test cases and the steps used to verify each integration after the change.
- Walk your administrators and script owners through the findings so they can maintain scripts after the engagement ends.
How we support
- Offer ongoing support, upgrades and continuous testing for your Rocket.Chat integrations as a retainer.
- Retest scripts when you change Rocket.Chat versions, so later releases do not reintroduce breakage.
- Ask any provider to confirm how they will handle script ownership, access to integration settings and post-handover fixes.

