nuke icon indicating copy to clipboard operation
nuke copied to clipboard

SendTeamsMessage is incompatible with new webhooks and uses a deprecated API scheduled for retirement

Open mihetah opened this issue 2 months ago • 0 comments

Usage Information

NUKE Execution Engine version 9.0.4 (OSX,.NETCoreApp,Version=v9.0)

Description

The core issue is that the SendTeamsMessage task is not compatible with newly created Microsoft Teams webhooks because it uses a deprecated message format.

Furthermore, the entire legacy "Incoming Webhook" connector technology is scheduled for retirement on December 31, 2025, which will eventually break this task for all users, including those with older, currently functional webhooks.

The immediate problem is a two-stage failure for new webhooks:

  1. Incompatibility: The task sends a message using the legacy "Office 365 Connector Card" format. All newly created webhooks, however, now require the modern "Adaptive Card" format.
  2. Silent Failure: The Teams API receives the old format, accepts it with a 202 Accepted status, but then discards the message during backend processing. No notification is ever posted.
  3. Build Crash: The NUKE task expects the API to reply with "1" to confirm success. Since the API now sends an empty response for this failure case, NUKE's assertion '' == '1' fails, crashing the build.

This bug report is to address the immediate incompatibility and to highlight the need to migrate to the new standard before the hard deadline.

Reproduction Steps

  1. Create a new Workflow "Post to a Teams chat using an incoming webhook" in Microsoft Teams.
  2. Configure a NUKE build to use the SendTeamsMessage task, pointing to the new webhook URL.
  3. Execute the build.
  4. Observe: No message appears in the Teams channel.
  5. Observe: The NUKE build fails shortly after with the '' == '1' assertion error.

Expected Behavior

NUKE should provide a robust, future-proof migration path to the modern Teams API while guiding users away from the deprecated task. It is understood that it is impossible for the client to confirm message delivery; it can only confirm message submission.

  1. Introduce New Task for Adaptive Cards: A new task (e.g., SendTeamsAdaptiveCard) must be added to send payloads using the modern, required "Adaptive Card" format. For this task, a 2xx status code should be treated as a successful submission, as this is the only confirmation the API provides. This should be the recommended method for all Teams notifications.

  2. Mark Old Task as Deprecated: The existing SendTeamsMessage task must be marked with the [Obsolete] attribute. The message should warn users that the API is being retired on Dec 31, 2025, and direct them to the new Adaptive Card task.

  3. Improve the Old Task's Failure Mode: The task should still fail when a message is not delivered, but the error must be clear and actionable. The current Assert.True('' == '1') should be replaced with explicit logic:

    If the API response is 2xx and the body is not "1", the task must fail the build with a descriptive error message.

    Example Error Message: "Failed to send Teams notification. The webhook submission was accepted (202 Accepted) but did not confirm successful processing. This happens when a new webhook is used with the deprecated SendTeamsMessage task, causing the message to be dropped. Please migrate to the recommended SendTeamsAdaptiveCard task. This build is failing to prevent a silent notification failure."

Actual Behavior

For new webhooks, the task fails to deliver the message and then crashes the build with a cryptic and unhelpful error ('' == '1').

Regression?

No response

Known Workarounds

No response

Could you help with a pull-request?

Yes

mihetah avatar Nov 06 '25 14:11 mihetah