Action that sends messages to Microsoft Teams via incoming webhooks

Example

// Simple text message
await runAction({
ActionName: 'Teams Webhook',
Params: [{
Name: 'WebhookURL',
Value: 'https://company.webhook.office.com/webhookb2/...'
}, {
Name: 'Message',
Value: 'Build completed successfully!'
}]
});

// Rich card with sections
await runAction({
ActionName: 'Teams Webhook',
Params: [{
Name: 'WebhookURL',
Value: webhookUrl
}, {
Name: 'Title',
Value: 'Deployment Status'
}, {
Name: 'Message',
Value: 'Production deployment completed'
}, {
Name: 'ThemeColor',
Value: '00FF00'
}, {
Name: 'Sections',
Value: [{
activityTitle: 'Deployment Details',
facts: [
{ name: 'Environment', value: 'Production' },
{ name: 'Version', value: 'v2.5.0' },
{ name: 'Duration', value: '5 minutes' }
]
}]
}]
});

// Adaptive Card
await runAction({
ActionName: 'Teams Webhook',
Params: [{
Name: 'WebhookURL',
Value: webhookUrl
}, {
Name: 'Card',
Value: {
type: 'AdaptiveCard',
version: '1.2',
body: [{
type: 'TextBlock',
text: 'Hello from MemberJunction!',
size: 'Large',
weight: 'Bolder'
}]
}
}]
});

Hierarchy (view full)

Constructors

Methods

  • Sends messages to Microsoft Teams via webhook

    Parameters

    • params: RunActionParams<any>

      The action parameters containing:

      • WebhookURL: Teams incoming webhook URL (required)
      • Message: Plain text message (required if no Card)
      • Card: Adaptive Card JSON (optional, overrides other formatting)
      • Title: Card title (optional)
      • ThemeColor: Hex color for card accent (optional, e.g., '0076D7')
      • Summary: Card summary (optional)
      • Sections: Array of MessageCard sections (optional)
      • PotentialAction: Array of actions for the card (optional)

    Returns Promise<ActionResultSimple>

    Success confirmation

  • Executes the action with the provided parameters.

    Parameters

    • params: RunActionParams<any>

      The action execution parameters including context

    Returns Promise<ActionResultSimple>

    Promise resolving to the action result