Connect Your Own App to Cogny Automations — From Any Coding Agent
Cogny automations are scheduled agents that act through tools you have greenlit. Until now those tools came from the integrations we ship: Google Ads, Meta, GA4, Discord and the rest. But a lot of the work worth automating lives in your own app. It's in a booking system, a member database, or an admin panel that no SaaS integration will ever reach.
Now you can point an automation at your own app. Expose it as an MCP endpoint, register it with Cogny, and the automation calls it like any other integration. A coding agent in your codebase (Claude Code, Codex, Cursor) can do the whole setup from the terminal. Nobody has to click through the dashboard.
Full guide: Connect your own app to Cogny automations.
TL;DR
add_custom_mcp_serverregisters your app's MCP endpoint (HTTPS, API key sent as a Bearer token) and lists its tools immediately.create_automation,update_automation,run_automationandget_automation_runare on the Cogny MCP server and the Cogny CLI. An agent can build, test and schedule an automation end to end.- Dry runs:
run_automationwithdry_run: trueruns with no write authority. The agent reads your data and reports what it would do. - Per-schedule timezones: every schedule takes an IANA timezone, like
America/New_York. The default stays Europe/Stockholm. - Explicit pre-approved tools: each automation shows the exact tool list every run gets. You can name its read tools yourself.
- Included with Cloud. Every run is a ticket with a full transcript, and runs use your workspace's credits like any agent run.
An example: the member who stops showing up
Take a martial-arts school, a gym or a dance studio. The pattern is the same everywhere: a member who misses two weeks is likely to quit. Someone should notice and reach out before that happens, and in a busy week nobody does.
The school's app already knows who came to class. So it exposes six tools over MCP:
| Tool | Kind |
|---|---|
get_retention_report — members not seen in 14 days, with make-up class options | read |
get_student — notes, history, messages already sent | read |
list_class_schedule | read |
book_makeup_class | write |
send_parent_text — refuses without consent or outside 8am–9pm, queues for staff approval if asked to | write |
log_parent_message | write |
A weekly automation calls the report, books a make-up class for each member at risk, and texts the family in the instructor's voice. Where there's no texting consent, it leaves a note that someone should call. It ends with a summary for the owner: who was contacted, what was booked, who needs a phone call.
The consent check, the quiet hours and the approval queue live in the app's send_parent_text tool, not in the prompt. A prompt can be misread. An endpoint that refuses the call can't be talked out of it.
Set it up from a coding agent
The user gives the agent an API key from Settings → Data & Integrations → Connect AI Clients. The agent logs in with the CLI and works from there:
npx @cogny/cli login --api-key <key>
cogny tools call add_custom_mcp_server --input '{
"name": "Studio", "server_url": "https://example-studio.com/api/agent/mcp", "api_key": "<endpoint key>"
}'
cogny tools call create_automation --input '{
"name": "Weekly retention",
"crontab": "0 10 * * 1",
"timezone": "America/New_York",
"instructions": "…",
"action_grants": [
{ "server_name": "Studio", "tool_name": "book_makeup_class" },
{ "server_name": "Studio", "tool_name": "send_parent_text" },
{ "server_name": "Studio", "tool_name": "log_parent_message" }
]
}'
cogny tools call run_automation --input '{ "automation_id": "<id>", "dry_run": true }'
cogny tools call get_automation_run --input '{ "ticket_id": "<ticket_id>" }'
The automation is created disabled. The dry run shows every tool call the agent made and what came back, so the coding agent can fix the endpoint or the instructions and try again. Once the user has read the dry-run summary and agreed, the agent runs it once for real and turns the schedule on with update_automation.
Timezones per schedule
A crontab is only as good as the clock it runs on. Every schedule now carries its own timezone, and that includes reports, not just automations. 0 10 * * 1 in America/New_York means 10:00 on Monday in New York, including across daylight-saving changes. In the dashboard, the schedule picker in an automation's or report's settings has a Timezone selector.
If you leave it out, schedules keep running on Europe/Stockholm time, as before. For a business in another timezone, always set it.
Exactly which tools a run can call
Each automation now shows its pre-approved tools: the full list every run is offered, and nothing else.
- Write tools are the ones you grant, one by one. A grant can pin an input to a fixed value, such as one Discord channel or one campaign. A call with any other value is refused when it's made.
- Read tools are either the list you set with
read_tools, or, by default, the tools on the granted integrations that are recognisable as reads. That means names starting withget,list,searchand similar, or tools the server annotates as read-only.
create_automation and list_automations both return the list, so you can see what a run will be allowed to do before it runs.
Availability
This is live now for Cloud workspaces. The dashboard's New Automation dialog covers the simple case, one tool per job. Several write tools and explicit read tools are set through the in-app chat or the MCP/CLI tools above. If you don't see New Automation under Reports → Create new, contact support.
Start with the guide: Connect your own app to Cogny automations. If your agent hasn't used Cogny before, point it at cogny.com/SKILL.md first.