How to Answer Staff Recipe and Allergen Questions from a Menu Knowledge Base

Build a Spojit workflow that embeds your MarketMan menu items and recipe data into a persistent Knowledge collection, then answers staff allergen and ingredient questions submitted over a webhook with cited AI responses posted back to Slack.

What This Integration Does

Front-of-house and kitchen staff get asked allergen and ingredient questions constantly: "Does the pesto pasta contain nuts?" or "Which menu items are gluten free?" Answers usually live in MarketMan, where your menu items, recipes, and ingredient lists are already maintained, but that data is not at a server's fingertips during a busy service. This workflow turns your MarketMan menu and item data into a searchable knowledge base and lets any staff member ask a plain-language question and get a grounded, cited answer in seconds.

The integration runs in two parts. A scheduled run pulls the latest menu items, items, and categories from MarketMan and embeds them into a persistent Knowledge collection so the answers always reflect the current menu. A separate webhook-triggered run accepts a staff question, queries that same collection with Miraxa (the intelligent layer across your automation), and sends the answer to a Slack channel. Because the collection is persistent and workspace-scoped, the embed step leaves a long-lived archive that the question-answering run reads on every request, and re-running the embed simply refreshes the documents in place under the same file names.

Prerequisites

  • A MarketMan connection in Spojit (Connections > Add connection > MarketMan) with API credentials that can read menu items, items, and categories. Note your buyer GUID if your account has more than one buyer.
  • A Slack connection authorized to post to the channel where staff will see answers, plus the channel ID (for example C0123ABCD).
  • A Knowledge collection created ahead of time: open the Knowledge section of the sidebar, choose New Collection, name it (for example menu-allergens), and note the embedding model. The same model is used for embedding and querying.
  • A signing connection for the question webhook (scheme Spojit or Custom) so incoming question posts are verified. See Setting Up a Webhook Connection.

Step 1: Build the embed workflow with a Schedule trigger

Create a new workflow for refreshing the knowledge base and add a Trigger node set to Schedule. Use a 5-field cron expression and an IANA timezone so the menu data is refreshed before each trading day, for example 0 6 * * * with Australia/Sydney to run at 6am daily. The trigger output is { scheduledAt }; nothing else is needed because the workflow reads everything it requires from MarketMan.

Step 2: Pull menu, item, and category data from MarketMan

Add three Connector nodes in Direct mode against the MarketMan connection so each call is deterministic and costs no AI credits. Use get-menu-items for plated menu items, get-items for the underlying ingredients and products, and get-categories for menu grouping. Each tool takes an optional buyerGuid field; leave it blank to use the default buyer, or set it if you operate multiple buyers. Bind the results to variables such as {{ menuItems }}, {{ items }}, and {{ categories }} so later steps can reference them.

Step 3: Shape the data into an embeddable document

Add a Transform node to combine the three result sets into one clean text document that reads well when retrieved. Pull each menu item's name, category, recipe ingredients, and any allergen or dietary fields into readable lines so the knowledge query can cite them. A simple structure works best:

MENU ITEM: Pesto Linguine
Category: Pasta
Ingredients: linguine, basil pesto (contains: pine nuts, parmesan), olive oil, garlic
Allergens: tree nuts, milk, gluten

MENU ITEM: Garden Salad
Category: Salads
Ingredients: mixed leaves, cherry tomato, cucumber, house vinaigrette
Allergens: none declared

Reference the upstream variables with handlebars like {{ menuItems }} and {{ items }} while building the text. Keeping one menu item per block helps the retrieved chunks stay focused on a single dish.

Step 4: Embed the document into the persistent collection

Add a Knowledge node in Embed mode. Set Collection to your persistent menu-allergens collection (not Transient, since this archive must outlive the run). Set File Name to a stable value such as menu-current so each refresh overwrites the same document instead of piling up duplicates. Set Document Type to Plain Text (or Markdown if you formatted with headings), and set Document Input to the transformed text from Step 3, for example {{ menuText }}. Leave the Embedding Model matching the collection's model, and capture the Output Variable to log the chunk count. This embed workflow is now complete; enable it and let it run on schedule.

Step 5: Build the answer workflow with a Webhook trigger

Create a second workflow for answering questions and add a Trigger node set to Webhook. Attach your signing connection so posts are verified by HMAC. Staff (or a simple form, kiosk, or Slack shortcut you wire up) post a JSON body to the workflow URL:

{
  "question": "Does the pesto linguine contain nuts?",
  "askedBy": "Front counter - Sam"
}

The trigger parses the body and returns 202 with an executionId, so the run continues asynchronously. The question is available downstream as {{ input.question }}.

Step 6: Query the knowledge base for a cited answer

Add a Knowledge node in Query mode. Set Collection to the same persistent menu-allergens collection, and set the Prompt to instruct a grounded, cautious answer:

Answer this staff question using only the menu knowledge base.
Name the specific menu items and their allergens, and cite the
menu item each fact comes from. If the menu data does not clearly
confirm an item is free of an allergen, say so and advise checking
with the kitchen.

Question: {{ input.question }}

Pick a Model for synthesis, set Result Count to around 5 so several menu items are retrieved, and capture the answer in an Output Variable such as {{ answer }}. If you want a structured payload for Slack formatting, add a Response Schema to force fields like summary and allergens.

Step 7: Post the answer to Slack

Add a Connector node in Direct mode against the Slack connection using send-message. Set the channel to your staff channel ID and build the message from the question and the cited answer:

:fork_and_knife: *Menu question from {{ input.askedBy }}*
> {{ input.question }}

{{ answer.content }}

Because the webhook is asynchronous, Slack is where staff see the result. If you would rather email the answer instead of, or in addition to, posting it, add a Send Email node, which sends from Spojit's built-in mail service without a connection.

Tips

  • Always use the same embedding model for the embed and query steps; the collection fixes its model at creation, so the Query node should match it for accurate retrieval.
  • Keep the embed schedule ahead of service (early morning) so allergen answers reflect any overnight recipe edits made in MarketMan.
  • For multi-site groups, set buyerGuid per buyer and embed into one collection per site, then point each site's answer workflow at its own collection.
  • Use a stable File Name in Embed mode so daily refreshes overwrite the document rather than accumulating stale copies that crowd out the current menu.

Common Pitfalls

  • Allergen accuracy depends entirely on what is recorded in MarketMan. If ingredient or allergen fields are blank, the answer will say so rather than guess. Keep recipes complete in MarketMan.
  • Do not use a Transient collection for the embed step. Transient collections are cleaned up when a run finishes, so the answer workflow would find nothing to query. Use a persistent collection.
  • The MarketMan tools return data for a single buyer at a time. If your menu spans multiple buyers, call get-menu-items once per buyer with the right buyerGuid and merge the results in your Transform node.
  • Webhook triggers can receive duplicate posts. If a kiosk or form retries, enable event-id dedup on the trigger so the same question is not answered twice in Slack.
  • Phrase the Query prompt to avoid over-claiming. Allergen safety is high stakes, so instruct the answer to advise confirming with the kitchen whenever the data is not explicit.

Testing

Run the embed workflow once manually (or wait for the first scheduled run) and confirm in the Knowledge section that the menu-current document shows status READY with a sensible chunk count. Then post a known question to the answer workflow's webhook URL using a single dish you can verify by hand, for example "Is the garden salad gluten free?", and check the execution log and the Slack channel for a cited answer. Once a handful of allergen and ingredient questions return correct, well-grounded responses, share the webhook with staff or wire it to your kiosk form.

Learn More

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.