To post to social media from n8n, either give an n8n AI Agent the Ocoya MCP server (MCP Client Tool → https://mcp.ocoya.com, Bearer auth with an Ocoya API key), or call the Ocoya REST API from an HTTP Request node with the X-API-Key header. Both publish to 20+ networks, and both can also create SEO articles and email campaigns.
Use the MCP route when an AI agent should decide what to post. Use the REST route when the workflow already knows the text and time, such as "new RSS item → post to LinkedIn".
Before you start
- Create an Ocoya account and connect your social channels.
- In Ocoya, open Settings → API and create an API key. It reaches every brand you own or administer, so store it as an n8n credential, never in a node's text.
Option A: an n8n AI Agent with the Ocoya MCP server
- Add an AI Agent node with your chat model.
- Under Tools, add MCP Client Tool.
- Set:
- Endpoint:
https://mcp.ocoya.com - Server Transport: HTTP Streamable
- Authentication: Bearer Auth, with your Ocoya API key as the token
- Endpoint:
- Under Tools to include, pick all, or only the ones the agent needs (for example
ocoya_list_channels,ocoya_create_post,ocoya_schedule_post).
Example system message for the agent:
You manage social media for the brand "Acme" in Ocoya. Always call
ocoya_get_me first to find the brand id, then ocoya_list_channels.
Save posts as drafts unless the input says "publish".
Example input (from a webhook, a form or a schedule trigger):
New blog post: https://acme.com/blog/winter-sale. Write a LinkedIn post and an
X post about it and schedule both for tomorrow 10:00 Europe/London.
The agent calls ocoya_list_channels, ocoya_create_post and ocoya_schedule_post, and returns the post group id and scheduled time, which you can pass to Slack or a sheet in the next node.
Option B: the REST API in an HTTP Request node
Base URL: https://www.app.ocoya.com/api/_public/v1. Every request sends X-API-Key: <your key>.
1. Find your brand and channel ids (run once):
curl https://www.app.ocoya.com/api/_public/v1/brands \
-H "X-API-Key: $OCOYA_API_KEY"
curl "https://www.app.ocoya.com/api/_public/v1/channels?brandId=<brandId>" \
-H "X-API-Key: $OCOYA_API_KEY"
2. Create a scheduled post:
curl -X POST "https://www.app.ocoya.com/api/_public/v1/post?brandId=<brandId>" \
-H "X-API-Key: $OCOYA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"caption": "Our winter sale is live: 20% off until 31 December.",
"mediaUrls": ["https://acme.com/images/winter-sale.jpg"],
"channelIds": ["<linkedinChannelId>", "<xChannelId>"],
"scheduledAt": "2026-12-02T10:00:00Z"
}'
The answer is 201 with {"postGroupId": "..."}. Leave out scheduledAt to save a draft. Add "approvers": ["jane@acme.com"] to require a teammate's approval before it goes out.
In n8n, that is one HTTP Request node: Method POST, the URL above with your brand id, Header Auth credential named X-API-Key, and the JSON body built from earlier nodes, for example {{ $json.title }}.
Let Ocoya's AI write it instead: POST /post/ai creates a draft written in the brand voice, and POST /campaigns plans a whole series. Both use credits.
A complete workflow: RSS to LinkedIn and X
- RSS Feed Trigger on your blog feed.
- HTTP Request →
POST /post?brandId=…with captionNew on the blog: {{ $json.title }} {{ $json.link }}and your two channel ids, noscheduledAt(a draft) or a fixed time. - Slack → "Drafted a post for {{ $json.title }}" with a link to the Ocoya planner.
Also from n8n: articles and emails
The same key reaches the SEO and email endpoints:
POST /seopublishes an article you wrote (Markdown) to WordPress, Wix, Framer, Notion or DEV, andPOST /seo/aihas Ocoya write one.POST /contactsadds a subscriber, andPOST /email/aidrafts an email for your list.
Full reference: docs.ocoya.com and the OpenAPI spec.
FAQ
Is there an n8n node for Ocoya?
Use n8n's built-in MCP Client Tool (pointed at https://mcp.ocoya.com) or the HTTP Request node with the REST API. Both are covered above.
Which is better for n8n, MCP or REST?
REST for fixed workflows where you already have the text; MCP when an AI Agent node should decide what to write and where to post.
How do I authenticate?
With an Ocoya API key from Settings → API: X-API-Key for REST, and Bearer auth (or X-API-Key) for the MCP server.
Can n8n post to Instagram and TikTok through Ocoya?
Yes, to any channel connected in Ocoya, including Instagram, TikTok, Facebook, LinkedIn, X, YouTube Shorts, Pinterest, Threads and Bluesky.
What does the API cost?
API access works on Ocoya's plans; publishing uses 1 credit per post however many channels it goes to, and paid plans start at $29 a month with 300 credits and a 7-day free trial.










