Skip to content

Extend workflow actions: 2→10 action types#86

Merged
xuyushun441-sys merged 3 commits intomainfrom
copilot/add-notification-action-types
Jan 23, 2026
Merged

Extend workflow actions: 2→10 action types#86
xuyushun441-sys merged 3 commits intomainfrom
copilot/add-notification-action-types

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jan 23, 2026

Extends workflow automation from 2 action types (field update, email) to 10 types for multi-channel notification and integration support.

Added Actions

Messaging & Notifications:

  • sms_notification - Twilio/Vonage SMS with provider selection
  • slack_message - Channel messages with mentions and threading
  • teams_message - Microsoft Teams with team/channel routing
  • push_notification - Mobile push with deep linking

Integrations:

  • http_call - REST API calls with auth (Basic, Bearer, OAuth2, API Key)
  • webhook_trigger - Outbound webhooks with retry logic
  • task_creation - Create records on any object with field mapping

Extensibility:

  • custom_script - JavaScript/TypeScript/Python execution with timeout control

Implementation

All schemas follow Zod-first pattern with discriminated unions for type safety:

export const WorkflowActionSchema = z.discriminatedUnion('type', [
  FieldUpdateActionSchema,
  EmailAlertActionSchema,
  SmsNotificationActionSchema,
  SlackMessageActionSchema,
  TeamsMessageActionSchema,
  HttpCallActionSchema,
  WebhookTriggerActionSchema,
  TaskCreationActionSchema,
  PushNotificationActionSchema,
  CustomScriptActionSchema,
]);

Example multi-channel workflow:

{
  name: 'notify_high_value_deal',
  objectName: 'opportunity',
  triggerType: 'on_create',
  criteria: 'amount > 100000',
  actions: [
    { type: 'email_alert', template: 'deal_alert', recipients: [...] },
    { type: 'sms_notification', provider: 'twilio', message: '...', recipients: [...] },
    { type: 'slack_message', channel: '#sales-wins', message: '...', mentions: [...] },
    { type: 'webhook_trigger', url: 'https://...', payload: {...} }
  ]
}

Artifacts

  • JSON schemas auto-generated for all action types
  • TypeScript types derived via z.infer<>
  • MDX documentation generated for each schema
Original prompt
  1. 工作流动作扩展

文件: packages/spec/src/data/workflow.zod.ts
工作量: 3 天
当前状态: 只有字段更新 + 邮件动作
目标: 10+ 动作类型

新增动作类型:

SMS 通知(Twilio、Vonage)
Slack/Teams 消息
HTTP 调用(REST API 集成)
Webhook 触发
任务创建
推送通知
自定义脚本


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Jan 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
spec Ready Ready Preview, Comment Jan 23, 2026 10:37am

Request Review

Copilot AI and others added 2 commits January 23, 2026 10:33
…sk, Push, Script

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Add new action types for workflow extension Extend workflow actions: 2→10 action types Jan 23, 2026
Copilot AI requested a review from hotlong January 23, 2026 10:36
@github-actions github-actions bot added documentation Improvements or additions to documentation protocol:data tests size/xl labels Jan 23, 2026
@github-actions
Copy link
Copy Markdown
Contributor

This PR is very large. Consider breaking it into smaller PRs for easier review.

@xuyushun441-sys xuyushun441-sys marked this pull request as ready for review January 23, 2026 10:50
@xuyushun441-sys xuyushun441-sys merged commit ae155ed into main Jan 23, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation protocol:data size/xl tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants