Cannot update variant to email step
I'm trying to add a new variant to the email step but getting this error message:
Here is the code to update:
{'statusCode': 500, 'timestamp': '2025-05-08T10:54:30.175Z', 'path': '/v1/workflows/681c472468a---------', 'message': 'Internal server error, contact support and provide them with the errorId', 'errorId': 'b372269a-3893-456a-8b14-542c4ef38437'}{'statusCode': 500, 'timestamp': '2025-05-08T10:54:30.175Z', 'path': '/v1/workflows/681c472468a---------', 'message': 'Internal server error, contact support and provide them with the errorId', 'errorId': 'b372269a-3893-456a-8b14-542c4ef38437'}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,
)