n8n can follow your IQCore organization with one small workflow. This guide shows how to import it and what each part does.
The IQCore API is in private beta. To join, ask through Support in your dashboard or on the contact page.
What you get
The file has three flows:
- Events loop. A schedule trigger runs every minute. It reads a saved cursor, calls
GET /events, sends each event to the step that handles its type, saves the new cursor and repeats while there are more events. - Create post. A manual trigger sends
POST /postswith anIdempotency-Keyand anexternal_ref. - Daily reconcile. A once-a-day check with
GET /posts?updated_since=, to catch the rare lost event.
The "Your code" nodes are placeholders. Replace them with your own steps: a database write, a Slack message, an e-mail.
Import it
- Download the workflow: iqcore-workflow.json.
- In n8n, open Workflows, choose Create workflow, then the menu (three dots) and Import from file. Pick the downloaded file.
- The base URL in the HTTP Request nodes is already
https://iqcore.ai/api/public/v1.
Add your key as a credential
Create an API key in IQCore (Settings → Apps & integrations → API keys). Give it the scopes the workflow needs: social.read for events, posts and channels, and social.write for creating posts. See Authentication. The key is shown once.
In n8n:
- Open Credentials and choose Create credential.
- Pick Header Auth.
- Set Name to
Authorizationand Value toBearer iqk_live_XXXX(your real key afterBearer). - Save it as
IQCore API key. - In the HTTP Request nodes Get events, Create post and List changed posts, choose this credential.
Use a test key (iqk_test_...) first if you want to try the "Create post" flow without a real post. See Test keys and dry run.
The polling loop, step by step
This is what the first flow does, node by node.
- Every minute (Schedule Trigger).
- Read cursor. A Code node reads
$getWorkflowStaticData('global').cursor. n8n keeps this value between runs. On the first run it is empty, and the node leavessinceout, so IQCore starts at the oldest event it keeps. - Get events.
GET https://iqcore.ai/api/public/v1/eventswithlimit=100andsince(when there is a cursor). The node uses the credential and has Continue on fail and "Never error" on, so a410or a429reaches the next node as data instead of stopping the run. - Cursor expired (410)? An IF node on the status code. See The 410 branch.
- Status 200? Another IF. Anything else (
401wrong key,429rate limited,5xx) goes to the "handle the error" step. Do nothing special for429and5xx: the next minute tries again. For401, tell a person. - Split events puts each element of
body.datainto its own item. - Which event? A Switch on
type:post.published: writedata.permalinkanddata.platform_post_idto your records. Matchdata.post_idwith theidthatposts_creategave you, or look the post up withGET /posts?external_ref=.post.failed: tell a person.data.error_codegives the code. CallGET /posts/{data.post_id}for the reason.channel.needs_reconnectandchannel.expiring: tell a person to open the channel'sreconnect_url(GET /channels/{data.channel_id}).credits.low: buy credits or pause spending.- anything else: ignore it. New event types can be added, so always keep this fallback.
- Save cursor. After the events were handled, a Code node saves
next_cursorinto the static data. - More pages? If
has_moreistrue, the flow goes back to step 2 at once and reads the next page. Otherwise it waits for the next minute.
Why save the cursor last? If n8n stops in the middle of your handling, the next run reads the same page again. Nothing is skipped. The price is that an event can arrive twice, so make your steps safe to repeat (a post id or an event id is a good dedupe key). See Events.
The workflow runs its branches one after the other from top to bottom (Settings → Execution order: v1). Keep "Split events" above "Save cursor" on the canvas, so the events are handled before the cursor moves.
Several organizations
The file keeps one cursor, for a key with one organization. A key that works in several organizations (an agency) needs organization_id in the query and one cursor per organization. Store them as an object in the static data, for example data.cursors[orgId], and run the loop once per organization (a Loop Over Items node with the list from GET /organizations).
The create post branch
The second flow starts with Run by hand. The Create post node sends:
{
"channel_ids": ["PASTE_CHANNEL_ID"],
"caption": "New in the shop today.",
"media_ids": ["PASTE_MEDIA_ID"],
"scheduled_at": "2026-12-20T09:00:00Z",
"external_ref": "n8n:example:1"
}Replace the ids and the time. scheduled_at must be 1 minute to 365 days ahead. The header Idempotency-Key is set to the n8n execution id ({{$execution.id}}), so a retry of the same execution does not create a second post. For work you may repeat in a new execution, build the key from your own data (for example the product id) and keep external_ref stable. The node never errors, so the next step sees the answer:
201: the draft was created.body.idis the post id.409 external_ref_exists: the post already exists.body.error.existing_idis its id.- Next, call
POST /posts/{id}/request-approval(orapprove). In the default approval mode,approveanswers202: a person approves the post in IQCore. See Post states and approval.
Get the channel ids from GET /channels and the media ids from POST /media (see Media).
The 410 branch
IQCore keeps events for 30 days. If the workflow was off for longer, GET /events answers 410 cursor_expired with error.oldest_cursor. The workflow handles it:
- The IF node sees status
410. - Reset cursor to oldest_cursor saves
error.oldest_cursoras the new cursor. - The placeholder Your code: reconcile after 410 is where you list
GET /posts?updated_since=<the last good time>and fix your records, because you missed events.
The next minute, the loop continues from the new cursor.
The daily reconcile
The events feed gives every event exactly once while you follow it, but an event can be lost in the rare case that IQCore's server stops between a change and its event. Once a day, Every day 03:00 takes the time of the last run (or the last 26 hours the first time), and List changed posts calls GET /posts?updated_since=...&limit=50. Compare the posts with your records. If has_more is true, call again with cursor=next_cursor. See Pagination.
Troubleshooting
| You see | Cause |
|---|---|
401 invalid_api_key |
The credential value is wrong. It must be Bearer and the key, with one space. |
403 missing_scope |
The key lacks a scope. The error has required_scope. |
400 organization_required |
The key has several organizations. Add organization_id. |
429 rate_limited |
Too many calls. Wait for Retry-After. See Rate limits. |
| The same events again | The cursor was not saved. Check the static data (static data is saved only when the workflow is active and runs from its trigger, not in a manual test). |
Next: Events, Idempotency and external_ref, Quickstart.