Guna Vardhan
NNovu
•Created by Guna Vardhan on 7/24/2024 in #💬│support
Type cannot be null or undefined
headers = {
'Authorization': f'ApiKey {api_key}',
'Content-Type': 'application/json'
}
payload = {
"notificationGroupId": "507f1f77bcf86cd799439014",
"name":"email-workflow",
"steps": [
{
"type": "custom",
"template": {
"subject": "Welcome!",
"body": "Thank you for signing up."
},
"recipient": "[email protected]",
"filters": [
{
"property": "user.role",
"operator": "equals",
"value": "new_user"
}
],
"variant": {
"variantName": "New User Welcome Email",
"variantId": "507f1f77bcf86cd799439011"
}
},
],
} response = requests.post('https://api.novu.co/v1/workflows', headers=headers, json=payload) Im new to novu workflows, i'm trying to create a workflow using the above code,and im getting this error when i run this code Error: Failed to create workflow: 400 {'message': ['type should not be null or undefined', 'type must be one of the following values: in_app, email, sms, chat, push, digest, trigger, delay, custom'], 'error': 'Bad Request', 'statusCode': 400}
],
} response = requests.post('https://api.novu.co/v1/workflows', headers=headers, json=payload) Im new to novu workflows, i'm trying to create a workflow using the above code,and im getting this error when i run this code Error: Failed to create workflow: 400 {'message': ['type should not be null or undefined', 'type must be one of the following values: in_app, email, sms, chat, push, digest, trigger, delay, custom'], 'error': 'Bad Request', 'statusCode': 400}
29 replies