Workflows

Create a workflow

Creates a new workflow in the Notifly environment

post/v2/workflows

Request

  • Base URL: https://api.notifly.io
  • URL: https://api.notifly.io/v2/workflows
  • Auth: API key in header Authorization

Request body

namestring required

Name of the workflow

descriptionstring

Description of the workflow

tagsstring[]

Tags associated with the workflow

activeboolean

Whether the workflow is active

validatePayloadboolean

Enable or disable payload schema validation

payloadSchemaobject nullable

The payload JSON Schema for the workflow

isTranslationEnabledboolean

Enable or disable translations for this workflow

workflowIdstring required

Unique identifier for the workflow

__source'template_store' | 'editor' | 'notification_directory' | 'onboarding_digest_demo' | 'onboarding_in_app' | 'empty_state' | 'dropdown' | 'onboarding_get_started' | 'bridge' | 'dashboard' | 'ai'

Source of workflow creation

severity'high' | 'medium' | 'low' | 'none'

Severity of the workflow

Example request

{
  "steps": [
    {
      "controlValues": {
        "skip": {
          "and": [
            {
              "==": [
                {
                  "var": "payload.tier"
                },
                "pro"
              ]
            },
            {
              "==": [
                {
                  "var": "subscriber.data.role"
                },
                "admin"
              ]
            },
            {
              ">": [
                {
                  "var": "payload.amount"
                },
                "4"
              ]
            }
          ]
        }
      }
    }
  ],
  "preferences": {
    "user": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    },
    "workflow": {
      "channels": {
        "email": {
          "enabled": true
        },
        "sms": {
          "enabled": false
        }
      }
    }
  }
}

Response

Created

Example response

{
  "data": {
    "steps": [
      {
        "controls": {
          "values": {
            "skip": {
              "and": [
                {
                  "==": [
                    {
                      "var": "payload.tier"
                    },
                    "pro"
                  ]
                },
                {
                  "==": [
                    {
                      "var": "subscriber.data.role"
                    },
                    "admin"
                  ]
                },
                {
                  ">": [
                    {
                      "var": "payload.amount"
                    },
                    "4"
                  ]
                }
              ]
            }
          }
        },
        "controlValues": {
          "skip": {
            "and": [
              {
                "==": [
                  {
                    "var": "payload.tier"
                  },
                  "pro"
                ]
              },
              {
                "==": [
                  {
                    "var": "subscriber.data.role"
                  },
                  "admin"
                ]
              },
              {
                ">": [
                  {
                    "var": "payload.amount"
                  },
                  "4"
                ]
              }
            ]
          }
        },
        "providerOverrides": {
          "slack": {
            "text": "{{payload.title}}",
            "blocks": [
              {
                "type": "divider"
              }
            ]
          },
          "whatsapp-business": {
            "type": "text",
            "text": {
              "body": "{{payload.title}}"
            }
          },
          "pagerduty": {
            "severity": "warning",
            "source": "novu",
            "summary": "{{payload.title}}"
          }
        }
      }
    ],
    "preferences": {
      "user": {
        "channels": {
          "email": {
            "enabled": true
          },
          "sms": {
            "enabled": false
          }
        }
      },
      "default": {
        "channels": {
          "email": {
            "enabled": true
          },
          "sms": {
            "enabled": false
          }
        }
      }
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.