SmartERP Documentation An Ashewa Technology Solutions Platform

The publishing gate

Exactly when a post is allowed to go out, and what happens when it is not.

The base module's Publish button is wrapped in a gate. Before any platform is called, the gate asks one question: has a human or an eligible agent cleared this post? If not, nothing is sent, the refusal is logged, and the person or job that tried is told why.

The decision, in order#

The gate evaluates these in order and stops at the first that applies.

#SituationOutcome
1The post is already PostedPasses through. The base module raises its own, more specific message.
2The user is a ManagerAllowed. A manager publishing by hand is the approval.
3The post is Approved or ScheduledAllowed. A human already cleared it.
4The post has a Handled By agentThe agent's guardrails decide. Allowed, or refused and logged.
5Anything elseRefused: "This post has not been approved. Submit it for approval, or ask a Social Media Manager to publish it."

What gets logged#

Every outcome writes to the activity log:

OutcomeLog entryApproval status
Refused by an agent's policyPublish Blocked, with the reasonBlocked - Needs Human
Published successfullyPublishedHuman Approved, or Auto-Approved by Autonomy when an agent published without prior approval
The platforms raised an errorPublish Failed, with the erroras above

A blocked entry is written before any platform is called. Blocked attempts are recorded as carefully as successful ones.

Managers and the audit trail#

A Manager's publish is allowed, and the log records it as Human Approved. The gate does not add friction for managers; it makes the decision visible.

Scheduled and external publishing#

  • The scheduled action publishes Scheduled posts. Case 3 above lets them through, because a human scheduled them.
  • An n8n workflow that publishes outside Odoo and reports back through the result webhook sets the post to Posted or Failed directly, and logs it as Auto-Approved by Autonomy with trigger "n8n auto-publish workflow". The gate does not run for publishing that happens outside Odoo, so only let n8n publish posts that are already Scheduled. The due webhook returns exactly those.

Important

The gate protects publishing through Odoo. If you also give another system credentials for the same platforms, that system is outside it.

Why a post might be refused#

You seeLikely causeFix
"Agent 'X' is not active"The agent is Paused or Not Deployed.Activate it, or have a Manager publish.
"…runs at 'Approval Required' autonomy, so a human must approve…"The agent's level is below Semi-Autonomous.Submit for approval.
"…requires human approval for posts containing media."The post has an attachment.Submit for approval, or turn off the agent's media rule.
"…reached its daily limit of N posts"The cap is used up.Wait until tomorrow, raise the cap, or have a Manager publish.
"This post has not been approved…"No agent and no approval.Submit for approval.
Last updated: 2026-10-16