Default payload just for ii

Is it possible for a custom workflow to have a default payload just for the ui? It would be convenient when previewing channel actions. I don’t want to put a default value in the schema for all fields: the one triggering the workflow should receive an error is he doesn’t compile mandatory fields
5 Replies
Pawan Jain
Pawan Jain3mo ago
@Matteo Grolla
a custom workflow
Are you creating workflow from UI or using @novu/framework
Matteo Grolla
Matteo GrollaOP3mo ago
Using novu framework
Pawan Jain
Pawan Jain2mo ago
@Matteo Grolla We have option for default values in schema, Would you like to share the issue with using default values? @Matteo Grolla ping
Matteo Grolla
Matteo GrollaOP2mo ago
When a business user wants to configure the email template of a workflow we would like toto give him a default payload to preview. But this doesn’t mean that there are no mandatory fields (without default values) when real payloads are sent to the workflow. Zod Schemas are to validate real payloads (and may have default values or not). The default payload for the template preview is another thing
Pawan Jain
Pawan Jain2mo ago
Matteo

Thanks for sharing the use case.

Unfortuently we don't have something like this available today, but we have passed the feedback to the team.

Did you find this page helpful?