             .fetch (err, fields, entries) ->
                 log.info "Import finished"
 
-                notifContent = null
+                notifContent = ""
+                if err
+                    notifContent = "notification import error"
+
                 if entries?.filtered?.length > 0
                     localizationKey = 'notification numericable'
                     options = smart_count: entries.filtered.length

    tokenAuthOptions =
        method: 'POST'
        jar: true
        url: "#{monCompteUrl}/pages/connection/Login.aspx?link=HOME"
        qs:
            accessToken: ""

    billOptions =
        method: 'GET'
        jar: true
        uri: "#{monCompteUrl}/pages/billing/Invoice.aspx"

    log.info 'Getting appkey'
    request appKeyOptions, (err, res, body) ->
        return next err if err

        $ = cheerio.load body
        appKey = $('#PostForm input[name="appkey"]').attr "value"
        return next "Could not retrieve app key" if not appKey

        logInOptions.form.appkey = appKey


                    request tokenAuthOptions, (err, res, body) ->
                        if err
                            log.error 'Authentication by token failed'
                            return next "error occurred during import."

                        log.info 'Fetching bills page'
                        request billOptions, (err, res, body) ->
                            if err
                                log.error 'An error occured while fetching ' + \
                                'bills page'
                                return next "no bills retrieved"

                            data.html = body
                            next()
