Skip to content

Unable to get the slack trigger working #1443

Open
@KannamSridharKumar

Description

@KannamSridharKumar

Using the Composio console, I've integrated both slack and slackbot and I'm able to send messages to slack channels.

I've enabled the triggers "New Message Received" and "Thread Reply Received" for both sack and slackbot using the Composio console.

I've added the Composio-Slack app to one of the slack channels.

I ran the below code to test the trigger and sent messages to the slack channel directly, also tagged the messages with @composio

I don't see any events being received on my terminal. The Trigger Logs are empty on Composio console.

Did I miss any steps? My understanding is we don't need to configure anything on Slack app, expect adding the Composio app to a channel we want to monitor.

Is there a way to test the triggers using Composio Console?

Code:

from composio_openai import ComposioToolSet
from composio.client.collections import TriggerEventData

toolset = ComposioToolSet()
listener = toolset.create_trigger_listener()

@listener.callback(filters={"trigger_name": "SLACKBOT_RECEIVE_MESSAGE"})
def callback_new_message(event: TriggerEventData) -> None:
print("Recieved new messsage")
payload = event.payload
print(payload)

print("Listening ....")
listener.wait_forever()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions