Skip to content

Add support for images, videos, and actions to Teams webhooks - #8

Merged
shahidfoy merged 3 commits into
mainfrom
feature/rich-media-and-actions-7828470802488175843
Mar 24, 2026
Merged

Add support for images, videos, and actions to Teams webhooks#8
shahidfoy merged 3 commits into
mainfrom
feature/rich-media-and-actions-7828470802488175843

Conversation

@shahidfoy

Copy link
Copy Markdown
Member

This change updates the Teams Webhook Client library to support sending images, GIFs (via imageUrl), videos (via videoUrl), and call-to-action buttons.

Key changes:

  • New fields imageUrl and videoUrl added to WebhookMessage and Section.
  • New Action model and actions list added to MessageCard for interactive buttons.
  • Updated the underlying WebhookPayload and WebhookService to correctly serialize these new elements into the Microsoft Teams Adaptive Card format (version 1.4).
  • Added unit tests in WebhookServiceTest to ensure correct JSON payload generation for both simple messages and complex message cards with rich media and actions.
  • Integrated JUnit 5 for testing.

PR created automatically by Jules for task 7828470802488175843 started by @shahidfoy

- Updated WebhookMessage, MessageCard, and Section models to include imageUrl and videoUrl.
- Added Action model for call-to-action buttons in MessageCard.
- Updated WebhookPayload to support Image, Media, and Action.OpenUrl Adaptive Card elements.
- Enhanced WebhookService to map the new model fields to the webhook payload.
- Added JUnit 5 dependencies and WebhookServiceTest for unit testing.

Co-authored-by: shahidfoy <12647062+shahidfoy@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

google-labs-jules Bot and others added 2 commits March 5, 2026 02:45
- Bumped version in pom.xml to 0.3.0 to satisfy CI requirements.
- Verified WebhookService mappings and imports.
- Removed unused Gson instance from WebhookServiceTest.

Co-authored-by: shahidfoy <12647062+shahidfoy@users.noreply.github.com>
- Added imageUrl, videoUrl, and actions to WebhookMessage and MessageCard models.
- Updated WebhookService to map these new fields to Adaptive Card elements.
- Updated readme.md with version 0.3.0 and code examples for new features.
- Integrated JUnit 5 and added unit tests for payload generation.

Co-authored-by: shahidfoy <12647062+shahidfoy@users.noreply.github.com>
@shahidfoy
shahidfoy merged commit 7edb6a2 into main Mar 24, 2026
2 checks passed
@shahidfoy
shahidfoy deleted the feature/rich-media-and-actions-7828470802488175843 branch March 24, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant