mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-25 08:08:14 +00:00
feat: update docs with new approach to consume Platform Actions (#3675)
This commit is contained in:
@@ -22,21 +22,21 @@ Before using the Slack integration, ensure you have:
|
||||
### **User Management**
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="SLACK_LIST_MEMBERS">
|
||||
<Accordion title="slack/list_members">
|
||||
**Description:** List all members in a Slack channel.
|
||||
|
||||
**Parameters:**
|
||||
- No parameters required - retrieves all channel members
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="SLACK_GET_USER_BY_EMAIL">
|
||||
<Accordion title="slack/get_user_by_email">
|
||||
**Description:** Find a user in your Slack workspace by their email address.
|
||||
|
||||
**Parameters:**
|
||||
- `email` (string, required): The email address of a user in the workspace
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="SLACK_GET_USERS_BY_NAME">
|
||||
<Accordion title="slack/get_users_by_name">
|
||||
**Description:** Search for users by their name or display name.
|
||||
|
||||
**Parameters:**
|
||||
@@ -50,7 +50,7 @@ Before using the Slack integration, ensure you have:
|
||||
### **Channel Management**
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="SLACK_LIST_CHANNELS">
|
||||
<Accordion title="slack/list_channels">
|
||||
**Description:** List all channels in your Slack workspace.
|
||||
|
||||
**Parameters:**
|
||||
@@ -61,7 +61,7 @@ Before using the Slack integration, ensure you have:
|
||||
### **Messaging**
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="SLACK_SEND_MESSAGE">
|
||||
<Accordion title="slack/send_message">
|
||||
**Description:** Send a message to a Slack channel.
|
||||
|
||||
**Parameters:**
|
||||
@@ -73,7 +73,7 @@ Before using the Slack integration, ensure you have:
|
||||
- `authenticatedUser` (boolean, optional): If true, message appears to come from your authenticated Slack user instead of the application (defaults to false)
|
||||
</Accordion>
|
||||
|
||||
<Accordion title="SLACK_SEND_DIRECT_MESSAGE">
|
||||
<Accordion title="slack/send_direct_message">
|
||||
**Description:** Send a direct message to a specific user in Slack.
|
||||
|
||||
**Parameters:**
|
||||
@@ -89,7 +89,7 @@ Before using the Slack integration, ensure you have:
|
||||
### **Search & Discovery**
|
||||
|
||||
<AccordionGroup>
|
||||
<Accordion title="SLACK_SEARCH_MESSAGES">
|
||||
<Accordion title="slack/search_messages">
|
||||
**Description:** Search for messages across your Slack workspace.
|
||||
|
||||
**Parameters:**
|
||||
@@ -150,19 +150,13 @@ Slack's Block Kit allows you to create rich, interactive messages. Here are some
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get enterprise tools (Slack tools will be included)
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create an agent with Slack capabilities
|
||||
slack_agent = Agent(
|
||||
role="Team Communication Manager",
|
||||
goal="Facilitate team communication and coordinate collaboration efficiently",
|
||||
backstory="An AI assistant specialized in team communication and workspace coordination.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['slack'] # All Slack actions will be available
|
||||
)
|
||||
|
||||
# Task to send project updates
|
||||
@@ -184,19 +178,18 @@ crew.kickoff()
|
||||
### Filtering Specific Slack Tools
|
||||
|
||||
```python
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
# Get only specific Slack tools
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token",
|
||||
actions_list=["slack_send_message", "slack_send_direct_message", "slack_search_messages"]
|
||||
)
|
||||
from crewai import Agent, Task, Crew
|
||||
|
||||
# Create agent with specific Slack actions only
|
||||
communication_manager = Agent(
|
||||
role="Communication Coordinator",
|
||||
goal="Manage team communications and ensure important messages reach the right people",
|
||||
backstory="An experienced communication coordinator who handles team messaging and notifications.",
|
||||
tools=enterprise_tools
|
||||
apps=[
|
||||
'slack/send_message',
|
||||
'slack/send_direct_message',
|
||||
'slack/search_messages'
|
||||
] # Using canonical action names from canonical_integrations.yml
|
||||
)
|
||||
|
||||
# Task to coordinate team communication
|
||||
@@ -218,17 +211,13 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create agent with Slack messaging capabilities
|
||||
notification_agent = Agent(
|
||||
role="Notification Manager",
|
||||
goal="Create rich, interactive notifications and manage workspace communication",
|
||||
backstory="An AI assistant that specializes in creating engaging team notifications and updates.",
|
||||
tools=[enterprise_tools]
|
||||
apps=['slack/send_message'] # Specific action for sending messages
|
||||
)
|
||||
|
||||
# Task to send rich notifications
|
||||
@@ -254,17 +243,17 @@ crew.kickoff()
|
||||
|
||||
```python
|
||||
from crewai import Agent, Task, Crew
|
||||
from crewai_tools import CrewaiEnterpriseTools
|
||||
|
||||
enterprise_tools = CrewaiEnterpriseTools(
|
||||
enterprise_token="your_enterprise_token"
|
||||
)
|
||||
|
||||
# Create agent with Slack search and user management capabilities
|
||||
analytics_agent = Agent(
|
||||
role="Communication Analyst",
|
||||
goal="Analyze team communication patterns and extract insights from conversations",
|
||||
backstory="An analytical AI that excels at understanding team dynamics through communication data.",
|
||||
tools=[enterprise_tools]
|
||||
apps=[
|
||||
'slack/search_messages',
|
||||
'slack/get_user_by_email',
|
||||
'slack/list_members'
|
||||
] # Using canonical action names from canonical_integrations.yml
|
||||
)
|
||||
|
||||
# Complex task involving search and analysis
|
||||
|
||||
Reference in New Issue
Block a user