mirror of
https://github.com/simstudioai/sim.git
synced 2026-01-15 18:07:56 -05:00
Compare commits
2 Commits
main
...
fix/refres
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2325cad1f | ||
|
|
debcd76019 |
@@ -43,6 +43,27 @@ In Sim, the Slack integration enables your agents to programmatically interact w
|
||||
- **Download files**: Retrieve files shared in Slack channels for processing or archival
|
||||
|
||||
This allows for powerful automation scenarios such as sending notifications with dynamic updates, managing conversational flows with editable status messages, acknowledging important messages with reactions, and maintaining clean channels by removing outdated bot messages. Your agents can deliver timely information, update messages as workflows progress, create collaborative documents, or alert team members when attention is needed. This integration bridges the gap between your AI workflows and your team's communication, ensuring everyone stays informed with accurate, up-to-date information. By connecting Sim with Slack, you can create agents that keep your team updated with relevant information at the right time, enhance collaboration by sharing and updating insights automatically, and reduce the need for manual status updates—all while leveraging your existing Slack workspace where your team already communicates.
|
||||
|
||||
## Getting Started
|
||||
|
||||
To connect Slack to your Sim workflows:
|
||||
|
||||
1. Sign up or log in at [sim.ai](https://sim.ai)
|
||||
2. Create a new workflow or open an existing one
|
||||
3. Drag a **Slack** block onto your canvas
|
||||
4. Click the credential selector and choose **Connect**
|
||||
5. Authorize Sim to access your Slack workspace
|
||||
6. Select your target channel or user
|
||||
|
||||
Once connected, you can use any of the Slack operations listed below.
|
||||
|
||||
## AI-Generated Content
|
||||
|
||||
Sim workflows may use AI models to generate messages and responses sent to Slack. AI-generated content may be inaccurate or contain errors. Always review automated outputs, especially for critical communications.
|
||||
|
||||
## Need Help?
|
||||
|
||||
If you encounter issues with the Slack integration, contact us at [help@sim.ai](mailto:help@sim.ai)
|
||||
{/* MANUAL-CONTENT-END */}
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type React from 'react'
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { createLogger } from '@sim/logger'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { useQuery, useQueryClient } from '@tanstack/react-query'
|
||||
import { Loader2, WrenchIcon, XIcon } from 'lucide-react'
|
||||
import { useParams } from 'next/navigation'
|
||||
import {
|
||||
@@ -943,8 +943,9 @@ export function ToolInput({
|
||||
const params = useParams()
|
||||
const workspaceId = params.workspaceId as string
|
||||
const workflowId = params.workflowId as string
|
||||
const queryClient = useQueryClient()
|
||||
const [storeValue, setStoreValue] = useSubBlockValue(blockId, subBlockId)
|
||||
const [open, setOpen] = useState(false)
|
||||
const [_, setOpen] = useState(false)
|
||||
const [customToolModalOpen, setCustomToolModalOpen] = useState(false)
|
||||
const [editingToolIndex, setEditingToolIndex] = useState<number | null>(null)
|
||||
const [draggedIndex, setDraggedIndex] = useState<number | null>(null)
|
||||
@@ -2428,7 +2429,14 @@ export function ToolInput({
|
||||
})()}
|
||||
{(tool.type === 'workflow' || tool.type === 'workflow_input') &&
|
||||
tool.params?.workflowId && (
|
||||
<WorkflowToolDeployBadge workflowId={tool.params.workflowId} />
|
||||
<WorkflowToolDeployBadge
|
||||
workflowId={tool.params.workflowId}
|
||||
onDeploySuccess={() => {
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['workflow-input-fields', tool.params?.workflowId],
|
||||
})
|
||||
}}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
<div className='flex flex-shrink-0 items-center gap-[8px]'>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'
|
||||
import { createLogger } from '@sim/logger'
|
||||
import { useQueryClient } from '@tanstack/react-query'
|
||||
import { useParams } from 'next/navigation'
|
||||
import { Handle, type NodeProps, Position, useUpdateNodeInternals } from 'reactflow'
|
||||
import { Badge, Tooltip } from '@/components/emcn'
|
||||
@@ -528,6 +529,7 @@ export const WorkflowBlock = memo(function WorkflowBlock({
|
||||
const params = useParams()
|
||||
const currentWorkflowId = params.workflowId as string
|
||||
const workspaceId = params.workspaceId as string
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const {
|
||||
currentWorkflow,
|
||||
@@ -600,6 +602,10 @@ export const WorkflowBlock = memo(function WorkflowBlock({
|
||||
responseData.apiKey || ''
|
||||
)
|
||||
refetchDeployment()
|
||||
// Invalidate the workflow schema cache so new config is loaded immediately
|
||||
queryClient.invalidateQueries({
|
||||
queryKey: ['workflow-input-fields', workflowId],
|
||||
})
|
||||
} else {
|
||||
logger.error('Failed to deploy workflow')
|
||||
}
|
||||
@@ -609,7 +615,7 @@ export const WorkflowBlock = memo(function WorkflowBlock({
|
||||
setIsDeploying(false)
|
||||
}
|
||||
},
|
||||
[isDeploying, setDeploymentStatus, refetchDeployment]
|
||||
[isDeploying, setDeploymentStatus, refetchDeployment, queryClient]
|
||||
)
|
||||
|
||||
const currentStoreBlock = currentWorkflow.getBlockById(id)
|
||||
|
||||
@@ -495,7 +495,7 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
|
||||
services: {
|
||||
slack: {
|
||||
name: 'Slack',
|
||||
description: 'Send messages using a Slack bot.',
|
||||
description: 'Send messages using a bot for Slack.',
|
||||
providerId: 'slack',
|
||||
icon: SlackIcon,
|
||||
baseProviderIcon: SlackIcon,
|
||||
|
||||
Reference in New Issue
Block a user