Company churn check
Runs a churn analysis for the company you are viewing and returns a risk score with a suggested next action. This is the on-demand version of Churn risk alerts: same scoring, but for one company at the moment you ask.
Runs: Embedded in Propeller · Trigger: Button · Difficulty: Easy
What you need
- An n8n account. See Set up n8n.
- A Propeller API key.
- Owner access on the Configuration role to create the agent.
How it works
When you run the agent on a company page, the workflow takes the company from the page and compares its last 30 days of orders with the 60 days before. Only orders in the statuses listed in Settings count (default NEW, CONFIRMED, VALIDATED and ARCHIVED, the same as the earlier version). Three signals make up a score from 0 to 100: ordering less often, spending less per order and staying quiet longer than the usual ordering gap.
The reply shows the risk level (low, medium or high), what changed and a suggested action. A high risk suggests a call or visit, a medium risk a check-in message. If the company has too little order history, the agent says so instead of guessing.
Install it
- In n8n, import the downloaded JSON as a new workflow.
- On the Webhook node, set a basic auth credential (a username and password you choose) and copy the production URL.
- Create a header auth credential with your Propeller API key and select it on the Fetch Order Stats node.
- Activate the workflow.
- Go to Admin > Agents and create an agent with Trigger Button and Interaction Mode Single Turn. Under Types, pick
SALES_HUB_COMPANY. Paste the webhook URL and the same basic auth values. See AI Agents. - Open a company, click the Workflows button and run the agent to test it.
In n8n, create a credential of type Header Auth and fill in its two fields exactly like this:
| Field | What to fill in |
|---|---|
| Name | apiKey |
| Value | Your Propeller API key |
Name is not a title you pick yourself. It has to say exactly apiKey, otherwise the workflow cannot sign in. See Set up n8n for the full steps.
An agent type is the page where the agent appears. Stick to the types listed in the install steps: the workflow depends on the data that page sends along, so placing the agent on other pages may not work.
Make it yours
- Windows and sensitivity:
RECENT_DAYS,BASELINE_DAYS,MIN_BASELINE_ORDERSand the threeWEIGHTSin the Settings node. - Which orders count:
ORDER_STATUSESin Settings. Which statuses to include depends on how your team uses order statuses. - Risk levels and suggested actions: the thresholds and texts in the Score & Format node.
Limits
Order counts are exact for any account size. The average order value is calculated over the latest 100 orders of each period; the reply says so when a company has more.
Use it outside n8n
Copy the JSON into an AI assistant and follow Adjust a workflow with an AI assistant.
The workflows and agents in the Agent Hub are free to use and adapt. They are examples, not supported product features, so test them in a staging environment and check the results before using them in production.
Related pages
- Churn risk alerts - the scheduled version that scans all companies
- AI Agents