:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
feat(workflows): tag workflows with the product that owns them (#92674)
Harley Alexanderc34b47cb62bd
diff --git a/products/workflows/backend/api/hog_flow.py b/products/workflows/backend/api/hog_flow.pyindex 140d66229399..ec56c3c3392e 100644--- a/products/workflows/backend/api/hog_flow.py+++ b/products/workflows/backend/api/hog_flow.py@@ -2370,6 +2370,7 @@ class HogFlowMinimalSerializer(UserAccessControlSerializerMixin, serializers.Mod"description","version","status",+ "origin_product","created_at","created_by","updated_at",@@ -2431,6 +2432,7 @@ class HogFlowSummarySerializer(HogFlowMinimalSerializer):"description","version","status",+ "origin_product","created_at","created_by","updated_at",@@ -2441,6 +2443,13 @@ class HogFlowSummarySerializer(HogFlowMinimalSerializer):class HogFlowSerializer(HogFlowMinimalSerializer):+ origin_product = serializers.ChoiceField(+ choices=HogFlow.OriginProduct.choices,+ required=False,+ allow_null=True,+ help_text="Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when "+ "creating a workflow. Filter the list with `?origin_product=`.",+ )name = serializers.CharField(max_length=400, required=False, allow_null=True, allow_blank=True, help_text="Workflow name.")@@ -2642,6 +2651,7 @@ class HogFlowSerializer(HogFlowMinimalSerializer):"description","version","status",+ "origin_product","created_at","created_by","updated_at",@@ -2848,6 +2858,26 @@ class HogFlowSerializer(HogFlowMinimalSerializer):return super().update(instance, validated_data)+class HogFlowUpdateSerializer(HogFlowSerializer):+ origin_product = serializers.ChoiceField(+ choices=HogFlow.OriginProduct.choices,+ read_only=True,+ allow_null=True,+ help_text="Product surface that owns this workflow. This value cannot change after creation.",+ )++ def validate(self, data: dict) -> dict:+ instance = cast(Optional[HogFlow], self.instance)+ submitted_origin_product = self.initial_data.get("origin_product", serializers.empty)+ if (+ instance is not None+ and submitted_origin_product is not serializers.empty+ and submitted_origin_product != instance.origin_product+ ):+ raise serializers.ValidationError({"origin_product": "origin_product is set on create and cannot change."})+ return super().validate(data)++GRAPH_OPERATION_TYPES = ["update_action","add_action",@@ -3347,6 +3377,12 @@ def mint_audience_confirm_token(enum=["messaging", "automation"],description="Filter by workflow type. `messaging` returns workflows with an email, SMS, or push action; `automation` returns the rest.",),+ OpenApiParameter(+ "origin_product",+ OpenApiTypes.STR,+ enum=HogFlow.OriginProduct.values,+ description="Filter to workflows owned by a product surface, e.g. `loops` for Desktop loops.",+ ),OpenApiParameter("trigger",OpenApiTypes.STR,@@ -3454,6 +3490,8 @@ class HogFlowViewSet(if self.request is not None and self._is_mcp_request(self.request):return HogFlowSummarySerializerreturn HogFlowMinimalSerializer+ if self.action in ("update", "partial_update"):+ return HogFlowUpdateSerializerreturn HogFlowSerializerdef get_serializer_context(self) -> dict:@@ -3501,6 +3539,14 @@ class HogFlowViewSet(queryset.filter(messaging_q) if workflow_type == "messaging" else queryset.exclude(messaging_q))+ origin_product = self.request.GET.get("origin_product")+ if origin_product:+ if origin_product not in HogFlow.OriginProduct.values:+ raise exceptions.ValidationError(+ {"origin_product": f"Must be one of: {', '.join(HogFlow.OriginProduct.values)}"}+ )+ queryset = queryset.filter(origin_product=origin_product)+if self.request.GET.get("trigger"):try:trigger = json.loads(self.request.GET["trigger"])diff --git a/products/workflows/backend/api/test/test_hog_flow.py b/products/workflows/backend/api/test/test_hog_flow.pyindex 189cff19c67f..b0331107bb4e 100644--- a/products/workflows/backend/api/test/test_hog_flow.py+++ b/products/workflows/backend/api/test/test_hog_flow.py@@ -273,6 +273,34 @@ class TestHogFlowAPI(APIBaseTest):response = self.client.get(f"/api/projects/{self.team.id}/hog_flows?type=campaign")assert response.status_code == 400+ def test_list_filter_by_origin_product(self):+ HogFlow.objects.create(team=self.team, name="Loop", created_by=self.user, origin_product="loops")+ HogFlow.objects.create(team=self.team, name="Hand built", created_by=self.user)++ response = self.client.get(f"/api/projects/{self.team.id}/hog_flows?origin_product=loops")+ assert response.status_code == 200, response.json()+ assert {flow["name"] for flow in response.json()["results"]} == {"Loop"}++ response = self.client.get(f"/api/projects/{self.team.id}/hog_flows?origin_product=spreadsheets")+ assert response.status_code == 400++ def test_origin_product_is_set_on_create_and_immutable(self):+ hog_flow, _ = self._create_hog_flow_with_action(+ {"template_id": "template-webhook", "inputs": {"url": {"value": "https://example.com"}}}+ )+ response = self.client.post(f"/api/projects/{self.team.id}/hog_flows", {**hog_flow, "origin_product": "loops"})+ assert response.status_code == 201, response.json()+ flow_id = response.json()["id"]+ assert response.json()["origin_product"] == "loops"++ response = self.client.patch(f"/api/projects/{self.team.id}/hog_flows/{flow_id}", {"origin_product": None})+ assert response.status_code == 400+ assert response.json()["attr"] == "origin_product"++ response = self.client.patch(f"/api/projects/{self.team.id}/hog_flows/{flow_id}", {"name": "Renamed"})+ assert response.status_code == 200, response.json()+ assert response.json()["origin_product"] == "loops"+def test_mcp_list_is_metadata_only_and_hides_action_secrets(self):# A webhook action whose headers carry a bearer token — the kind of credential-like value# that must not leak from a workflow *listing*.diff --git a/products/workflows/backend/migrations/0022_hogflow_origin_product.py b/products/workflows/backend/migrations/0022_hogflow_origin_product.pynew file mode 100644index 000000000000..1d0fa3ab5685--- /dev/null+++ b/products/workflows/backend/migrations/0022_hogflow_origin_product.py@@ -0,0 +1,24 @@+# Generated by Django 5.2.17 on 2026-09-01 15:19++from django.db import migrations, models++import products.workflows.backend.models.hog_flow.hog_flow+++class Migration(migrations.Migration):+ dependencies = [+ ("workflows", "0021_backfill_internal_event_triggers"),+ ]++ operations = [+ migrations.AddField(+ model_name="hogflow",+ name="origin_product",+ field=models.CharField(+ blank=True,+ choices=products.workflows.backend.models.hog_flow.hog_flow.hog_flow_origin_product_choices,+ max_length=40,+ null=True,+ ),+ ),+ ]diff --git a/products/workflows/backend/migrations/max_migration.txt b/products/workflows/backend/migrations/max_migration.txtindex 5b5400ec7055..f00ba1800f22 100644--- a/products/workflows/backend/migrations/max_migration.txt+++ b/products/workflows/backend/migrations/max_migration.txt@@ -1 +1 @@-0021_backfill_internal_event_triggers+0022_hogflow_origin_productdiff --git a/products/workflows/backend/models/hog_flow/hog_flow.py b/products/workflows/backend/models/hog_flow/hog_flow.pyindex 1f81837443b0..45594ac1693b 100644--- a/products/workflows/backend/models/hog_flow/hog_flow.py+++ b/products/workflows/backend/models/hog_flow/hog_flow.py@@ -3,6 +3,7 @@ from typing import TYPE_CHECKING, Finalfrom django.db import models, transactionfrom django.db.models.signals import post_delete, post_savefrom django.dispatch.dispatcher import receiver+from django.utils.functional import Promiseimport structlog@@ -101,6 +102,11 @@ ROW_SCOPED_TRIGGER_TYPES: Final[set[str]] = {}+def hog_flow_origin_product_choices() -> list[tuple[str, str | Promise]]:+ # Callable so growing the enum doesn't generate a no-op migration.+ return list(HogFlow.OriginProduct.choices)++class HogFlow(UUIDTModel):"""Stores the version, layout and other meta information for each HogFlow@@ -128,11 +134,19 @@ class HogFlow(UUIDTModel):TRIGGER_NOT_MATCHED_OR_CONVERSION = "exit_on_trigger_not_matched_or_conversion"ONLY_AT_END = "exit_only_at_end"+ class OriginProduct(models.TextChoices):+ LOOPS = "loops", "Loops"+name = models.CharField(max_length=400, null=True, blank=True)description = models.TextField(blank=True, default="")version = models.IntegerField(default=1)team = models.ForeignKey("posthog.Team", on_delete=models.CASCADE)status = models.CharField(max_length=20, choices=State, default=State.DRAFT)+ # The product surface that owns this workflow, so that surface can list only its own flows.+ # Null for workflows built directly in the workflows UI or over the API.+ origin_product = models.CharField(+ max_length=40, choices=hog_flow_origin_product_choices, null=True, blank=True, db_index=False+ )created_at = models.DateTimeField(auto_now_add=True)created_by = models.ForeignKey("posthog.User", on_delete=models.SET_NULL, null=True, blank=True)diff --git a/products/workflows/frontend/Workflows/workflowDuplication.test.ts b/products/workflows/frontend/Workflows/workflowDuplication.test.tsnew file mode 100644index 000000000000..907c6734324a--- /dev/null+++ b/products/workflows/frontend/Workflows/workflowDuplication.test.ts@@ -0,0 +1,23 @@+import type { HogFlow } from './hogflows/types'+import { prepareWorkflowDuplicate } from './workflowDuplication'++describe('prepareWorkflowDuplicate', () => {+ it('removes server-owned identity and product ownership fields', () => {+ const workflow = {+ id: 'workflow-id',+ team_id: 1,+ name: 'Loop workflow',+ status: 'active',+ created_at: '2026-09-01T00:00:00Z',+ updated_at: '2026-09-01T00:00:00Z',+ origin_product: 'loops',+ actions: [],+ } as unknown as HogFlow++ expect(prepareWorkflowDuplicate(workflow)).toEqual({+ name: 'Loop workflow (copy)',+ status: 'draft',+ actions: [],+ })+ })+})diff --git a/products/workflows/frontend/Workflows/workflowDuplication.ts b/products/workflows/frontend/Workflows/workflowDuplication.tsnew file mode 100644index 000000000000..c99f09c9b55b--- /dev/null+++ b/products/workflows/frontend/Workflows/workflowDuplication.ts@@ -0,0 +1,17 @@+import type { HogFlow } from './hogflows/types'++export function prepareWorkflowDuplicate(workflow: HogFlow): Partial<HogFlow> {+ const duplicate: Partial<HogFlow> & { origin_product?: unknown } = {+ ...workflow,+ name: `${workflow.name} (copy)`,+ status: 'draft',+ }++ delete duplicate.id+ delete duplicate.team_id+ delete duplicate.created_at+ delete duplicate.updated_at+ delete duplicate.origin_product++ return duplicate+}diff --git a/products/workflows/frontend/Workflows/workflowLogic.ts b/products/workflows/frontend/Workflows/workflowLogic.tsindex a376e5240ed8..652da3757a41 100644--- a/products/workflows/frontend/Workflows/workflowLogic.ts+++ b/products/workflows/frontend/Workflows/workflowLogic.ts@@ -50,6 +50,7 @@ import {type HogFlowSchedule,} from './hogflows/types'import { openPublishConfirmDialog } from './PublishImpactDialog'+import { prepareWorkflowDuplicate } from './workflowDuplication'import { workflowSceneLogic } from './workflowSceneLogic'import { workflowsLogic } from './workflowsLogic'@@ -4232,17 +4233,7 @@ export const workflowLogic = kea<workflowLogicType>([if (!workflow) {return}- const newWorkflow = {- ...workflow,- name: `${workflow.name} (copy)`,- status: 'draft' as const,- }- delete (newWorkflow as any).id- delete (newWorkflow as any).team_id- delete (newWorkflow as any).created_at- delete (newWorkflow as any).updated_at-- const createdWorkflow = await api.hogFlows.createHogFlow(newWorkflow)+ const createdWorkflow = await api.hogFlows.createHogFlow(prepareWorkflowDuplicate(workflow))lemonToast.success('Workflow duplicated')router.actions.push(urls.workflow(createdWorkflow.id, 'workflow'))},diff --git a/products/workflows/frontend/Workflows/workflowsLogic.ts b/products/workflows/frontend/Workflows/workflowsLogic.tsindex ab0064b35be3..b74575055e40 100644--- a/products/workflows/frontend/Workflows/workflowsLogic.ts+++ b/products/workflows/frontend/Workflows/workflowsLogic.ts@@ -11,6 +11,7 @@ import { urls } from 'scenes/urls'import { deleteFromTree } from '~/layout/panel-layout/ProjectTree/projectTreeLogic'import type { HogFlow } from './hogflows/types'+import { prepareWorkflowDuplicate } from './workflowDuplication'export type WorkflowStatusFilter = 'all' | 'active' | 'draft' | 'archived'@@ -320,11 +321,7 @@ export const workflowsLogic = kea<workflowsLogicType>([return values.workflows},duplicateWorkflow: async ({ workflow }) => {- await api.hogFlows.createHogFlow({- ...workflow,- status: 'draft',- name: `${workflow.name} (copy)`,- })+ await api.hogFlows.createHogFlow(prepareWorkflowDuplicate(workflow))// The copy is a draft; reload so it only shows when it matches the current filter// and lands in the right spot under the server-side sort and pagination.actions.loadWorkflows()diff --git a/products/workflows/frontend/generated/api.schemas.ts b/products/workflows/frontend/generated/api.schemas.tsindex 5a7f24744472..d649165e0759 100644--- a/products/workflows/frontend/generated/api.schemas.ts+++ b/products/workflows/frontend/generated/api.schemas.ts@@ -236,6 +236,15 @@ export const HogFlowStateEnumApi = {Archived: 'archived',} as const+/**+ * * `loops` - Loops+ */+export type HogFlowOriginProductEnumApi = (typeof HogFlowOriginProductEnumApi)[keyof typeof HogFlowOriginProductEnumApi]++export const HogFlowOriginProductEnumApi = {+ Loops: 'loops',+} as const+/*** * `engineering` - Engineering* * `data` - Data@@ -303,6 +312,7 @@ export interface HogFlowMinimalApi {readonly description: stringreadonly version: numberreadonly status: HogFlowStateEnumApi+ readonly origin_product: HogFlowOriginProductEnumApi | nullreadonly created_at: stringreadonly created_by: UserBasicApireadonly updated_at: string@@ -574,6 +584,10 @@ export interface HogFlowApi {* * `active` - Active* * `archived` - Archived */status?: HogFlowStateEnumApi+ /** Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.+ *+ * * `loops` - Loops */+ origin_product?: HogFlowOriginProductEnumApi | nullreadonly created_at: stringreadonly created_by: UserBasicApireadonly updated_at: string@@ -624,18 +638,100 @@ export interface HogFlowApi {/*** Variable: {key, type: string|number|boolean, default}.*/-export type PatchedHogFlowApiVariablesItem = { [key: string]: string }+export type HogFlowUpdateApiVariablesItem = { [key: string]: string }++/**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+export type HogFlowUpdateApiActionRedirects = { [key: string]: string } | null++/**+ * Mixin for serializers to add user access control fields+ */+export interface HogFlowUpdateApi {+ readonly id: string+ /**+ * Workflow name.+ * @maxLength 400+ * @nullable+ */+ name?: string | null+ /** Optional description. */+ description?: string+ readonly version: number+ /** draft (no execution), active (live), archived (disabled).+ *+ * * `draft` - Draft+ * * `active` - Active+ * * `archived` - Archived */+ status?: HogFlowStateEnumApi+ /** Product surface that owns this workflow. This value cannot change after creation.+ *+ * * `loops` - Loops */+ readonly origin_product: HogFlowOriginProductEnumApi | null+ readonly created_at: string+ readonly created_by: UserBasicApi+ readonly updated_at: string+ readonly trigger: unknown+ /** Optional dedup/throttle on an already-matched trigger: {hash: <HogQL template>, ttl: <seconds, 60-94608000>, threshold?: <int>}. Without threshold: fire once per hash, then suppress repeats within ttl (hash '{person.id}' = once per person per ttl). With threshold N: fire once per N matches of the same hash — a sampler, the 1st then every Nth. Throttles an already-qualifying trigger; it doesn't decide who enters. Server compiles bytecode from hash; omit to disable. */+ trigger_masking?: HogFlowMaskingApi | null+ /** Conversion goal. filters: ARRAY of property conditions [{key, value, operator, type: event|person|group}]; events: event-based goals [{filters: {events: [...]}}]; window_minutes: minutes after entry. Required for exit_on_conversion / exit_on_trigger_not_matched_or_conversion. bytecode compiled server-side. */+ conversion?: HogFlowConversionApi | null+ /** exit_only_at_end: only at exit node (default). exit_on_conversion: also on conversion (needs 'conversion'; silent no-op otherwise). exit_on_trigger_not_matched: also when trigger filter stops matching. exit_on_trigger_not_matched_or_conversion: both (needs 'conversion').+ *+ * * `exit_on_conversion` - Conversion+ * * `exit_on_trigger_not_matched` - Trigger Not Matched+ * * `exit_on_trigger_not_matched_or_conversion` - Trigger Not Matched Or Conversion+ * * `exit_only_at_end` - Only At End */+ exit_condition?: ExitConditionEnumApi+ /** Optional email pacing for deliverability: {count, period: 'minute' | 'hour'}. The email worker spreads this workflow's sends to stay under the limit; over-limit sends wait for capacity instead of failing. Null disables pacing. */+ email_sending_rate_limit?: HogFlowEmailSendingRateLimitApi | null+ /** Graph edges: [{from, to, type: 'continue'|'branch', index?}]. 'continue' = fall-through (sequential, or no-match path of conditional_branch). 'branch' requires 'index': matches config.conditions[index] on conditional_branch / wait_until_condition. Every non-exit action needs a reachable next action ('No next action found' otherwise). */+ edges?: HogFlowEdgeApi[]+ /** Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too. */+ actions: HogFlowActionApi[]+ /** @nullable */+ readonly abort_action: string | null+ /** Workflow vars (key, type, default). Total <5KB. */+ variables?: HogFlowUpdateApiVariablesItem[]+ readonly billable_action_types: unknown+ /** Recurring schedules attached to this workflow (read-only here; manage via the schedules sub-resource). A batch/schedule workflow only fires when it's active AND has an active schedule. Empty for non-scheduled workflows. */+ readonly schedules: readonly HogFlowScheduleApi[]+ /**+ * The effective access level the user has for this object+ * @nullable+ */+ readonly user_access_level: string | null+ /** Staged content changes awaiting publish — a full snapshot of the workflow's actions, edges and settings. Null when there's nothing staged. Test it with a use_draft test run, then promote it with the publish endpoint or throw it away with discard_draft. */+ readonly draft: unknown+ /**+ * When the draft was last written; null when there's no staged draft. Pass this to publish (and as base_updated_at on further draft edits) so a concurrent editor's changes aren't clobbered — a mismatch returns 409.+ * @nullable+ */+ readonly draft_updated_at: string | null+ /**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+ readonly action_redirects: HogFlowUpdateApiActionRedirects+}++/**+ * Variable: {key, type: string|number|boolean, default}.+ */+export type PatchedHogFlowUpdateApiVariablesItem = { [key: string]: string }/*** Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.* @nullable*/-export type PatchedHogFlowApiActionRedirects = { [key: string]: string } | null+export type PatchedHogFlowUpdateApiActionRedirects = { [key: string]: string } | null/*** Mixin for serializers to add user access control fields*/-export interface PatchedHogFlowApi {+export interface PatchedHogFlowUpdateApi {readonly id?: string/*** Workflow name.@@ -652,6 +748,10 @@ export interface PatchedHogFlowApi {* * `active` - Active* * `archived` - Archived */status?: HogFlowStateEnumApi+ /** Product surface that owns this workflow. This value cannot change after creation.+ *+ * * `loops` - Loops */+ readonly origin_product?: HogFlowOriginProductEnumApi | nullreadonly created_at?: stringreadonly created_by?: UserBasicApireadonly updated_at?: string@@ -676,7 +776,7 @@ export interface PatchedHogFlowApi {/** @nullable */readonly abort_action?: string | null/** Workflow vars (key, type, default). Total <5KB. */- variables?: PatchedHogFlowApiVariablesItem[]+ variables?: PatchedHogFlowUpdateApiVariablesItem[]readonly billable_action_types?: unknown/** Recurring schedules attached to this workflow (read-only here; manage via the schedules sub-resource). A batch/schedule workflow only fires when it's active AND has an active schedule. Empty for non-scheduled workflows. */readonly schedules?: readonly HogFlowScheduleApi[]@@ -696,7 +796,7 @@ export interface PatchedHogFlowApi {* Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.* @nullable*/- readonly action_redirects?: PatchedHogFlowApiActionRedirects+ readonly action_redirects?: PatchedHogFlowUpdateApiActionRedirects}/**@@ -1563,6 +1663,10 @@ export type HogFlowsListParams = {* The initial index from which to return the results.*/offset?: number+ /**+ * Filter to workflows owned by a product surface, e.g. `loops` for Desktop loops.+ */+ origin_product?: HogFlowsListOriginProduct/*** Case-insensitive search across workflow name and description.*/@@ -1584,6 +1688,12 @@ export type HogFlowsListParams = {updated_at?: string}+export type HogFlowsListOriginProduct = (typeof HogFlowsListOriginProduct)[keyof typeof HogFlowsListOriginProduct]++export const HogFlowsListOriginProduct = {+ Loops: 'loops',+} as const+export type HogFlowsListStatus = (typeof HogFlowsListStatus)[keyof typeof HogFlowsListStatus]export const HogFlowsListStatus = {diff --git a/products/workflows/frontend/generated/api.ts b/products/workflows/frontend/generated/api.tsindex 43bf9f4dfa53..66199da0e9ef 100644--- a/products/workflows/frontend/generated/api.ts+++ b/products/workflows/frontend/generated/api.ts@@ -28,6 +28,7 @@ import type {HogFlowTemplateApi,HogFlowTemplatesListParams,HogFlowTemplatesLogsRetrieveParams,+ HogFlowUpdateApi,HogFlowsAssetContentRetrieveParams,HogFlowsAssetsRetrieveParams,HogFlowsInvocationResultsCountRetrieveParams,@@ -51,10 +52,10 @@ import type {PaginatedHogFlowRevisionBasicListApi,PaginatedHogFlowTemplateListApi,PatchedHogFlowActionEmailUpdateApi,- PatchedHogFlowApi,PatchedHogFlowGraphUpdateApi,PatchedHogFlowScheduleApi,PatchedHogFlowTemplateApi,+ PatchedHogFlowUpdateApi,TeamEmailReputationResponseApi,WorkflowStatsRowApi,} from './api.schemas'@@ -298,14 +299,14 @@ export const getHogFlowsUpdateUrl = (projectId: string, id: string) => {export const hogFlowsUpdate = async (projectId: string,id: string,- hogFlowApi: NonReadonly<HogFlowApi>,+ hogFlowUpdateApi: NonReadonly<HogFlowUpdateApi>,options?: RequestInit-): Promise<HogFlowApi> => {- return apiMutator<HogFlowApi>(getHogFlowsUpdateUrl(projectId, id), {+): Promise<HogFlowUpdateApi> => {+ return apiMutator<HogFlowUpdateApi>(getHogFlowsUpdateUrl(projectId, id), {...options,method: 'PUT',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(hogFlowApi),+ body: JSON.stringify(hogFlowUpdateApi),})}@@ -316,14 +317,14 @@ export const getHogFlowsPartialUpdateUrl = (projectId: string, id: string) => {export const hogFlowsPartialUpdate = async (projectId: string,id: string,- patchedHogFlowApi?: NonReadonly<PatchedHogFlowApi>,+ patchedHogFlowUpdateApi?: NonReadonly<PatchedHogFlowUpdateApi>,options?: RequestInit-): Promise<HogFlowApi> => {- return apiMutator<HogFlowApi>(getHogFlowsPartialUpdateUrl(projectId, id), {+): Promise<HogFlowUpdateApi> => {+ return apiMutator<HogFlowUpdateApi>(getHogFlowsPartialUpdateUrl(projectId, id), {...options,method: 'PATCH',headers: { 'Content-Type': 'application/json', ...options?.headers },- body: JSON.stringify(patchedHogFlowApi),+ body: JSON.stringify(patchedHogFlowUpdateApi),})}diff --git a/products/workflows/frontend/generated/api.zod.ts b/products/workflows/frontend/generated/api.zod.tsindex 53b352c6e28b..b5682994e814 100644--- a/products/workflows/frontend/generated/api.zod.ts+++ b/products/workflows/frontend/generated/api.zod.ts@@ -429,6 +429,12 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zod.describe('draft (no execution), active (live), archived (disabled).\n\n\* `draft` - Draft\n\* `active` - Active\n\* `archived` - Archived'),+ origin_product: zod+ .union([zod.enum(['loops']).describe('\* `loops` - Loops'), zod.null()])+ .optional()+ .describe(+ 'Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.\n\n\* `loops` - Loops'+ ),trigger_masking: zod.union([zod.object({@@ -1797,6 +1803,12 @@ export const HogFlowsInvocationsCreateBody = /* @__PURE__ */ zod.object({.describe('draft (no execution), active (live), archived (disabled).\n\n\* `draft` - Draft\n\* `active` - Active\n\* `archived` - Archived'),+ origin_product: zod+ .union([zod.enum(['loops']).describe('\* `loops` - Loops'), zod.null()])+ .optional()+ .describe(+ 'Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.\n\n\* `loops` - Loops'+ ),created_at: zod.iso.datetime({ offset: true }),created_by: zod.object({id: zod.number(),@@ -2529,6 +2541,12 @@ export const HogFlowsBulkDeleteCreateBody = /* @__PURE__ */ zod.describe('draft (no execution), active (live), archived (disabled).\n\n\* `draft` - Draft\n\* `active` - Active\n\* `archived` - Archived'),+ origin_product: zod+ .union([zod.enum(['loops']).describe('\* `loops` - Loops'), zod.null()])+ .optional()+ .describe(+ 'Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.\n\n\* `loops` - Loops'+ ),trigger_masking: zod.union([zod.object({diff --git a/services/mcp/src/api/generated.ts b/services/mcp/src/api/generated.tsindex 6c512674aa8b..4950c0322ea3 100644--- a/services/mcp/src/api/generated.ts+++ b/services/mcp/src/api/generated.ts@@ -41849,6 +41849,16 @@ export namespace Schemas {Archived: 'archived',} as const;+ /**+ * * `loops` - Loops+ */+ export type HogFlowOriginProductEnum = typeof HogFlowOriginProductEnum[keyof typeof HogFlowOriginProductEnum];+++ export const HogFlowOriginProductEnum = {+ Loops: 'loops',+ } as const;+export interface HogFlowMasking {/*** Seconds (60 to ~94M / 3y) to suppress repeat firings of the same hash.@@ -42149,6 +42159,10 @@ export namespace Schemas {* * `active` - Active* * `archived` - Archived */status?: HogFlowStateEnum;+ /** Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.+ *+ * * `loops` - Loops */+ origin_product?: HogFlowOriginProductEnum | null;readonly created_at: string;readonly created_by: UserBasic;readonly updated_at: string;@@ -42331,6 +42345,7 @@ export namespace Schemas {readonly description: string;readonly version: number;readonly status: HogFlowStateEnum;+ readonly origin_product: HogFlowOriginProductEnum | null;readonly created_at: string;readonly created_by: UserBasic;readonly updated_at: string;@@ -42563,6 +42578,88 @@ export namespace Schemas {variables?: HogFlowTemplateVariablesItem[];}+ /**+ * Variable: {key, type: string|number|boolean, default}.+ */+ export type HogFlowUpdateVariablesItem = {[key: string]: string};++ /**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+ export type HogFlowUpdateActionRedirects = {[key: string]: string} | null;++ /**+ * Mixin for serializers to add user access control fields+ */+ export interface HogFlowUpdate {+ readonly id: string;+ /**+ * Workflow name.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** Optional description. */+ description?: string;+ readonly version: number;+ /** draft (no execution), active (live), archived (disabled).+ *+ * * `draft` - Draft+ * * `active` - Active+ * * `archived` - Archived */+ status?: HogFlowStateEnum;+ /** Product surface that owns this workflow. This value cannot change after creation.+ *+ * * `loops` - Loops */+ readonly origin_product: HogFlowOriginProductEnum | null;+ readonly created_at: string;+ readonly created_by: UserBasic;+ readonly updated_at: string;+ readonly trigger: unknown;+ /** Optional dedup/throttle on an already-matched trigger: {hash: <HogQL template>, ttl: <seconds, 60-94608000>, threshold?: <int>}. Without threshold: fire once per hash, then suppress repeats within ttl (hash '{person.id}' = once per person per ttl). With threshold N: fire once per N matches of the same hash — a sampler, the 1st then every Nth. Throttles an already-qualifying trigger; it doesn't decide who enters. Server compiles bytecode from hash; omit to disable. */+ trigger_masking?: HogFlowMasking | null;+ /** Conversion goal. filters: ARRAY of property conditions [{key, value, operator, type: event|person|group}]; events: event-based goals [{filters: {events: [...]}}]; window_minutes: minutes after entry. Required for exit_on_conversion / exit_on_trigger_not_matched_or_conversion. bytecode compiled server-side. */+ conversion?: HogFlowConversion | null;+ /** exit_only_at_end: only at exit node (default). exit_on_conversion: also on conversion (needs 'conversion'; silent no-op otherwise). exit_on_trigger_not_matched: also when trigger filter stops matching. exit_on_trigger_not_matched_or_conversion: both (needs 'conversion').+ *+ * * `exit_on_conversion` - Conversion+ * * `exit_on_trigger_not_matched` - Trigger Not Matched+ * * `exit_on_trigger_not_matched_or_conversion` - Trigger Not Matched Or Conversion+ * * `exit_only_at_end` - Only At End */+ exit_condition?: ExitConditionEnum;+ /** Optional email pacing for deliverability: {count, period: 'minute' | 'hour'}. The email worker spreads this workflow's sends to stay under the limit; over-limit sends wait for capacity instead of failing. Null disables pacing. */+ email_sending_rate_limit?: HogFlowEmailSendingRateLimit | null;+ /** Graph edges: [{from, to, type: 'continue'|'branch', index?}]. 'continue' = fall-through (sequential, or no-match path of conditional_branch). 'branch' requires 'index': matches config.conditions[index] on conditional_branch / wait_until_condition. Every non-exit action needs a reachable next action ('No next action found' otherwise). */+ edges?: HogFlowEdge[];+ /** Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too. */+ actions: HogFlowAction[];+ /** @nullable */+ readonly abort_action: string | null;+ /** Workflow vars (key, type, default). Total <5KB. */+ variables?: HogFlowUpdateVariablesItem[];+ readonly billable_action_types: unknown;+ /** Recurring schedules attached to this workflow (read-only here; manage via the schedules sub-resource). A batch/schedule workflow only fires when it's active AND has an active schedule. Empty for non-scheduled workflows. */+ readonly schedules: readonly HogFlowSchedule[];+ /**+ * The effective access level the user has for this object+ * @nullable+ */+ readonly user_access_level: string | null;+ /** Staged content changes awaiting publish — a full snapshot of the workflow's actions, edges and settings. Null when there's nothing staged. Test it with a use_draft test run, then promote it with the publish endpoint or throw it away with discard_draft. */+ readonly draft: unknown;+ /**+ * When the draft was last written; null when there's no staged draft. Pass this to publish (and as base_updated_at on further draft edits) so a concurrent editor's changes aren't clobbered — a mismatch returns 409.+ * @nullable+ */+ readonly draft_updated_at: string | null;+ /**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+ readonly action_redirects: HogFlowUpdateActionRedirects;+ }+/*** * `hog` - hog* * `liquid` - liquid@@ -62823,84 +62920,6 @@ export namespace Schemas {readonly resolved_at?: string | null;}- /**- * Variable: {key, type: string|number|boolean, default}.- */- export type PatchedHogFlowVariablesItem = {[key: string]: string};-- /**- * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.- * @nullable- */- export type PatchedHogFlowActionRedirects = {[key: string]: string} | null;-- /**- * Mixin for serializers to add user access control fields- */- export interface PatchedHogFlow {- readonly id?: string;- /**- * Workflow name.- * @maxLength 400- * @nullable- */- name?: string | null;- /** Optional description. */- description?: string;- readonly version?: number;- /** draft (no execution), active (live), archived (disabled).- *- * * `draft` - Draft- * * `active` - Active- * * `archived` - Archived */- status?: HogFlowStateEnum;- readonly created_at?: string;- readonly created_by?: UserBasic;- readonly updated_at?: string;- readonly trigger?: unknown;- /** Optional dedup/throttle on an already-matched trigger: {hash: <HogQL template>, ttl: <seconds, 60-94608000>, threshold?: <int>}. Without threshold: fire once per hash, then suppress repeats within ttl (hash '{person.id}' = once per person per ttl). With threshold N: fire once per N matches of the same hash — a sampler, the 1st then every Nth. Throttles an already-qualifying trigger; it doesn't decide who enters. Server compiles bytecode from hash; omit to disable. */- trigger_masking?: HogFlowMasking | null;- /** Conversion goal. filters: ARRAY of property conditions [{key, value, operator, type: event|person|group}]; events: event-based goals [{filters: {events: [...]}}]; window_minutes: minutes after entry. Required for exit_on_conversion / exit_on_trigger_not_matched_or_conversion. bytecode compiled server-side. */- conversion?: HogFlowConversion | null;- /** exit_only_at_end: only at exit node (default). exit_on_conversion: also on conversion (needs 'conversion'; silent no-op otherwise). exit_on_trigger_not_matched: also when trigger filter stops matching. exit_on_trigger_not_matched_or_conversion: both (needs 'conversion').- *- * * `exit_on_conversion` - Conversion- * * `exit_on_trigger_not_matched` - Trigger Not Matched- * * `exit_on_trigger_not_matched_or_conversion` - Trigger Not Matched Or Conversion- * * `exit_only_at_end` - Only At End */- exit_condition?: ExitConditionEnum;- /** Optional email pacing for deliverability: {count, period: 'minute' | 'hour'}. The email worker spreads this workflow's sends to stay under the limit; over-limit sends wait for capacity instead of failing. Null disables pacing. */- email_sending_rate_limit?: HogFlowEmailSendingRateLimit | null;- /** Graph edges: [{from, to, type: 'continue'|'branch', index?}]. 'continue' = fall-through (sequential, or no-match path of conditional_branch). 'branch' requires 'index': matches config.conditions[index] on conditional_branch / wait_until_condition. Every non-exit action needs a reachable next action ('No next action found' otherwise). */- edges?: HogFlowEdge[];- /** Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too. */- actions?: HogFlowAction[];- /** @nullable */- readonly abort_action?: string | null;- /** Workflow vars (key, type, default). Total <5KB. */- variables?: PatchedHogFlowVariablesItem[];- readonly billable_action_types?: unknown;- /** Recurring schedules attached to this workflow (read-only here; manage via the schedules sub-resource). A batch/schedule workflow only fires when it's active AND has an active schedule. Empty for non-scheduled workflows. */- readonly schedules?: readonly HogFlowSchedule[];- /**- * The effective access level the user has for this object- * @nullable- */- readonly user_access_level?: string | null;- /** Staged content changes awaiting publish — a full snapshot of the workflow's actions, edges and settings. Null when there's nothing staged. Test it with a use_draft test run, then promote it with the publish endpoint or throw it away with discard_draft. */- readonly draft?: unknown;- /**- * When the draft was last written; null when there's no staged draft. Pass this to publish (and as base_updated_at on further draft edits) so a concurrent editor's changes aren't clobbered — a mismatch returns 409.- * @nullable- */- readonly draft_updated_at?: string | null;- /**- * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.- * @nullable- */- readonly action_redirects?: PatchedHogFlowActionRedirects;- }-export interface PatchedHogFlowActionEmailUpdate {/** Optimistic concurrency: the updated_at (or draft_updated_at) last loaded. If the stored workflow is newer, the patch is rejected with 409 instead of clobbering a concurrent edit. */base_updated_at?: string;@@ -62989,6 +63008,88 @@ export namespace Schemas {variables?: PatchedHogFlowTemplateVariablesItem[];}+ /**+ * Variable: {key, type: string|number|boolean, default}.+ */+ export type PatchedHogFlowUpdateVariablesItem = {[key: string]: string};++ /**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+ export type PatchedHogFlowUpdateActionRedirects = {[key: string]: string} | null;++ /**+ * Mixin for serializers to add user access control fields+ */+ export interface PatchedHogFlowUpdate {+ readonly id?: string;+ /**+ * Workflow name.+ * @maxLength 400+ * @nullable+ */+ name?: string | null;+ /** Optional description. */+ description?: string;+ readonly version?: number;+ /** draft (no execution), active (live), archived (disabled).+ *+ * * `draft` - Draft+ * * `active` - Active+ * * `archived` - Archived */+ status?: HogFlowStateEnum;+ /** Product surface that owns this workflow. This value cannot change after creation.+ *+ * * `loops` - Loops */+ readonly origin_product?: HogFlowOriginProductEnum | null;+ readonly created_at?: string;+ readonly created_by?: UserBasic;+ readonly updated_at?: string;+ readonly trigger?: unknown;+ /** Optional dedup/throttle on an already-matched trigger: {hash: <HogQL template>, ttl: <seconds, 60-94608000>, threshold?: <int>}. Without threshold: fire once per hash, then suppress repeats within ttl (hash '{person.id}' = once per person per ttl). With threshold N: fire once per N matches of the same hash — a sampler, the 1st then every Nth. Throttles an already-qualifying trigger; it doesn't decide who enters. Server compiles bytecode from hash; omit to disable. */+ trigger_masking?: HogFlowMasking | null;+ /** Conversion goal. filters: ARRAY of property conditions [{key, value, operator, type: event|person|group}]; events: event-based goals [{filters: {events: [...]}}]; window_minutes: minutes after entry. Required for exit_on_conversion / exit_on_trigger_not_matched_or_conversion. bytecode compiled server-side. */+ conversion?: HogFlowConversion | null;+ /** exit_only_at_end: only at exit node (default). exit_on_conversion: also on conversion (needs 'conversion'; silent no-op otherwise). exit_on_trigger_not_matched: also when trigger filter stops matching. exit_on_trigger_not_matched_or_conversion: both (needs 'conversion').+ *+ * * `exit_on_conversion` - Conversion+ * * `exit_on_trigger_not_matched` - Trigger Not Matched+ * * `exit_on_trigger_not_matched_or_conversion` - Trigger Not Matched Or Conversion+ * * `exit_only_at_end` - Only At End */+ exit_condition?: ExitConditionEnum;+ /** Optional email pacing for deliverability: {count, period: 'minute' | 'hour'}. The email worker spreads this workflow's sends to stay under the limit; over-limit sends wait for capacity instead of failing. Null disables pacing. */+ email_sending_rate_limit?: HogFlowEmailSendingRateLimit | null;+ /** Graph edges: [{from, to, type: 'continue'|'branch', index?}]. 'continue' = fall-through (sequential, or no-match path of conditional_branch). 'branch' requires 'index': matches config.conditions[index] on conditional_branch / wait_until_condition. Every non-exit action needs a reachable next action ('No next action found' otherwise). */+ edges?: HogFlowEdge[];+ /** Ordered action nodes. Exactly one type='trigger' required. Typically one type='exit' too. */+ actions?: HogFlowAction[];+ /** @nullable */+ readonly abort_action?: string | null;+ /** Workflow vars (key, type, default). Total <5KB. */+ variables?: PatchedHogFlowUpdateVariablesItem[];+ readonly billable_action_types?: unknown;+ /** Recurring schedules attached to this workflow (read-only here; manage via the schedules sub-resource). A batch/schedule workflow only fires when it's active AND has an active schedule. Empty for non-scheduled workflows. */+ readonly schedules?: readonly HogFlowSchedule[];+ /**+ * The effective access level the user has for this object+ * @nullable+ */+ readonly user_access_level?: string | null;+ /** Staged content changes awaiting publish — a full snapshot of the workflow's actions, edges and settings. Null when there's nothing staged. Test it with a use_draft test run, then promote it with the publish endpoint or throw it away with discard_draft. */+ readonly draft?: unknown;+ /**+ * When the draft was last written; null when there's no staged draft. Pass this to publish (and as base_updated_at on further draft edits) so a concurrent editor's changes aren't clobbered — a mismatch returns 409.+ * @nullable+ */+ readonly draft_updated_at?: string | null;+ /**+ * Skip-forward map for deleted steps: {deleted_action_id: next surviving action_id}. Maintained automatically when a live graph edit deletes actions, so in-flight runs parked on a deleted step continue at its surviving successor instead of exiting. Null when no live deletions have occurred.+ * @nullable+ */+ readonly action_redirects?: PatchedHogFlowUpdateActionRedirects;+ }+/*** Values for each input defined in inputs_schema.*/@@ -94816,6 +94917,10 @@ export namespace Schemas {* The initial index from which to return the results.*/offset?: number;+ /**+ * Filter to workflows owned by a product surface, e.g. `loops` for Desktop loops.+ */+ origin_product?: HogFlowsListOriginProduct;/*** Case-insensitive search across workflow name and description.*/@@ -94837,6 +94942,13 @@ export namespace Schemas {updated_at?: string;};+ export type HogFlowsListOriginProduct = typeof HogFlowsListOriginProduct[keyof typeof HogFlowsListOriginProduct];+++ export const HogFlowsListOriginProduct = {+ Loops: 'loops',+ } as const;+export type HogFlowsListStatus = typeof HogFlowsListStatus[keyof typeof HogFlowsListStatus];diff --git a/services/mcp/src/generated/workflows/api.ts b/services/mcp/src/generated/workflows/api.tsindex 98899d45035f..5564bebba47f 100644--- a/services/mcp/src/generated/workflows/api.ts+++ b/services/mcp/src/generated/workflows/api.ts@@ -22,6 +22,10 @@ export const HogFlowsListQueryParams = /* @__PURE__ */ zod.object({id: zod.string().optional(),limit: zod.number().optional().describe('Number of results to return per page.'),offset: zod.number().optional().describe('The initial index from which to return the results.'),+ origin_product: zod+ .enum(['loops'])+ .optional()+ .describe('Filter to workflows owned by a product surface, e.g. `loops` for Desktop loops.'),search: zod.string().optional().describe('Case-insensitive search across workflow name and description.'),status: zod.enum(['active', 'archived', 'draft'])@@ -79,6 +83,12 @@ export const HogFlowsCreateBody = /* @__PURE__ */ zod.describe('draft (no execution), active (live), archived (disabled).\n\n\* `draft` - Draft\n\* `active` - Active\n\* `archived` - Archived'),+ origin_product: zod+ .union([zod.enum(['loops']).describe('\* `loops` - Loops'), zod.null()])+ .optional()+ .describe(+ 'Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.\n\n\* `loops` - Loops'+ ),trigger_masking: zod.union([zod.object({diff --git a/services/mcp/src/tools/generated/workflows.ts b/services/mcp/src/tools/generated/workflows.tsindex afe6d268c35c..a4fe3f7a97e5 100644--- a/services/mcp/src/tools/generated/workflows.ts+++ b/services/mcp/src/tools/generated/workflows.ts@@ -53,6 +53,9 @@ const workflowsCreate = (): ToolBase<typeof WorkflowsCreateSchema, WithPostHogUrif (params.status !== undefined) {body['status'] = params.status}+ if (params.origin_product !== undefined) {+ body['origin_product'] = params.origin_product+ }if (params.trigger_masking !== undefined) {body['trigger_masking'] = params.trigger_masking}@@ -187,6 +190,7 @@ const workflowsList = (): ToolBase<typeof WorkflowsListSchema, WithPostHogUrl<Scid: params.id,limit: params.limit,offset: params.offset,+ origin_product: params.origin_product,search: params.search,status: params.status,trigger: params.trigger,@@ -440,7 +444,7 @@ const WorkflowsUpdateSchema = HogFlowsPartialUpdateParams.omit({ project_id: truHogFlowsPartialUpdateBody.shape)-const workflowsUpdate = (): ToolBase<typeof WorkflowsUpdateSchema, WithPostHogUrl<Schemas.HogFlow>> =>+const workflowsUpdate = (): ToolBase<typeof WorkflowsUpdateSchema, WithPostHogUrl<Schemas.HogFlowUpdate>> =>withUiApp('workflow', {name: 'workflows-update',schema: WorkflowsUpdateSchema,@@ -468,7 +472,7 @@ const workflowsUpdate = (): ToolBase<typeof WorkflowsUpdateSchema, WithPostHogUrif (params.variables !== undefined) {body['variables'] = params.variables}- const result = await context.api.request<Schemas.HogFlow>({+ const result = await context.api.request<Schemas.HogFlowUpdate>({method: 'PATCH',path: `/api/projects/${encodeURIComponent(String(projectId))}/hog_flows/${encodeURIComponent(String(params.id))}/`,body,diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.jsonindex fa76708c5e1b..b340b9ba5bc1 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-create.json@@ -527,6 +527,19 @@],"description": "Workflow name."},+ "origin_product": {+ "anyOf": [+ {+ "description": "* `loops` - Loops",+ "enum": ["loops"],+ "type": "string"+ },+ {+ "type": "null"+ }+ ],+ "description": "Product surface that owns this workflow (e.g. `loops` for Desktop loops). Set only when creating a workflow. Filter the list with `?origin_product=`.\n\n* `loops` - Loops"+ },"status": {"description": "draft (no execution), active (live), archived (disabled).\n\n* `draft` - Draft\n* `active` - Active\n* `archived` - Archived","enum": ["draft", "active", "archived"],diff --git a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-list.json b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-list.jsonindex f88661461b68..07772d30c90b 100644--- a/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-list.json+++ b/services/mcp/tests/unit/__snapshots__/tool-schemas/workflows-list.json@@ -21,6 +21,11 @@"description": "The initial index from which to return the results.","type": "number"},+ "origin_product": {+ "description": "Filter to workflows owned by a product surface, e.g. `loops` for Desktop loops.",+ "enum": ["loops"],+ "type": "string"+ },"search": {"description": "Case-insensitive search across workflow name and description.","type": "string"