argoproj / argoproj/notifications-engine

teams-workflow notification issue with enveloped message

Open
#440 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Go
Stars
334
Forks
217
PR merge metrics
No merged PRs in 30d

Description

We encounter an error when posting Teams workflow notifications to Power Automate-enabled webhooks.

### Error Message
```json
{
"code": "InvalidBotAdaptiveCard",
"message": "Microsoft.Azure.ProcessSimple.Data.Entities.Exceptions.ProcessSimpleDataException: The specified Teams flowbot adaptive card request is missing or invalid. The tracking Id is '{0}'. ---> AdaptiveCards.AdaptiveSerializationException: Property 'type' must be 'AdaptiveCard'"
}
```

## Current Behavior
Our organization relies on receiving Adaptive Card payloads without the message envelope wrapper. We only have access to the "Post a card in a chat or channel" workflow action.

The current implementation wraps the Adaptive Card in a message envelope, but the Power Automate webhook expects the root element to be of type AdaptiveCard directly.

Screenshots
Error response:

Image

Available workflow action:

Image

## Root Cause
The Teams workflow implementation at [pkg/services/teams-workflows.go#L498](https://github.com/argoproj/notifications-engine/blob/148c9a97b94ab0bfb1a56c39c653bb4ec97d00ca/pkg/services/teams-workflows.go#L498) always wraps the Adaptive Card in a message envelope, which is incompatible with Power Automate webhook configurations that expect a plain Adaptive Card payload.
Organizations using Power Automate workflows with the "Post card in a chat or channel" action cannot currently receive Argo CD notifications due to this envelope incompatibility.

## Requested Change
Please consider providing a configuration option or flag to disable the message envelope and send raw Adaptive Card JSON directly. This would enable compatibility with Power Automate webhook setups that expect the card as the root payload.

## Possible Solution
Add a configuration flag (e.g., `rawAdaptiveCard: true `or `stripEnvelope: true)` that, when enabled, sends the Adaptive Card without the message envelope wrapper.

Would it be possible to provide an option to not have this envelope to support this ?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading pkg/services/teams-workflows.go around line 498, where the Teams workflow payload is wrapped in a message envelope. Trace how the Adaptive Card is built and configured, then define and verify an option that sends the card as the root payload for Power Automate's "Post a card in a chat or channel" action.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.