def returner(ret):
    '''
    Send a slack message with the data through a webhook
    :param ret: The Salt return
    :return: The result of the post
    '''

    _options = _get_options(ret)

    webhook = _options.get('webhook', None)
    show_tasks = _options.get('show_tasks')
    author_icon = _options.get('author_icon')

    if not webhook or webhook is '':
        log.error('%s.webhook not defined in salt config', __virtualname__)
        return

    report = _generate_report(ret, show_tasks)

    if report.get('success'):
        title = _options.get('success_title')
    else:
        title = _options.get('failure_title')

    slack = _post_message(webhook, author_icon, title, report)

    return slack