Automate with n8n
Connect heycreo to the hundreds of apps n8n works with: a new row in a content plan, a product in your shop or a form entry becomes a finished design, and the file goes on to Slack, e-mail or your CMS.
There are two ways, and you can combine them:
- An AI agent with heycreo as a tool. The agent reads the request in plain words, picks a template and fills it. Good when every request is a little different.
- Fixed steps without AI. HTTP requests to the REST API do exactly the same thing every time. Good for a known template and structured data.
You need n8n 1.122 or later, cloud or self-hosted, and a heycreo API key of a service account, from Settings → Developers → Service accounts. For the AI agent below, MCP must be allowed for it (it is by default), with the toolsets the agent uses.
1. Create the credential
In n8n, create a credential of type Multiple Headers Auth with two headers:
| Name | Value |
|---|---|
Authorization | Bearer heycreo_… |
X-heycreo-Org | your workspace's slug, the name in its address: app.heycreo.io/<slug>/… |
Name it "heycreo". Both kinds of workflow below use it.
2. An agent that makes designs
The workflow: a trigger, an AI Agent with a chat model and heycreo as its tool, then wherever the result should go.
-
Trigger. For example Google Sheets → On row added on your content plan, with columns such as Channel, Headline and Text.
-
AI Agent. Set the Prompt to the row, for example:
PromptCreate a {{ $json.Channel }} design. Headline: {{ $json.Headline }}.
Text: {{ $json.Text }}. Export it and answer only with the file's link.Under Options → System Message:
System MessageYou create marketing material in heycreo. Always start from one of the
workspace's templates. Never invent colors, fonts or logos. -
Chat Model on the agent: any model n8n offers, for example Anthropic Chat Model.
-
Tool on the agent: MCP Client Tool with
Field Value Endpoint https://app.heycreo.io/api/mcpServer Transport HTTP Streamable Authentication Multiple Headers Auth, credential "heycreo" Tools to Include Selected: get-templates,create-template-design,set-template-design-controls,studio-export,get-exportsOptions → Timeout 120000 -
Output. Pass
{{ $json.output }}, the agent's answer with the link, to Slack, Gmail or a column in the same sheet.
Selecting the tools keeps the agent to what this workflow is for: it can make and export designs, but cannot delete, publish or change settings. In the agent's tools panel you can also require a person's approval before a tool runs.
3. Fixed steps without AI
When the template is always the same, use HTTP Request nodes. They need no AI and cost nothing per run. In each node, set Authentication to Generic Credential Type → Bearer Auth with the heycreo API key; the workspace is part of the URL here, so no second header is needed.
-
Create the design. An HTTP Request node named Create the design, method
POST, URLhttps://app.heycreo.io/api/organizations/ORGANIZATION_ID/posts, Send Body with Body Content Type JSON and Using JSON. Switch the JSON field to Expression so the{{ }}parts are filled in:Body{
"name": "{{ $json.Headline }}",
"templateId": "TEMPLATE_ID",
"sizes": ["instagram-post"],
"scopedValues": [
{
"kind": "control",
"scope": {},
"controlId": "HEADLINE_CONTROL_ID",
"value": { "valueType": "text", "value": "{{ $json.Headline }}" }
}
]
} -
Start the export. HTTP Request, method
POST, URLhttps://app.heycreo.io/api/organizations/ORGANIZATION_ID/posts/{{ $json.id }}/exports, body{}. -
Collect the file, in one of two ways:
- Wait a minute, then HTTP Request
GET …/posts/{{ $('Create the design').item.json.id }}/exportsand readimageUrlorvideoUrlof the export whosestatusiscompleted. - Better for videos: a second workflow that starts with a Webhook node and receives heycreo's
export.completedevent. See below.
- Wait a minute, then HTTP Request
Create and export a design explains the request bodies and where the IDs come from.
4. Receive heycreo's events
A workflow can start when heycreo reports that something is done: an export rendered, a file uploaded, a post published.
- Add a Webhook node: HTTP Method
POST, a Path such asheycreo, Respond Immediately. Turn on Options → Raw Body if you check the signature (below). - Publish the workflow and copy its Production URL.
- In heycreo, open the service account under Settings → Developers → Service accounts and, on its Webhooks tab, add that URL as an endpoint and subscribe to the events you need, for example
export.completed. - After the Webhook node, an If or Switch node on
{{ $json.body.type }}routes the events; the file of a finished export is in{{ $json.body.data.export.videoUrl }}orimageUrl.
heycreo signs every delivery. To reject requests that do not come from heycreo, check the signature in a Code node as shown in Webhooks. On self-hosted n8n, the Code node may only use Node's crypto module once NODE_FUNCTION_ALLOW_BUILTIN=crypto is set.
See also
- Wait for exports with webhooks
- Check designs with n8n before approval: an AI model checks every design before a person approves it
- MCP tool reference
- n8n: MCP Client Tool and MCP Client