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.
| # | Situation | Outcome |
|---|---|---|
| 1 | The post is already Posted | Passes through. The base module raises its own, more specific message. |
| 2 | The user is a Manager | Allowed. A manager publishing by hand is the approval. |
| 3 | The post is Approved or Scheduled | Allowed. A human already cleared it. |
| 4 | The post has a Handled By agent | The agent's guardrails decide. Allowed, or refused and logged. |
| 5 | Anything else | Refused: "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:
| Outcome | Log entry | Approval status |
|---|---|---|
| Refused by an agent's policy | Publish Blocked, with the reason | Blocked - Needs Human |
| Published successfully | Published | Human Approved, or Auto-Approved by Autonomy when an agent published without prior approval |
| The platforms raised an error | Publish Failed, with the error | as 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
duewebhook 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 see | Likely cause | Fix |
|---|---|---|
| "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. |