chore: import upstream snapshot with attribution
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
CI / Migrate Dev DB (push) Has been skipped
CI / Detect Version (push) Has been cancelled
CI / Migrate DB (push) Has been cancelled
CI / Build Dev ECR (./docker/app.Dockerfile, ECR_APP) (push) Has been cancelled
CI / Build Dev ECR (./docker/db.Dockerfile, ECR_MIGRATIONS) (push) Has been cancelled
CI / Build Dev ECR (./docker/pii.Dockerfile, ECR_PII) (push) Has been cancelled
CI / Build Dev ECR (./docker/realtime.Dockerfile, ECR_REALTIME) (push) Has been cancelled
CI / Deploy Trigger.dev (Dev) (push) Has been cancelled
CI / Build AMD64 (./docker/app.Dockerfile, ECR_APP, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build AMD64 (./docker/db.Dockerfile, ECR_MIGRATIONS, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build AMD64 (./docker/pii.Dockerfile, ECR_PII, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build AMD64 (./docker/realtime.Dockerfile, ECR_REALTIME, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/app.Dockerfile, ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/db.Dockerfile, ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/pii.Dockerfile, ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Build ARM64 (GHCR Only) (./docker/realtime.Dockerfile, ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/migrations) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/pii) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/realtime) (push) Has been cancelled
CI / Create GHCR Manifests (ghcr.io/simstudioai/simstudio) (push) Has been cancelled
CI / Check Docs Changes (push) Has been cancelled
CI / Process Docs (push) Has been cancelled
CI / Create GitHub Release (push) Has been cancelled
CI / Test and Build (push) Has been cancelled
Publish CLI Package / publish-npm (push) Has been cancelled
Publish Python SDK / publish-pypi (push) Has been cancelled
Publish TypeScript SDK / publish-npm (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,113 @@
|
||||
import { MicrosoftTeamsIcon } from '@/components/icons'
|
||||
import type { TriggerConfig } from '@/triggers/types'
|
||||
|
||||
export const microsoftTeamsChatSubscriptionTrigger: TriggerConfig = {
|
||||
id: 'microsoftteams_chat_subscription',
|
||||
name: 'Microsoft Teams Chat',
|
||||
provider: 'microsoft-teams',
|
||||
description:
|
||||
'Trigger workflow from new messages in Microsoft Teams chats via Microsoft Graph subscriptions',
|
||||
version: '1.0.0',
|
||||
icon: MicrosoftTeamsIcon,
|
||||
|
||||
subBlocks: [
|
||||
{
|
||||
id: 'triggerCredentials',
|
||||
title: 'Credentials',
|
||||
type: 'oauth-input',
|
||||
description: 'This trigger requires microsoft teams credentials to access your account.',
|
||||
serviceId: 'microsoft-teams',
|
||||
requiredScopes: [
|
||||
'openid',
|
||||
'profile',
|
||||
'email',
|
||||
'User.Read',
|
||||
'Chat.Read',
|
||||
'Chat.ReadWrite',
|
||||
'Chat.ReadBasic',
|
||||
'ChatMessage.Send',
|
||||
'Channel.ReadBasic.All',
|
||||
'ChannelMessage.Send',
|
||||
'ChannelMessage.Read.All',
|
||||
'ChannelMessage.ReadWrite',
|
||||
'ChannelMember.Read.All',
|
||||
'Group.Read.All',
|
||||
'Group.ReadWrite.All',
|
||||
'Team.ReadBasic.All',
|
||||
'TeamMember.Read.All',
|
||||
'offline_access',
|
||||
'Files.Read',
|
||||
'Sites.Read.All',
|
||||
],
|
||||
required: true,
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_chat_subscription',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'triggerChatId',
|
||||
title: 'Chat ID',
|
||||
type: 'short-input',
|
||||
placeholder: 'Enter chat ID',
|
||||
description: 'The ID of the Teams chat to monitor',
|
||||
required: true,
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_chat_subscription',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'includeAttachments',
|
||||
title: 'Include Attachments',
|
||||
type: 'switch',
|
||||
defaultValue: true,
|
||||
description: 'Fetch hosted contents and upload to storage',
|
||||
required: false,
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_chat_subscription',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'triggerInstructions',
|
||||
title: 'Setup Instructions',
|
||||
hideFromPreview: true,
|
||||
type: 'text',
|
||||
defaultValue: [
|
||||
'Connect your Microsoft Teams account and grant the required permissions.',
|
||||
'Enter the Chat ID of the Teams chat you want to monitor.',
|
||||
'We will create a Microsoft Graph change notification subscription that delivers chat message events to your Sim webhook URL.',
|
||||
]
|
||||
.map(
|
||||
(instruction, index) =>
|
||||
`<div class="mb-3"><strong>${index + 1}.</strong> ${instruction}</div>`
|
||||
)
|
||||
.join(''),
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_chat_subscription',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
outputs: {
|
||||
message_id: { type: 'string', description: 'Message ID' },
|
||||
chat_id: { type: 'string', description: 'Chat ID' },
|
||||
from_name: { type: 'string', description: 'Sender display name' },
|
||||
text: { type: 'string', description: 'Message body (HTML or text)' },
|
||||
created_at: { type: 'string', description: 'Message timestamp' },
|
||||
attachments: { type: 'file[]', description: 'Uploaded attachments as files' },
|
||||
},
|
||||
|
||||
webhook: {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
export { microsoftTeamsChatSubscriptionTrigger } from './chat_webhook'
|
||||
export { microsoftTeamsWebhookTrigger } from './webhook'
|
||||
@@ -0,0 +1,128 @@
|
||||
import { MicrosoftTeamsIcon } from '@/components/icons'
|
||||
import type { TriggerConfig } from '../types'
|
||||
|
||||
export const microsoftTeamsWebhookTrigger: TriggerConfig = {
|
||||
id: 'microsoftteams_webhook',
|
||||
name: 'Microsoft Teams Channel',
|
||||
provider: 'microsoft-teams',
|
||||
description: 'Trigger workflow from Microsoft Teams channel messages via outgoing webhooks',
|
||||
version: '1.0.0',
|
||||
icon: MicrosoftTeamsIcon,
|
||||
|
||||
subBlocks: [
|
||||
{
|
||||
id: 'selectedTriggerId',
|
||||
title: 'Trigger Type',
|
||||
type: 'dropdown',
|
||||
mode: 'trigger',
|
||||
options: [
|
||||
{ label: 'Microsoft Teams Channel', id: 'microsoftteams_webhook' },
|
||||
{ label: 'Microsoft Teams Chat', id: 'microsoftteams_chat_subscription' },
|
||||
],
|
||||
value: () => 'microsoftteams_webhook',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
id: 'webhookUrlDisplay',
|
||||
title: 'Webhook URL',
|
||||
type: 'short-input',
|
||||
readOnly: true,
|
||||
showCopyButton: true,
|
||||
useWebhookUrl: true,
|
||||
placeholder: 'Webhook URL will be generated',
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_webhook',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'hmacSecret',
|
||||
title: 'HMAC Secret',
|
||||
type: 'short-input',
|
||||
placeholder: 'Enter HMAC secret from Teams',
|
||||
description:
|
||||
'The security token provided by Teams when creating an outgoing webhook. Used to verify request authenticity.',
|
||||
password: true,
|
||||
required: true,
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_webhook',
|
||||
},
|
||||
},
|
||||
{
|
||||
id: 'triggerInstructions',
|
||||
title: 'Setup Instructions',
|
||||
hideFromPreview: true,
|
||||
type: 'text',
|
||||
defaultValue: [
|
||||
'Open Microsoft Teams and go to the team where you want to add the webhook. See the <a href="https://learn.microsoft.com/en-us/microsoftteams/platform/webhooks-and-connectors/how-to/add-outgoing-webhook" target="_blank" rel="noopener noreferrer">Microsoft Teams documentation</a> for detailed steps.',
|
||||
'Click the three dots (•••) next to the team name and select "Manage team".',
|
||||
'Go to the "Apps" tab and click "Create an outgoing webhook".',
|
||||
'Provide a name, description, and optionally a profile picture.',
|
||||
'Set the callback URL to your Sim webhook URL above.',
|
||||
'Copy the HMAC security token and paste it into the "HMAC Secret" field.',
|
||||
'Click "Create" to finish setup.',
|
||||
]
|
||||
.map(
|
||||
(instruction, index) =>
|
||||
`<div class="mb-3"><strong>${index + 1}.</strong> ${instruction}</div>`
|
||||
)
|
||||
.join(''),
|
||||
mode: 'trigger',
|
||||
condition: {
|
||||
field: 'selectedTriggerId',
|
||||
value: 'microsoftteams_webhook',
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
outputs: {
|
||||
from: {
|
||||
id: { type: 'string', description: 'Sender ID' },
|
||||
name: { type: 'string', description: 'Sender name' },
|
||||
aadObjectId: { type: 'string', description: 'AAD Object ID' },
|
||||
},
|
||||
message: {
|
||||
raw: {
|
||||
attachments: { type: 'json', description: 'Array of attachments' },
|
||||
channelData: {
|
||||
team: { id: { type: 'string', description: 'Team ID' } },
|
||||
tenant: { id: { type: 'string', description: 'Tenant ID' } },
|
||||
channel: { id: { type: 'string', description: 'Channel ID' } },
|
||||
teamsTeamId: { type: 'string', description: 'Teams team ID' },
|
||||
teamsChannelId: { type: 'string', description: 'Teams channel ID' },
|
||||
},
|
||||
conversation: {
|
||||
id: { type: 'string', description: 'Composite conversation ID' },
|
||||
name: { type: 'string', description: 'Conversation name (nullable)' },
|
||||
isGroup: { type: 'boolean', description: 'Is group conversation' },
|
||||
tenantId: { type: 'string', description: 'Tenant ID' },
|
||||
aadObjectId: { type: 'string', description: 'AAD Object ID (nullable)' },
|
||||
conversationType: { type: 'string', description: 'Conversation type (channel)' },
|
||||
},
|
||||
text: { type: 'string', description: 'Message text content' },
|
||||
messageType: { type: 'string', description: 'Message type' },
|
||||
channelId: { type: 'string', description: 'Channel ID (msteams)' },
|
||||
timestamp: { type: 'string', description: 'Timestamp' },
|
||||
},
|
||||
},
|
||||
activity: { type: 'object', description: 'Activity payload' },
|
||||
conversation: {
|
||||
id: { type: 'string', description: 'Composite conversation ID' },
|
||||
name: { type: 'string', description: 'Conversation name (nullable)' },
|
||||
isGroup: { type: 'boolean', description: 'Is group conversation' },
|
||||
tenantId: { type: 'string', description: 'Tenant ID' },
|
||||
aadObjectId: { type: 'string', description: 'AAD Object ID (nullable)' },
|
||||
conversationType: { type: 'string', description: 'Conversation type (channel)' },
|
||||
},
|
||||
},
|
||||
|
||||
webhook: {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user