Use the Knowledge block to search a Sim knowledge base and manage its documents and chunks from a workflow. The reference below also covers tags, connector inspection, and connector sync. See Using knowledge in workflows for configuration and examples.
Search knowledge bases and list, retrieve, create, upsert, or delete documents. Upload, list, update, or delete chunks, list tag definitions, and set document tags during creation or upsert. Inspect connectors and trigger syncs.
Search for similar content in a knowledge base by relevance
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base to search in querystring No Search query text (optional when using tag filters) topKnumber No Number of most similar results to return (1-100) tagFiltersarray No Array of tag filters with tagName and tagValue properties searchModestring No Retrieval mode: 'hybrid' fuses a full-text leg with semantic similarity, 'vector' uses semantic similarity only; omit for the workspace's default rerankerEnabledboolean No Whether to apply Cohere reranking to vector search results rerankerModelstring No Cohere rerank model to use (one of: rerank-v4.0-pro, rerank-v4.0-fast, rerank-v3.5) rerankerInputCountnumber No Number of vector results sent to the Cohere reranker (1–100). Defaults to topK × 4 capped at 100. apiKeystring No Cohere API key for reranker (self-hosted deployments only)
Parameter Type Description resultsarray Array of search results from the knowledge base ↳ documentId string Document ID ↳ documentName string Document name ↳ sourceUrl string URL to the original source document (e.g., Confluence page, Google Doc, Notion page). Null for documents without an external source. ↳ content string Content of the result ↳ chunkIndex number Index of the chunk within the document ↳ similarity number Cosine similarity between the query and the chunk (1 - cosine distance) in every search mode; 1 for tag-only matches. Not the ordering key in hybrid mode ↳ rankScore number Score the results are ordered by, descending: the reciprocal-rank-fusion score in hybrid mode, the cosine similarity in vector mode, or the reranker score when a reranker ordered the results ↳ rank number 1-based position in the returned order ↳ metadata object Metadata of the result, including tags querystring The search query that was executed totalResultsnumber Total number of results found costobject Cost information for the search operation
Upload a new chunk to a document in a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base containing the document documentIdstring Yes ID of the document to upload the chunk to contentstring Yes Content of the chunk to upload
Parameter Type Description dataobject Information about the uploaded chunk ↳ chunkId string Chunk ID ↳ chunkIndex number Index of the chunk within the document ↳ content string Content of the chunk ↳ contentLength number Length of the content in characters ↳ tokenCount number Number of tokens in the chunk ↳ enabled boolean Whether the chunk is enabled ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp messagestring Success or error message describing the operation result documentIdstring ID of the document the chunk was added to documentNamestring Name of the document the chunk was added to costobject Cost information for the upload operation
Create a new document in a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base containing the document namestring Yes Name of the document contentstring Yes Content of the document documentTagsobject No Document tags
Parameter Type Description dataobject Information about the created document ↳ documentId string Document ID ↳ documentName string Document name ↳ type string Document type ↳ enabled boolean Whether the document is enabled ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp messagestring Success or error message describing the operation result documentIdstring ID of the created document
Create or update a document in a knowledge base. If a document with the given ID or filename already exists, it will be replaced with the new content.
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base containing the document documentIdstring No Optional ID of an existing document to update. If not provided, lookup is done by filename. namestring Yes Name of the document contentstring Yes Content of the document documentTagsjson No Document tags
Parameter Type Description dataobject Information about the upserted document ↳ documentId string Document ID ↳ documentName string Document name ↳ type string Document type ↳ enabled boolean Whether the document is enabled ↳ isUpdate boolean Whether an existing document was replaced ↳ previousDocumentId string ID of the document that was replaced, if any ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp messagestring Success or error message describing the operation result documentIdstring ID of the upserted document
List all tag definitions for a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base to list tags for
Parameter Type Description knowledgeBaseIdstring ID of the knowledge base tagsarray Array of tag definitions for the knowledge base ↳ id string Tag definition ID ↳ tagSlot string Internal tag slot (e.g. tag1, number1) ↳ displayName string Human-readable tag name ↳ fieldType string Tag field type (text, number, date, boolean) ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp totalTagsnumber Total number of tag definitions
List documents in a knowledge base with optional filtering, search, and pagination
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base to list documents from searchstring No Search query to filter documents by filename enabledFilterstring No Filter by enabled status: "all", "enabled", or "disabled" limitnumber No Maximum number of documents to return (default: 50) offsetnumber No Number of documents to skip for pagination (default: 0)
Parameter Type Description knowledgeBaseIdstring ID of the knowledge base documentsarray Array of documents in the knowledge base ↳ id string Document ID ↳ filename string Document filename ↳ fileSize number File size in bytes ↳ mimeType string MIME type of the document ↳ enabled boolean Whether the document is enabled ↳ processingStatus string Processing status (pending, processing, completed, failed) ↳ chunkCount number Number of chunks in the document ↳ tokenCount number Total token count across chunks ↳ uploadedAt string Upload timestamp ↳ updatedAt string Last update timestamp ↳ connectorId string Connector ID if document was synced from an external source ↳ connectorType string Connector type (e.g. notion, github, confluence) if synced ↳ sourceUrl string Original URL in the source system if synced from a connector totalDocumentsnumber Total number of documents matching the filter limitnumber Page size used offsetnumber Offset used for pagination
Get full details of a single document including tags, connector metadata, and processing status
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base the document belongs to documentIdstring Yes ID of the document to retrieve
Parameter Type Description idstring Document ID filenamestring Document filename fileSizenumber File size in bytes mimeTypestring MIME type of the document enabledboolean Whether the document is enabled processingStatusstring Processing status (pending, processing, completed, failed) processingErrorstring Error message if processing failed chunkCountnumber Number of chunks in the document tokenCountnumber Total token count across chunks characterCountnumber Total character count uploadedAtstring Upload timestamp updatedAtstring Last update timestamp connectorIdstring Connector ID if document was synced from an external source sourceUrlstring Original URL in the source system if synced from a connector externalIdstring External ID from the source system tagsobject Tag values keyed by tag slot (tag1-7, number1-5, date1-2, boolean1-3)
Delete a document from a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base containing the document documentIdstring Yes ID of the document to delete
Parameter Type Description documentIdstring ID of the deleted document messagestring Confirmation message
List chunks for a document in a knowledge base with optional filtering and pagination
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base documentIdstring Yes ID of the document to list chunks from searchstring No Search query to filter chunks by content enabledstring No Filter by enabled status: "true", "false", or "all" (default: "all") limitnumber No Maximum number of chunks to return (1-100, default: 50) offsetnumber No Number of chunks to skip for pagination (default: 0)
Parameter Type Description knowledgeBaseIdstring ID of the knowledge base documentIdstring ID of the document chunksarray Array of chunks in the document ↳ id string Chunk ID ↳ chunkIndex number Index of the chunk within the document ↳ content string Chunk text content ↳ contentLength number Content length in characters ↳ tokenCount number Token count for the chunk ↳ enabled boolean Whether the chunk is enabled ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp totalChunksnumber Total number of chunks matching the filter limitnumber Page size used offsetnumber Offset used for pagination
Update the content or enabled status of a chunk in a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base documentIdstring Yes ID of the document containing the chunk chunkIdstring Yes ID of the chunk to update contentstring No New content for the chunk enabledboolean No Whether the chunk should be enabled or disabled
Parameter Type Description documentIdstring ID of the parent document idstring Chunk ID chunkIndexnumber Index of the chunk within the document contentstring Updated chunk content contentLengthnumber Content length in characters tokenCountnumber Token count for the chunk enabledboolean Whether the chunk is enabled updatedAtstring Last update timestamp
Delete a chunk from a document in a knowledge base
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base documentIdstring Yes ID of the document containing the chunk chunkIdstring Yes ID of the chunk to delete
Parameter Type Description chunkIdstring ID of the deleted chunk documentIdstring ID of the parent document messagestring Confirmation message
List all connectors for a knowledge base, showing sync status, type, and document counts
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base to list connectors for
Parameter Type Description knowledgeBaseIdstring ID of the knowledge base connectorsarray Array of connectors for the knowledge base ↳ id string Connector ID ↳ connectorType string Type of connector (e.g. notion, github, confluence) ↳ status string Connector status (active, paused, syncing) ↳ syncIntervalMinutes number Sync interval in minutes (0 = manual only) ↳ lastSyncAt string Timestamp of last sync ↳ lastSyncError string Error from last sync if failed ↳ lastSyncDocCount number Number of documents synced in last sync ↳ nextSyncAt string Timestamp of next scheduled sync ↳ consecutiveFailures number Number of consecutive sync failures ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp totalConnectorsnumber Total number of connectors
Get detailed connector information including recent sync logs for monitoring sync health
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base the connector belongs to connectorIdstring Yes ID of the connector to retrieve
Parameter Type Description connectorobject Connector details ↳ id string Connector ID ↳ connectorType string Type of connector ↳ status string Connector status (active, paused, syncing) ↳ syncIntervalMinutes number Sync interval in minutes ↳ lastSyncAt string Timestamp of last sync ↳ lastSyncError string Error from last sync if failed ↳ lastSyncDocCount number Docs synced in last sync ↳ nextSyncAt string Next scheduled sync timestamp ↳ consecutiveFailures number Consecutive sync failures ↳ createdAt string Creation timestamp ↳ updatedAt string Last update timestamp syncLogsarray Recent sync log entries ↳ id string Sync log ID ↳ status string Sync status ↳ startedAt string Sync start time ↳ completedAt string Sync completion time ↳ docsAdded number Documents added ↳ docsUpdated number Documents updated ↳ docsDeleted number Documents deleted ↳ docsUnchanged number Documents unchanged ↳ errorMessage string Error message if sync failed
Trigger a manual sync for a knowledge base connector
Inputs and outputsParameter Type Required Description knowledgeBaseIdstring Yes ID of the knowledge base the connector belongs to connectorIdstring Yes ID of the connector to trigger sync for
Parameter Type Description connectorIdstring ID of the connector that was synced messagestring Status message from the sync trigger