Skip to content

Commit 508ebe3

Browse files
committed
fix(workflow): allow dual-mode blocks inside loop/parallel subflows
1 parent 81108d5 commit 508ebe3

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/workflow.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2020,11 +2020,11 @@ const WorkflowContent = React.memo(
20202020
const name = getUniqueBlockName(baseName, blocks)
20212021

20222022
if (containerInfo) {
2023-
// Check if this is a trigger block or has trigger mode enabled
2023+
// Only reject blocks that will actually be triggers: pure trigger blocks
2024+
// and explicit trigger-mode drops. A dual-mode block (e.g. Gmail) added
2025+
// without trigger mode is an ordinary block and is valid in a subflow.
20242026
const isTriggerBlock =
2025-
blockConfig.category === 'triggers' ||
2026-
blockConfig.triggers?.enabled ||
2027-
data.enableTriggerMode === true
2027+
blockConfig.category === 'triggers' || data.enableTriggerMode === true
20282028

20292029
if (isTriggerBlock) {
20302030
toast.error('Triggers cannot be placed inside loop or parallel subflows.')

0 commit comments

Comments
 (0)