private function getNodeTypeAndPattern($pattern)
    {
        $node_type = 'text';

        // If user set payload, default, welcome message.
        foreach (['payload', 'default', 'attachment'] as $type) {
            if (strpos($pattern, $type . ':') !== false) {
                $node_type = $type;
                $pattern = str_replace($node_type . ':', '', $pattern);
            }
        }

        if (!empty($pattern) && $pattern[0] == '@') {
            $node_type = 'intended';
            $pattern = str_replace('@', '', $pattern);
        }

        return [$node_type, $pattern];
    }