: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
fix(workflows): accept uuidt ids on push step message category (#128021)
Chris Shine9fa3de37bf1e
diff --git a/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts b/products/workflows/frontend/Workflows/hogflows/steps/types.test.tsindex 757363a39e5e..4abe864cbb18 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/types.test.ts@@ -37,6 +37,21 @@ describe('HogFlowActionSchema', () => {config: { template_id: 'template-webhook', inputs: {} },},],+ [+ 'function_push with a UUIDT message category',+ {+ id: 'action_function_push_abc123',+ name: 'Send push',+ type: 'function_push',+ description: '',+ config: {+ template_id: 'template-native-push',+ message_category_id: '0192a1b2-c3d4-0000-8e5f-0a1b2c3d4e5f',+ template_uuid: '0192a1b2-c3d4-0000-8e5f-0a1b2c3d4e60',+ inputs: {},+ },+ },+ ],])('validates %s action without created_at/updated_at', (_label, action) => {const result = HogFlowActionSchema.safeParse(action)expect(result.success).toBe(true)diff --git a/products/workflows/frontend/Workflows/hogflows/steps/types.ts b/products/workflows/frontend/Workflows/hogflows/steps/types.tsindex 0c18099fafc1..def455e817bd 100644--- a/products/workflows/frontend/Workflows/hogflows/steps/types.ts+++ b/products/workflows/frontend/Workflows/hogflows/steps/types.ts@@ -414,9 +414,9 @@ export const HogFlowActionSchema = z.discriminatedUnion('type', [..._commonActionFields,type: z.literal('function_push'),config: z.object({- message_category_id: z.string().uuid().optional(),+ message_category_id: z.string().optional(),message_category_type: z.enum(['marketing', 'transactional']).optional(),- template_uuid: z.string().uuid().optional(),+ template_uuid: z.string().optional(),template_id: z.literal('template-native-push'),// When true, PostHog keeps no copy of the notification's content. Keep in sync with nodejs/src/cdp/schema/hogflow.ts.sensitive: z.boolean().optional(),