def METHOD_NAME(e):
    cnt_attr = len(e.get('Attribute') or '')
    cnt_obj = len(e.get('Object') or '')
    cnt_tags = len(e.get('Tag') or '')
    url = misp_url + '/events/view/' + e['id']
    zmq_message_short = f"New MISP event '{e['info']}' with {cnt_attr} attributes, {cnt_obj} objects and {cnt_tags} tags."
    image_url = 'https://raw.githubusercontent.com/MISP/MISP/2.4/docs/img/misp.png'
    if misp_is_public:
        image_url = f"{misp_url}/img/orgs/{e['Orgc']['name']}.png"
    zmq_message_blocks = [
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": f"*A new MISP <{url}|event> has been published:*\n"
                        f"Title: {e['info']}\n"
                        f"Date: {e['date']}\n"
                        f"Threat Level: {e['threat_level_id']}\n"
                        f"Contains {cnt_attr} attributes, {cnt_obj} objects and {cnt_tags} tags\n"
                        f"Full event: <{url}|{url}>"
            },
            "accessory": {
                "type": "image",
                "image_url": image_url,
                "alt_text": "MISP or org logo"
            }
        }
    ]
    if 'Tag' in e:
        tag_block = {
            "type": "actions",
            "elements": [
            ]
        }
        tags = set([t['name'] for t in e['Tag']])
        for a in e['Attribute']:
            if 'Tag' in a:
                for t in a['Tag']:
                    tags.add(t['name'])
        for o in e['Object']:
            for a in o['Attribute']:
                if 'Tag' in a:
                    for t in a['Tag']:
                        tags.add(t['name'])
        tags = sorted(tags)
        for t in tags:
            t = t.replace('misp-galaxy:', '').replace('mitre-', '')
            tag_block['elements'].append({
                "type": "button",
                "text": {
                    "type": "plain_text",
                    "text": t
                },
                "value": "#"
            })
        zmq_message_blocks.append(tag_block)
    # List attributes
    if include_attr:
        zmq_message_blocks.append({"type": "divider"})
        attrs_text = gen_attrs_text(e['Attribute'])
        if attrs_text:
            zmq_message_blocks.append(
                {
                    "type": "section",
                    "text": {
                        "type": "mrkdwn",
                        "text": f"*Attributes:*\n{attrs_text}"
                    }
                }
            )
    # List Objects
    if include_obj:
        zmq_message_blocks.append({"type": "divider"})
        for o in e['Object']:
            attrs_text = gen_attrs_text(o['Attribute'])
            if attrs_text:
                # print(json.dumps(o, indent=2))
                zmq_message_blocks.append(
                    {
                        "type": "section",
                        "text": {
                            "type": "mrkdwn",
                            "text": f"*{o['name'].capitalize()} object:*\n{attrs_text}"
                        }
                    }
                )
    # Send the message
    client = slack.WebClient(token=slack_token)
    client.users_setPresence(presence='auto')
    channel = client.channels_join(name=channel_name)
    client.chat_postMessage(
        channel=channel['channel']['id'],
        text=zmq_message_short,
        blocks=zmq_message_blocks
    )