Cannot use a workflow if its name has underscores
I've created a workflow through API with following params:
$data = [
'name' => 'new_seller_admin_notify_four',
'notificationGroupId' => '6409c0dbe5d10c2178942e3f',
'preferenceSettings' => [
'email' => true,
'sms' => true,
'in_app' => true,
'chat' => true,
'push' => true,
],
'steps' => [
[
'template' => [
"title" => "new_seller_admin_notify",
"content" => [
[
"type" => "text",
"content" => "Hello adminss!<div>New seller has been registered!</div><div>Name: {{name}}</div><div>Email: {{sellerEmail}}</div>",
"styles" => [
"textAlign" => "left"
]
]
],
"type" => "email",
"subject" => "New Seller",
"contentType" => "editor",
"senderName" => "Chester field",
"variables" => [
[
"name" => "name",
"type" => "String"
],
[
"name" => "sellerEmail",
"type" => "String"
]
]
],
],
]
]
When I trigger event using this workflow, I'm getting an error:
[2024-02-26 07:25:17] local.ERROR: [NovuService]:sendNotificationToTopics ["The given data failed to pass validation."]
If I replace underscores with dashes, an event is triggered successfully.
new_seller_admin_notify_four
change to
new-seller-admin-notify-four
$data = [
'name' => 'new_seller_admin_notify_four',
'notificationGroupId' => '6409c0dbe5d10c2178942e3f',
'preferenceSettings' => [
'email' => true,
'sms' => true,
'in_app' => true,
'chat' => true,
'push' => true,
],
'steps' => [
[
'template' => [
"title" => "new_seller_admin_notify",
"content" => [
[
"type" => "text",
"content" => "Hello adminss!<div>New seller has been registered!</div><div>Name: {{name}}</div><div>Email: {{sellerEmail}}</div>",
"styles" => [
"textAlign" => "left"
]
]
],
"type" => "email",
"subject" => "New Seller",
"contentType" => "editor",
"senderName" => "Chester field",
"variables" => [
[
"name" => "name",
"type" => "String"
],
[
"name" => "sellerEmail",
"type" => "String"
]
]
],
],
]
]
When I trigger event using this workflow, I'm getting an error:
[2024-02-26 07:25:17] local.ERROR: [NovuService]:sendNotificationToTopics ["The given data failed to pass validation."]
If I replace underscores with dashes, an event is triggered successfully.
new_seller_admin_notify_four
change to
new-seller-admin-notify-four