- Documentation
Typesense integration
Index documents, run searches, and manage collections in Typesense on behalf of your clients.
What it does
The Typesense integration lets your agency stand up and maintain typo-tolerant search on a client's data without writing glue code. Connect a Typesense cluster once and your workflows can create and delete collections, push documents into the index as records change upstream, retrieve documents by id, and run faceted search queries with filtering and sorting. A polling trigger watches a collection on a fixed interval so workflows can react to newly indexed documents even though Typesense does not push webhooks.
Connect a Typesense account
- Open your workspace in TaskJuice and navigate to Connections.
- Choose Typesense and click Connect.
- In a new tab, open the Typesense Cloud dashboard for the client's cluster (or the admin UI of a self-hosted cluster).
- Copy the cluster URL. On Typesense Cloud this is the nearest-node hostname under Cluster Configuration, shaped like
https://{cluster-id}.a1.typesense.net. For self-hosted clusters use your origin (for example,https://search.example.com). - Generate or copy an API key scoped to the actions you want TaskJuice to perform. In Typesense Cloud, keys live under Cluster, API Keys. On self-hosted clusters, create one with
POST /keysusing the admin key. - Paste both values into TaskJuice and save the connection.
To rotate the API key later, mint a new one in Typesense, swap it into the TaskJuice connection, and the next run will pick it up.
Triggers
typesense/search-pollpolls a collection on a fixed interval, runs the configured query, and emits one activation per cycle with one record per hit returned since the previous watermark. Use it with acreated_at:>{{watermark}}filter clause to react to newly indexed documents.
Actions
typesense/create-collectioncreates a new collection from a schema definition with field names, types, and optional default sorting field.typesense/retrieve-collectionfetches a collection's schema and current document count by name.typesense/delete-collectionpermanently removes a collection and every document it holds.typesense/index-documentwrites a single document into a collection with selectable write modes: create, upsert, update, or emplace.typesense/retrieve-documentfetches one document from a collection by its id.typesense/search-documentsruns a faceted search with query string, query_by fields, optional filter_by, sort_by, and facet_by clauses, paginated viapageandper_page.
Known limitations
- Typesense does not push webhooks for indexed-document events, so reacting to new documents requires the
search-polltrigger. Polling intervals shorter than 60 seconds are rejected at the workflow level. - The search action caps
per_pageat 250 hits, matching the Typesense engine limit. - Collection names cannot be reused for a few seconds after
typesense/delete-collectionreturns, because the cluster propagates the deletion asynchronously. - Typesense Cloud clusters in different regions use different nearest-node hostnames; each TaskJuice connection points at one cluster URL, so connect a separate Typesense connection per region.
Was this helpful?