Skip to main content
Version: Peki

Approvals

Approvals let your team check an action before it happens. When an action needs approval, the agent doesn't run it: it creates a request with the exact values, and a teammate approves, edits and approves, or rejects it in the Inbox. Use approvals for actions with real consequences: booking an appointment in your calendar system, issuing a refund, saving a lead, sending an automated message to customers.

Approvals are off by default and you turn them on per action.

What can require approval​

ActionWhere to turn it onSetting
An HTTP toolTools → the toolNeeds approval
A FunctionTools → the FunctionNeeds approval
Saves to a record tableRecords → Table settings → CollectingSaves need approval
An automation's Telegram messageAutomations → Setup → NotifyApprove each message before it is sent
An automation's action FunctionThe Function's Needs approval(the action becomes a request)

The settings of tools, Functions and tables are part of the agent's draft: they reach customers when you publish. The automation setting applies as soon as you save the automation.

The Copilot can turn these on for you, and asks you on a card first.

When rejected​

Tools, Functions and tables also have When rejected (for tables: When a save is rejected):

OptionWhat happens after a rejection
Tell the customer (default)"The agent tells the customer politely that it can't be done."
Stay silent / Say nothingThe agent doesn't write to the customer.

What happens when an action needs approval​

  • In a conversation, the agent is told the action was "submitted to the team for approval; it has not happened yet", and tells the customer briefly that the team will confirm.
  • In an automation, the run goes on and the action waits. The run shows Waiting for approval or Action waits for approval.
  • The fill after a conversation asks once per change, not on every run.

Where approvals show up​

Open the agent's Inbox and the Approvals tab. Pending requests add to the Inbox badge in the sidebar.

The left side lists requests: switch between Pending (newest first; expired ones drop out) and Decided. Each row shows the kind (Tool, Function, Record, Message), a short preview of the action, and when it expires. Requests that came from a test conversation or a draft run carry a Test tag; they run against the draft.

Click a request to see:

  • who asked: by the agent in a conversation, by the fill after a conversation, by a Function or by an automation, and when,
  • links: Open conversation, Open record, Open automations,
  • for a webhook or event automation, a masked preview of what started the run,
  • the Values the action will run with. For a message, the text and "Goes to N Telegram chats."

Telegram notices​

Your team can get a Telegram message for each new request, through the agent's own bot:

  1. On the Approvals tab, click Notify.
  2. Pick the team chats. Only chats that have messaged the agent's bot are offered: send the bot a message from the chat you want first.
  3. Click Save.

The notice names the agent, the kind and name of the action, and a link to the request in Peki. It never includes the values, since they can hold customers' data. If you pick no chats, notices go to the chats your automations notify. "Approving happens only in Peki."

Approve, edit or reject​

Editors, admins and owners decide. Viewers and operators see "Editors and admins approve or reject requests." Decisions are made by people in Peki; API keys can't decide.

ButtonWhat it does
ApproveRuns the action once with exactly the stored values.
Edit and approveOpens a form built from the action's inputs. Change values, then approve.
RejectAsks for an optional Reason (up to 500 characters) and closes the request without running it.

What you can edit:

  • A tool or Function call: its input values, checked against the tool's definition.
  • A record save: the field values. The target record stays the same. Files are approved as sent.
  • A message: only the text. The chats stay the same.

After the decision:

  • Approved: the action runs once. Its result is stored on the request (Result). If it came from a conversation, the agent writes a follow-up to the customer based on the result.
  • Approved, but it failed: the error is shown, and the agent tells the customer it couldn't be done.
  • Rejected: the agent tells the customer politely, or stays silent, per When rejected. The reason is passed on to the agent.
  • For an automation message, approving sends it to the chats, and the run turns into Sent to N chats. Rejection or expiry marks the messages "Not sent".

No follow-up is written when the conversation was taken over by a person, or for automation runs.

Every decision is recorded in the audit log, and decisions on record saves also appear in the record's History.

One decision only

A request is decided once. If two teammates click at the same time, only one decision counts and the other gets "This request was already decided".

Expiry and changes​

SituationWhat you seeWhat to do
Nobody decided within 24 hoursExpired: "Expired: nobody decided within 24 hours."Nothing runs. Ask the customer again if needed.
The action changed since the request (a new published version changed the tool, Function or table)"This action changed since it was requested. Check the values, then approve again."Review the values and approve again.
The action no longer exists (removed or turned off, or the automation is paused or deleted)"This action no longer exists in the agent, so approving it would fail. Reject it instead."Reject it.
The service stopped in the middle of an approved actionFailed with "outcome unknown (interrupted)"Check the other system. Peki never runs it a second time.

The Decided view lists the latest 200 decided requests.

Events​

Each decision (approve or reject, not expiry) emits the Peki event Approval decided (approval.decided), which can start an automation. See Triggers.