Index approved SurrealDB articles with OpenAI embeddings

Generate search vectors for up to ten approved articles and save each vector only while its source revision still matches.

8 stepsOperationsProduct and engineering

Free to start, no card required.

How it works

  1. When this happens

    Check for articles to index

    Schedule

  2. Step 1 · SurrealDB

    Read approved article revisions

  3. Step 2 · Code

    Check the pending article batch

  4. Step 3

    Index each approved article

    1. Step 4 · OpenAI

      Generate the search vector

    2. Step 5 · Code

      Match the vector to its revision

    3. Step 6 · SurrealDB

      Save the matching article vector

    4. Step 7 · Code

      Check the conditional update

    Repeats for every item

Before you start

Create kb_article with a unique article_key, integer revision, text body and boolean search_approved; allow the flow to write embedding, embedding_revision and embedding_model. Increment revision whenever the text changes and approve only articles authorized for OpenAI. Each run reads ten pending articles of up to 2,000 characters, so keep individual articles or chunks within that limit.

Accounts to connect

See all 419 in Operations

Your first automationstarts with one sentence.

Start free with 1,000 credits, no card needed. Rather have it done for you? Our team builds it.

Use template