Developers
Build n8n, Make, and custom automation workflows
Build review-first draft intake, draft digests, source-to-draft workflows, publication receipts and review-driven scheduling with Krevaya REST and MCP.
Updated
On this page
- Use an HTTP node with stored credentials
- Recipe: turn a sheet, form, or CRM record into a draft for review
- Recipe: send yourself a draft review digest
- Recipe: turn an approved article into drafts
- Recipe: update a campaign record after publication
- Recipe: schedule an approved draft with MCP
- Prevent duplicates across retries
Use an HTTP node with stored credentials
Krevaya works with the generic HTTP request step of workflow tools, such as n8n's HTTP Request node or Make's HTTP module. Krevaya has no n8n community node or Make app, so every recipe here, and the published n8n template below, uses plain HTTP requests. Set the API base to https://api.krevaya.com and store the key as a secret credential used in the Authorization header. Keep create, approval, and schedule steps distinct in your workflow so it is clear which step can cause publication.
For a workflow that should only ever create drafts, create a key with the Drafts for review preset in Settings → API keys & MCP. It has the read and draft scopes: it can list brands and posts and create drafts, but cannot approve, schedule, publish, generate, or upload media.
To start from a ready workflow, use the n8n template Create Krevaya review drafts from webhook events without duplicates. It turns authenticated webhook events from another app into Krevaya drafts that wait for human review. Each draft request carries an Idempotency-Key built from the event's ID, revision, brand, and platform, so when the same event is retried, Krevaya returns the draft it already created instead of making a duplicate. The workflow is built from n8n's own nodes and calls Krevaya with the built-in HTTP Request node and a Drafts for review key; there is no Krevaya node to install.
Recipe: turn a sheet, form, or CRM record into a draft for review
- Call GET /v1/automation/brands once and store the brand's id as text.
- For each ready record, send POST /v1/automation/drafts with brand_id, platform, and body (optional hashtags, kind, and asset_ids). Set an Idempotency-Key header to a stable value for that record, such as content-sheet:row-42:linkedin:v1.
- Save the returned id on your record. A new draft returns 201; repeating the same request with the same Idempotency-Key returns 200 with the header Idempotency-Replayed: true and creates nothing.
- Use a new Idempotency-Key only when you intend another draft. The same value with different content returns 409, and a value whose draft was deleted returns 410.
curl --fail-with-body https://api.krevaya.com/v1/automation/drafts \
-H "Authorization: Bearer $KREVAYA_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: content-sheet:row-42:linkedin:v1' \
--data '{"brand_id":"YOUR_BRAND_ID","platform":"linkedin","body":"Three questions we ask before every repair estimate."}'The Idempotency-Key value takes 8–200 characters: letters, digits, and . _ : / -. These drafts return requires_review: true and always wait for a person in Krevaya, even when the brand's Publish mode is Auto.
Recipe: send yourself a draft review digest
- Trigger on your desired review schedule.
- GET /v1/posts with status_filter=draft, an explicit brand_id, and limit=25. Use a read-scoped key.
- Map each returned post's id, platform, body, and status into your own review system.
- Record a reviewer decision against the exact post ID. If you later add a scheduling step, re-read the post before acting.
This recipe only needs read access until it begins changing posts. GET /v1/posts has no pagination cursor; it returns up to 100 rows. To page through more, use GET /v1/automation/posts with brand_id, status=draft, and limit, then pass next_cursor as before. Use a manageable review batch rather than assuming one request is a full historical export.
Recipe: turn an approved article into drafts
- Start from an article or source text your team chose to repurpose.
- Call POST /v1/generate with url or text, the intended brand_id, and a specific instruction, such as ‘Use the troubleshooting section; keep the original limitations.’
- Store source_id and post_ids in your source record. The call is synchronous; configure the HTTP node's timeout accordingly.
- Read and review the generated drafts. Check factual claims and any dates, prices, or promises against the source.
- Schedule only after the reviewer approves the relevant posts.
Always pass brand_id. Without it, generation uses the brand currently selected in the dashboard, and concurrent workflows spanning multiple brands should not rely on whoever last selected one. Generation uses AI credits and has no idempotency key, so turn off automatic retries for this step.
Recipe: update a campaign record after publication
- On a schedule, call GET /v1/automation/events with brand_id, after set to your stored cursor (0 the first time), and limit=100. Use a read-scoped key.
- For each event, look up your campaign record by the saved post_id. Upsert by event_id so a repeated poll cannot send a second notification or invoice.
- On post.published, save permalink_url when present. On post.failed, store error and route it to a person for review.
- After processing the whole page, store next_cursor and send it as after on the next run. A 410 means the cursor passed the 30-day retention: reconcile with GET /v1/automation/posts, then start again from after=0.
Signed webhooks deliver the same outcomes as they happen, but they are registered only through a signed-in Krevaya session and there is no settings screen yet; ask Krevaya support in chat to set one up. If you use one, verify X-Krevaya-Signature against the raw body before acting on it. A workflow tool's webhook trigger does not check that signature by itself, so place a small verification receiver in front of the workflow. A shared-secret URL is not a replacement for the signed-body check.
Recipe: schedule an approved draft with MCP
A key-based integration can call MCP tools directly over HTTP. The helper below requests JSON responses and checks both protocol errors and tool errors. It shows a read-only get_post call; add schedule_post only at your reviewer's approved transition.
// Node.js 20+, run as an .mjs file.
const key = process.env.KREVAYA_API_KEY;
const postId = process.env.KREVAYA_POST_ID;
if (!key || !postId) throw new Error('Set KREVAYA_API_KEY and KREVAYA_POST_ID');
let nextId = 1;
async function rpc(method, params, notification = false) {
const message = { jsonrpc: '2.0', method, params };
if (!notification) message.id = nextId++;
const response = await fetch('https://api.krevaya.com/mcp', {
method: 'POST',
headers: { Authorization: `Bearer ${key}`, 'Content-Type': 'application/json', Accept: 'application/json' },
body: JSON.stringify(message),
});
const text = await response.text();
if (!response.ok) throw new Error(`${response.status}: ${text}`);
if (!text) return;
const body = JSON.parse(text);
if (body.error) throw new Error(JSON.stringify(body.error));
if (body.result?.isError) throw new Error(JSON.stringify(body.result.content));
return body.result;
}
await rpc('initialize', {
protocolVersion: '2025-06-18', capabilities: {},
clientInfo: { name: 'review-workflow', version: '1.0' },
});
await rpc('notifications/initialized', {}, true);
const result = await rpc('tools/call', { name: 'get_post', arguments: { post_id: postId } });
console.log(result.structuredContent ?? result.content);For the approved transition, call tools/call with name: schedule_post and arguments containing post_id plus an optional future when. Omit when for the next free slot. Scheduling through an external key also approves a draft or rejected post; protect that step with the actual review decision. A Pinterest, TikTok, Tumblr or YouTube draft is refused: the user approves those in Krevaya.
Without MCP, the same steps are plain HTTP requests with a publish-scoped key: GET /v1/posts/{post_id} to re-read the post, then POST /v1/posts/{post_id}/schedule with a future schedule_at that includes Z or a UTC offset, plus approve: true for a draft or rejected post. REST does not pick a time for you.
Prevent duplicates across retries
POST /v1/posts accepts an optional Idempotency-Key header (1–128 printable ASCII characters without spaces) and then requires brand_id. Repeating the same request with the same Idempotency-Key returns the original receipt, marked idempotency_replayed: true, instead of creating a second post; the same value with a different body returns 409. With a lineup, each channel keeps its own receipt, so a retry creates only the posts that are missing. POST /v1/automation/drafts always requires its own Idempotency-Key, as described above.
Derive the Idempotency-Key from a unique workflow ID in your own database, and store the returned post ID before advancing. Other writes, including POST /v1/generate and asset imports, have no idempotency key: if one of those times out with an unknown outcome, inspect Krevaya before repeating it. Retry transient read failures with backoff, but do not retry such a write just because its response was lost.
Frequently asked questions
Is there an official Krevaya n8n node or Make app?
No. Krevaya has not published an n8n community node or a Make app. It has published one n8n workflow template, Create Krevaya review drafts from webhook events without duplicates, which uses n8n's built-in HTTP Request node; the link is under “Use an HTTP node with stored credentials” above. For anything else, use the generic HTTP request step with a stored Bearer API key and call the public REST or MCP endpoint.
Can I retry a create-post request after a timeout?
Yes, if the original request carried an Idempotency-Key header and brand_id: repeating it with the same key returns the original post instead of a duplicate. Without a key, first check whether it created a post, because an automatic repeat can create a duplicate.