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
4 Replies
Pawan Jain
Pawan Jain2w ago
@Matteo Grolla
a custom workflow
Are you creating workflow from UI or using @novu/framework
Matteo Grolla
Matteo GrollaOP2w ago
Using novu framework
Pawan Jain
Pawan Jain4d 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 GrollaOP4d 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

Did you find this page helpful?