AgentsStudioTemplatesPricingDocs
Sign inGet Started

Give your AI agent an automation engine.

Build

  • MCP server
  • kovca CLI
  • Kovca's agent
  • Studio
  • Templates

Run

  • Apps and events
  • Decision and Generative AI
  • Workflows API
  • Run history
  • Pricing

People in the loop

  • Approvals and waits
  • Tasks
  • Coding agents
  • Docs

Company

  • About
  • Security
  • Contact
  • Privacy Policy
  • Terms of Service
© Kovca. kovca.io
GuidesBusiness Validation

Log out-of-scope Slack requests to Notion

Build a Kovca workflow that starts from a new Slack message, checks it against a statement of work you write, and adds a Notion row when the status is potentially out of scope or needs a change request.

Scope Intelligence23 min readcURL
InputScope checkExtra?Quoted messageRow textPropertiesLog rowAdd reactionOutput
TemplateSlack scope logStart from a new Slack message, check it against a statement of work you write, and add a Notion row when the status is potentially out of scope or needs a change request.
9 nodesUp to 1 evaluation per run
Use this template

Client and stakeholder requests show up as messages in a shared Slack channel. Some are work the project already includes. Others are new work that gets done anyway, and nobody writes down which requests were extra.

This guide builds a workflow that starts when a new message is posted, checks the text against a statement of work you write, and when the status is potentially_out_of_scope or requires_change_request, adds a row to a Notion database and adds a reaction on the original message. A within_scope or uncertain result is left alone. You'll start from a template, test it, and activate it on the Slack and Notion accounts.

The template already uses the Slack New message trigger, Notion Add database row, and Slack Add reaction. It does not store a Slack or Notion account. You choose the accounts when you activate. Until then the draft saves, and Studio tests simulate Add database row and Add reaction.

The result is advisory. It is not a legal reading of a contract. Scope Intelligence returns status, recommended_action, applicable_requirements, potential_conflicts, new_deliverable, and missing_information. What it returns depends on the sentences you write and on the message. The template's own examples are a mobile-apps request and an order-history request. The trigger's own sample is a checkout outage, so don't run that sample against these sentences and expect a scope check.

If the channel only gets a few requests a day, a person can paste the extra ones into Notion, and a Slack keyword notification can point at the channel. The workflow is for the channel where extra requests sit next to the work you already agreed to, and nobody keeps the list.

What you'll build

The input node is Slack: New message. Scope check follows it.

Extra? has an extra branch and a default branch. The extra branch goes to Quoted message.

Row text feeds Properties. Both sit on the extra branch.

Log row is Notion Add database row. Add reaction follows it.

Result is the output step. The extra branch and the default branch both reach it.

StepNodeWhat it does
InputSlack: New message (slack/new_message)Starts the workflow. The event fields are attachments, blocks, bot_id, channel, channel_type, files, subtype, team_id, text, thread_ts, ts, and user.
Scope checkScope Intelligence, a Decision AI node (builtin:scope/check@1)Checks the message against the statement of work, deliverables, exclusions, and assumption written on the node.
Extra?Switchextra when status is potentially_out_of_scope or requires_change_request. within_scope and uncertain are default.
Quoted messageConvertOn the extra branch. Turns the message into a JSON string so a quote in the text does not break the row.
Row textTextBuilds the list of property objects Add database row receives.
PropertiesConvertParses that text into the list.
Log rowNotion Add database row (action:notion/add_database_row@1)Adds the row. Sent once.
Add reactionSlack Add reaction (action:slack/add_reaction@1)Adds an emoji on the original message. Safe to retry.
OutputOutputReturns the scope result, the route, the row text, and whether the row and the reaction ran.

The default branch goes straight to Result. That is the output step. A message that is in scope, or uncertain, does not add a row and does not react.

Watch the test

Watch the Studio test (MP4). It is a recording of the production Studio at kovca.io, in light mode, 13 seconds. The frame is the Test panel. The site header is outside it. A caption added underneath reads: Studio test. Slack and Notion actions simulated. Send real requests is off. Nothing in the recording is sped up. No Slack or Notion account is connected, and Send real requests stays off. Log row and Add reaction return their samples and are marked sample. That is not a row written in Notion, and it is not a reaction added in Slack. The result stays on screen for the last 6 seconds.

Studio test. Status is requires_change_request. logged is true. The page URL is the sample. reacted is true.

The recording follows these steps:

  1. The Test tab is open. The input is the mobile-apps message: the text asks for iOS and Android apps, the channel is C08REQUESTS1, and the timestamp is 1762005100.000100. Send real requests is off.
  2. Run. The status is requires_change_request and the recommended action is initiate_change_request. potential_conflicts names Native mobile applications, from exclusions[0], with relation excludes. new_deliverable is true. missing_information is acceptance_criteria. The route is extra.
  3. Log row and Add reaction succeeded and are marked sample. logged is true. The page id and page URL are the action's sample. reacted is true. The panel shows 5 credits used for that one Decision AI step. That output stays on screen through the end of the recording.

The JSON later in this guide is the template's unit test for the same message when the exclusion matches and the new-deliverable signal does not. In that test new_deliverable is false. The status, the conflict, the route, and the sample page id are the same. The unit test does not read the message. It sets the exclusion match directly. What Scope Intelligence returns on a live run depends on the sentences and the message. This recording is one live Studio test of that message.

Build it in the Studio

1Start from the template

Click Use this template above, or open Slack scope log in Workflows.

The draft opens on the canvas. The components library is on the left. Triggers, AI, Action in an app, Data transformation, Flow, Core, and Human review are the groups. This workflow uses Slack and Notion, so both are under Triggers and under Action in an app. Apps you have not connected, and that this workflow does not use, stay behind Connect another app. The pictures below are the production Studio: that library, the New message settings, and a test of the mobile-apps message. The template's step titles are the ones in the table above. The last card on the canvas is Result.

The library home. Triggers 15, and the workflow starts on Slack: New message. Action in an app 215.

New message is selected. Reaction added, New Channel Created, Direct Message Received, and Message Reaction Removed are in the same list.

Add database row is next to Create page. The list continues with comments, databases, views, and deletes.

Add reaction is next to Send message. The list continues with search, reminders, canvases, and lists.

Not published. Draft rev 3. 1 Decision AI evaluation. 3 connections. The library lists Triggers, AI, and Action in an app. Slack: New message, Scope check, and Extra? are on the canvas.

2The workflow starts from a new message

Select the input step. It is Slack: New message, not an API request. The account line asks you to connect Slack. Leave it empty while you test.

Connect Slack is still to do. Only in channel shows C08REQUESTS1. Channel Type is channel.

SettingTemplate value
Only in channel (ID) (channel_id)C08REQUESTS1
Channel Type (channel_type)channel
Bot messages (is_bot_message)unset
Thread replies (is_thread_reply)unset

C08REQUESTS1 is a stand-in, the same kind of channel id as the trigger's sample event. Replace it with the requests channel's ID. The other channel types are group and mpim. Bot messages and Thread replies are optional filters. Their descriptions are "Filter by message source" and "Filter by thread status." The template leaves them unset. Until an account is connected, Only in channel asks you to connect Slack to choose a channel. Once an account is connected, that field lists the workspace's channels.

The trigger description says it fires when a message is posted in a Slack channel (public, private, or multi-party IM). The inspector also says this event can happen very often, and every event that starts a run uses credits, and to narrow it with the settings below. The channel id is that narrowing.

Event fields later steps read:

FieldUsed for
input.textScope check's requested change, and the row's Request value
input.channelThe row's Channel value, and Add reaction's Channel
input.tsThe row's Message timestamp, and Add reaction's Message timestamp

The event also includes attachments, blocks, bot_id, channel_type, files, subtype, team_id, thread_ts, and user. A manual run or an API call can omit them. The same message does not start two runs: the event id is ts. A later message is a new event and runs again. Add reaction does not post a message.

Send the new message, not a long thread you pasted in. Scope check reads input.text only. A message whose latest line is "thanks, that's in the original scope" should not be logged because of an extra request further up that you copied into the same text.

3Check the message against the agreement

Select Scope check. The node is Scope Intelligence. The template writes the agreement on the node and maps the message to requested_change.

statement_of_work, deliverables, exclusions, and assumptions are fixed values. requested_change is input.text. acceptance_criteria and amendments are not set.

FieldTemplate value
statement_of_workTwo sentences: the portal, then the order API connection. Up to 8,000 characters, at least one sentence, and at most 40 sentences.
requested_changeinput.text. Required. Up to 2,000 characters.
deliverablesThe two items below. Optional. Up to 30 items, each up to 500 characters.
exclusionsThe two items below. Same limits.
assumptionsOne item: the portal is written in English. Same limits.
acceptance_criteriaunset
amendmentsunset
JSON
[
  "A web portal with login, account settings, and order history",
  "A connection to the existing order API"
]
JSON
[
  "Native mobile applications",
  "Moving data out of the old portal"
]
JSON
["The portal is written in English"]

statement_of_work has to contain at least one sentence. A sentence here is a stretch of text with at least three words. "Portal" alone is rejected. When you list deliverables, those items are what can count as included. A matching sentence in the statement of work, with no deliverable list, does not come back as within_scope.

input.text can be up to 8,000 characters, which is the limit on that event field. requested_change stops at 2,000. A longer message fails this step. An empty text fails it too.

The node returns:

  • status: within_scope, potentially_out_of_scope, requires_change_request, or uncertain.
  • recommended_action: proceed, clarify_scope, review_contract, or initiate_change_request.
  • applicable_requirements: items that include the request, or partly include it, each with text, source, and relation (includes or partially_includes).
  • potential_conflicts: exclusions and assumptions the request runs into, each with text, source, and relation (excludes or conflicts_with_assumption).
  • new_deliverable: true, false, or null.
  • missing_information: which of deliverables, exclusions, and acceptance_criteria you did not send. This template sends the first two, so the list is acceptance_criteria until you add some.

The first matching rule wins. An amendment that clearly covers the request comes back within_scope with proceed, even when an older exclusion would have ruled it out. This template does not set amendments. A request that an exclusion rules out, and that no deliverable includes, comes back requires_change_request with initiate_change_request. A request that both a deliverable and an exclusion cover comes back uncertain with review_contract. A conflict with an assumption comes back potentially_out_of_scope with review_contract. A request for something the agreement does not describe, when nothing earlier matched, comes back potentially_out_of_scope with initiate_change_request. Anything else, including a match that is only a general statement-of-work sentence, comes back uncertain with clarify_scope.

4Decide what gets logged

Select Extra?. A switch reads one value and continues on the first matching case, or on default.

Route on is nodes.scope.output.status. The extra case lists potentially_out_of_scope and requires_change_request.

CaseMatchesGoes to
extrapotentially_out_of_scope, requires_change_requestQuoted message
defaultwithin_scope, uncertain, and any other statusResult

within_scope is left alone. uncertain is left alone too: the node did not call the request out of scope. Add uncertain to the extra case if those should be logged as well.

The step's id is extra, and the case name is extra too. The output field route is the branch that ran: extra or default.

5Build the row

Quoted message converts input.text to JSON text. A message that contains a quote or a backslash would otherwise break the list in the next step. The convert puts the quotes in for you. Row text then builds one JSON list. Properties parses nodes.row_text.output.text.

[{"name":"Request","type":"title","value":{{nodes.quoted.output.result}}},{"name":"Status","type":"rich_text","value":{{json nodes.scope.output.status}}},{"name":"Recommended action","type":"rich_text","value":{{json nodes.scope.output.recommended_action}}},{"name":"Channel","type":"rich_text","value":{{json input.channel}}},{"name":"Message timestamp","type":"rich_text","value":{{json input.ts}}}]

The template names Request, Status, Recommended action, Channel, and Message timestamp, and inserts the quoted message, the status, the recommended action, the channel, and the timestamp.

The names and types in that list are an assumption for you to check, not a shape this guide verified on the node. Properties is a list of JSON values. The field's own description, on Add database row, is "Property values for the new page." The form does not say which keys each item uses. This template sends name, type, and value on the guess that a Notion column is written that way. Before a real request, compare the list with the columns on your database. name has to be one of those columns. One column is the title, and the other text columns in this list are written as rich_text. Rename them to the columns you have. A Studio test does not send the list to Notion, so a wrong shape still returns the sample.

status and recommended_action are the node's own values, inserted as JSON strings. channel and ts are the event's, also JSON strings. An empty channel becomes an empty string in the list. It does not invent a channel.

6Add the Notion row

Select Log row. It is Notion's Add database row action.

Connect Notion is still to do. If it fails is Stop the run. Database ID is the stand-in UUID. Properties is nodes.properties.output.result.

Add database row fieldValue
Database ID (database_id)b7e1c4a2-9d30-4f68-8a15-2c6e0d9b4f71
Properties (properties)nodes.properties.output.result

Database ID is required. The value above is a stand-in so the draft is valid before you connect. Replace it with your scope-change log database. The id is a UUID, with or without hyphens, for a database shared with the Notion account you connect. The action's description says it creates a page (row) in a database with optional properties and child blocks. This node does not have an input for child blocks, an icon, or a cover. Its inputs are Database ID and Properties.

If it fails is Stop the run. The step is attempted once. It is not retried, because adding a row again would add another row. Add reaction is after this step, so it does not run when the row was not added. In a Studio test, with Send real requests off, the step returns its sample and is marked sample. The sample page id is 7f8e9d0c-1b2a-4c3d-9e8f-7a6b5c4d3e2f. The sample URL is that id on notion.so, without the hyphens. That is the action's sample, not a page created in your Notion.

7React on the message

Select Add reaction. It runs after Log row, on the same branch.

Connect Slack is still to do. If it fails is Continue (output.ok is false). Channel is input.channel. Message timestamp is input.ts. Emoji name is eyes.

Add reaction fieldValue
Channel (channel)input.channel
Message timestamp (timestamp)input.ts
Emoji name (name)eyes

eyes is the emoji name, without colons. Change it to the name you want on the message. The field's example is thumbsup.

If it fails is Continue (output.ok is false). A failed reaction does not undo the row, and it does not fail the run. The step is safe to retry: repeating it has no further effect, and a transient failure can be tried again within the run. In a Studio test it returns its sample, ok: true, and is marked sample. That is not a reaction in Slack.

8Test it

Open the Test tab. Mobile apps and Order history are the template's examples. Sample new message is the trigger's own sample, which is a checkout outage, not one of these requests. Leave Send real requests off. Add database row and Add reaction then return their samples and are marked sample. Nothing is written to Notion or Slack. That sample is not what a published API call returns. The Test panel still charges Scope check when that step succeeds. It does not charge the run fee, and it does not charge a simulated Add database row or Add reaction. See What it costs.

Send real requests is off. The run used 5 credits. log_row and add_reaction are marked sample and succeeded.

What Scope Intelligence returns depends on the sentences and the message. A potentially_out_of_scope or requires_change_request result takes Log row and Add reaction. within_scope and uncertain go to Result, and those two steps are skipped. row_text, logged, page_id, page_url, and reacted come back null on the default branch.

Before you activate, run messages you have actually seen, including ones that should be logged and ones that should not. When the routes look right, turn on Send real requests once, with both accounts chosen, on a message where an extra Notion row and an extra reaction are harmless. Add database row will create the row for real on an extra result.

Publish, call it, and activate it

The same workflow can be called over the API. The body uses the trigger's field names. Create an API key under API keys and keep it on your backend.

cURL
curl https://kovca.io/api/v1/workflows/wf_.../execute \
  -H "Authorization: Bearer $KOVCA_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 1762005100.000100" \
  -d '{
    "input": {
      "attachments": [],
      "blocks": [],
      "channel": "C08REQUESTS1",
      "channel_type": "channel",
      "files": [],
      "team_id": "T02ACME0001",
      "text": "Can you also ship iOS and Android apps with the same screens?",
      "ts": "1762005100.000100",
      "user": "U04MARIA01"
    }
  }'

That curl calls a published workflow. The call runs Add database row for real when the status is potentially_out_of_scope or requires_change_request, and Add reaction as well. The steps need the Notion account on Log row and the Slack account on the trigger and on Add reaction. If an account is missing, the action fails. With If it fails set to stop on Log row, the run stops and Add reaction does not run. A published call does not return the sample you see with Send real requests off.

The JSON below is the output this template's unit test expects for the mobile-apps input when the exclusion "Native mobile applications" matches and the new-deliverable signal does not. Add database row and Add reaction are simulated. The test sets that exclusion match directly. It does not read the message. That is one result the step can return. It is not a response from a published API call. On the Studio recording above, the same message came back requires_change_request with the same conflict, and new_deliverable was true. In this unit test new_deliverable is false. What the node returns for a given message depends on the sentences and the message. In the example, logged is true and page_id is 7f8e9d0c-1b2a-4c3d-9e8f-7a6b5c4d3e2f because the simulated step's sample says so. That does not mean a row was created in Notion. reacted is true for the same reason. missing_information is acceptance_criteria because the template does not send acceptance criteria. Order history is the other example. On a within_scope or uncertain result its row fields come back null.

JSON
{
  "request_id": "req_...",
  "run_id": "run_...",
  "workflow": { "id": "wf_...", "version": 1 },
  "status": "succeeded",
  "output": {
    "status": "requires_change_request",
    "recommended_action": "initiate_change_request",
    "applicable_requirements": [],
    "potential_conflicts": [
      {
        "text": "Native mobile applications",
        "source": "exclusions[0]",
        "relation": "excludes"
      }
    ],
    "new_deliverable": false,
    "missing_information": ["acceptance_criteria"],
    "route": "extra",
    "row_text": "[{\"name\":\"Request\",\"type\":\"title\",\"value\":\"Can you also ship iOS and Android apps with the same screens?\"},{\"name\":\"Status\",\"type\":\"rich_text\",\"value\":\"requires_change_request\"},{\"name\":\"Recommended action\",\"type\":\"rich_text\",\"value\":\"initiate_change_request\"},{\"name\":\"Channel\",\"type\":\"rich_text\",\"value\":\"C08REQUESTS1\"},{\"name\":\"Message timestamp\",\"type\":\"rich_text\",\"value\":\"1762005100.000100\"}]",
    "logged": true,
    "page_id": "7f8e9d0c-1b2a-4c3d-9e8f-7a6b5c4d3e2f",
    "page_url": "https://www.notion.so/7f8e9d0c1b2a4c3d9e8f7a6b5c4d3e2f",
    "reacted": true
  },
  "steps": [
    { "id": "input", "status": "succeeded" },
    { "id": "scope", "status": "succeeded" },
    { "id": "extra", "status": "succeeded" },
    { "id": "quoted", "status": "succeeded" },
    { "id": "row_text", "status": "succeeded" },
    { "id": "properties", "status": "succeeded" },
    { "id": "log_row", "status": "succeeded" },
    { "id": "add_reaction", "status": "succeeded" },
    { "id": "output", "status": "succeeded" }
  ],
  "evaluations": 1
}

The JSON above leaves out credits. A succeeded execute response includes that field. This example is the simulated run, so the actions are not charged. credits for it is 6: 5 for Scope check and 1 for the API run. The Studio test does not charge the run fee, which is why its panel shows 5.

Look up the run later. This returns status, timing, and steps. It does not return the output. Keep the execute response if you need the status or the page id. Runs are kept for 30 days.

cURL
curl https://kovca.io/api/v1/runs/run_... \
  -H "Authorization: Bearer $KOVCA_API_KEY"

1762005100.000100 is a key you choose. Keys are kept for 24 hours. A retry with the same key and the same request returns the original run instead of adding another row. A new key can add another row, because Add database row is not idempotent. Add reaction can be repeated without a second effect. Kovca does not store the message or the output.

To run it from Slack, open Activate. The checklist is what's left: connect Slack, connect Notion, and, once an account is connected, choose that account on the trigger, on Log row, and on Add reaction. It says up to 15 credits per event. The activate row is Publish and activate: run on every new message. The button on that row says Publish & activate. That publishes the draft and starts it. A live automation runs that pinned version. Later edits don't reach it until you publish them to the automation.

Connect Slack and Connect Notion are still to do. Up to 15 credits per event. Publish and activate: run on every new message. The button says Publish & activate.

Connect Slack and Notion from the checklist, or from the steps, when the routes in the Test tab look right. Until then, leave the accounts empty and keep Send real requests off.

A new message starts a run when Slack sends the event. Follow runs on the Runs page (filter by the workflow). While an automation is paused, events that arrive are skipped. Kovca does not keep them to run later. A failed run is not retried on its own, because the row may already have been added.

If someone already reads the channel

You don't need this if a person can read the channel and the volume is small. Slack can notify someone on a keyword, and Notion is a fine place to type the extra requests by hand. A keyword does not read the message against a statement of work, and it does not write the row from a status.

What the workflow adds is the same agreement on every new message in the channel you set, a Notion row only when the status is potentially_out_of_scope or requires_change_request, and a reaction on that message. You still choose the accounts, set the channel id and the database id, rename the columns, and read a sample of results before you activate it.

Make it yours

  • Rewrite the agreement. The statement of work, the deliverables, the exclusions, and the assumption are fixed values on Scope check. Keep the statement of work as sentences. A request the lists do not mention is something the node has to treat from those sentences.
  • Point the database at a real one. b7e1c4a2-9d30-4f68-8a15-2c6e0d9b4f71 is a stand-in. Use the database id from the scope-change log, and change Request, Status, Recommended action, Channel, and Message timestamp to the column names and types that database has.
  • Set the channel you actually watch. Only in channel is C08REQUESTS1. Replace it with the channel id. Channel Type is channel. The other values are group and mpim.
  • Leave in-scope messages alone. That is already what default does, and it includes uncertain. Add uncertain to the extra case if you want those logged too.
  • Do not add Reaction added unless you mean every reaction. Reaction added (slack/reaction_added) fires when someone reacts. This template does not use it. New message fires when a message is posted. The emoji this workflow adds is not a new message.
  • Keep the message short. requested_change can be at most 2,000 characters. A longer Slack message stops the run at Scope check.
  • Change it without surprising a live channel. Edit the draft and publish the changes to the automation. The running version stays pinned until you do.

What it costs

Credits, and only for steps that succeed. Billing is the list.

A Studio test skips the run fee. It does not skip Scope check. That step is 5 credits when it succeeds, including a test with Send real requests off. A simulated action is not charged, and an action that fails is not charged. With Send real requests off, Add database row and Add reaction are simulated, so they add nothing.

  • A Slack event: 6 credits for the run.
  • A published API call: 1 credit for the run.
  • Scope check: 5 credits when it succeeds.
  • Add database row: 2 credits when it runs for real and succeeds. Only the extra branch is charged.
  • Add reaction: 2 credits when it runs for real and succeeds, and only on the extra branch.

The switch, the convert steps, and the text step use no credits. A branch that doesn't run isn't charged. The Activate panel adds every step together, including the branch that does not run on the same event, so its number is an upper bound for a live event. With this template that upper bound is 15 credits per event: the 6 credit event fee, Scope check, Add database row, and Add reaction. A live event that logs the request is those 15 when both actions succeed. A live event that leaves the message alone is 11 (the event fee and Scope check, and neither action). A published API call is 10 when it logs the request and 6 when it does not. The response's credits field is the run's total. See the workflows API, HTTP actions, and automations.

On this page

  • What you'll build
  • Watch the test
  • Build it in the Studio
  • Publish, call it, and activate it
  • If someone already reads the channel
  • Make it yours
  • What it costs

Built on Scope Intelligence: Check whether a requested change is within an agreed statement of work, excluded, or needs a change request.

Keep going

Workflows API
InputRestock reque…Policy Evalua…Open follow-u…Product IDGet productFollow-up noteOpen restock …Monitor noteOutput
Policy Evaluation15 min read

Catch Shopify variants going out of stock and start a restock follow-up

Build a Kovca workflow that starts when a Shopify variant's stock hits zero across every location, checks a restock policy you write, and opens a follow-up or leaves a monitor note.

Read guide
InputOpened?Pull requestPolicy Evalua…Compliant?Gaps commentCommentAdd labelResult
Policy Evaluation28 min read

Check new GitHub pull requests for a description and a test plan

Build a Kovca workflow that starts when a GitHub pull request is opened, checks the title and description against a policy you write, and on a gap comments and adds a needs-description label.

Read guide
InputSeat countRow recordData Quality …Problems?ExplanationsReasonsReview lineReview rowsAppend review…Output
Data Quality Intelligence19 min read

Check new Google Sheets rows for data problems

Build a Kovca workflow that starts when a Google Sheets row is added, checks the cells against rules you write, and appends a review row when the status is not valid.

Read guide
Sign inGet Started