I'm trying to add a new variant to the email step but getting this error message:
Here is the code to update:
workflow = {
"name": template_name,
"notificationGroupId": NOVU_NOTIFICATION_GROUP_ID,
"active": True,
"steps": [
{
"active": True,
"shouldStopOnFail": False,
"name": "Email",
"type": "REGULAR",
"variants": {
"active": True,
"name": language_code,
"filters": [
{
"type": "TEXT",
"value": "AND",
"children": [
{
"field": "language",
"operator": "EQUAL",
"value": language_code,
"on": "payload",
}
],
},
],
"template": {
"type": "email",
"subject": subject,
"preheader": display_header,
"content": html,
"contentType": "customHtml",
"layoutId": layout_id,
},
},
"template": {
"type": "email",
# "active": True,
# "subject": subject,
# "senderName": SENDER_NAME,
# "preheader": display_header,
# "content": html,
# "contentType": "customHtml",
# "layoutId": layout_id,
# "deleted": False,
},
}
],
}
response = requests.put(
url=f"{NOVU_WORKFLOW_URL}/{workflow_id}",
json=workflow,
headers=headers,
)
workflow = {
"name": template_name,
"notificationGroupId": NOVU_NOTIFICATION_GROUP_ID,
"active": True,
"steps": [
{
"active": True,
"shouldStopOnFail": False,
"name": "Email",
"type": "REGULAR",
"variants": {
"active": True,
"name": language_code,
"filters": [
{
"type": "TEXT",
"value": "AND",
"children": [
{
"field": "language",
"operator": "EQUAL",
"value": language_code,
"on": "payload",
}
],
},
],
"template": {
"type": "email",
"subject": subject,
"preheader": display_header,
"content": html,
"contentType": "customHtml",
"layoutId": layout_id,
},
},
"template": {
"type": "email",
# "active": True,
# "subject": subject,
# "senderName": SENDER_NAME,
# "preheader": display_header,
# "content": html,
# "contentType": "customHtml",
# "layoutId": layout_id,
# "deleted": False,
},
}
],
}
response = requests.put(
url=f"{NOVU_WORKFLOW_URL}/{workflow_id}",
json=workflow,
headers=headers,
)