Human:
give me a Netflix conductor workflow json to get user details and based the preference send email to sms
ChatGPT:
{
"name": "userCommunicationWorkflow",
"description": "Workflow to fetch user details and send communication based on preference",
"version": 1,
"tasks": [
{
"name": "getUserDetails",
"taskReferenceName": "getUserDetailsRef",
"inputParameters": {
"userId": "${workflow.input.userId}"
},
"type": "HTTP",
"http_request": {
"uri": "http://example.com/api/users/${workflow.input.userId}",
"method": "GET"
}
},
{
"name": "decisionTask",
"taskReferenceName": "decisionTaskRef",
"inputParameters": {
"userPreference": "${getUserDetailsRef.output.preference}"
},
"type": "DECISION",
"decisionCases": {
"EMAIL": [
{
"name": "sendEmail",
"taskReferenceName": "sendEmailRef",
"inputParameters": {
"emailAddress": "${getUserDetailsRef.output.email}",
"message": "Your personalized message here"
},
"type": "HTTP",
"http_request": {
"uri": "http://emailservice.com/send",
"method": "POST",
"body": {
"to": "${workflow.input.emailAddress}",
"subject": "Message Subject",
"body": "${workflow.input.message}"
}
}
}
],
"SMS": [
{
"name": "sendSMS",
"taskReferenceName": "sendSMSRef",
"inputParameters": {
"phoneNumber": "${getUserDetailsRef.output.phone}",
"message": "Your personalized message here"
},
"type": "HTTP",
"http_request": {
"uri": "http://smsservice.com/send",
"method": "POST",
"body": {
"to": "${workflow.input.phoneNumber}",
"message": "${workflow.input.message}"
}
}
}
]
},
"defaultCase": []
}
],
"outputParameters": {
"result": "${decisionTaskRef.output.result}"
},
"schemaVersion": 2
}
give me a Netflix conductor workflow json to get user details and based the preference send email to sms
ChatGPT: { "name": "userCommunicationWorkflow", "description": "Workflow to fetch user details and send communication based on preference", "version": 1, "tasks": [ { "name": "getUserDetails", "taskReferenceName": "getUserDetailsRef", "inputParameters": { "userId": "${workflow.input.userId}" }, "type": "HTTP", "http_request": { "uri": "http://example.com/api/users/${workflow.input.userId}", "method": "GET" } }, { "name": "decisionTask", "taskReferenceName": "decisionTaskRef", "inputParameters": { "userPreference": "${getUserDetailsRef.output.preference}" }, "type": "DECISION", "decisionCases": { "EMAIL": [ { "name": "sendEmail", "taskReferenceName": "sendEmailRef", "inputParameters": { "emailAddress": "${getUserDetailsRef.output.email}", "message": "Your personalized message here" }, "type": "HTTP", "http_request": { "uri": "http://emailservice.com/send", "method": "POST", "body": { "to": "${workflow.input.emailAddress}", "subject": "Message Subject", "body": "${workflow.input.message}" } } } ], "SMS": [ { "name": "sendSMS", "taskReferenceName": "sendSMSRef", "inputParameters": { "phoneNumber": "${getUserDetailsRef.output.phone}", "message": "Your personalized message here" }, "type": "HTTP", "http_request": { "uri": "http://smsservice.com/send", "method": "POST", "body": { "to": "${workflow.input.phoneNumber}", "message": "${workflow.input.message}" } } } ] }, "defaultCase": [] } ], "outputParameters": { "result": "${decisionTaskRef.output.result}" }, "schemaVersion": 2 }