Recipes8 min readUpdated 2026-06-29

Sync Tray.io with WordPress using n8n

Build a production Tray.io ⇄ WordPress sync in n8n — auth, dedupe, retries and monitoring.

Key takeaways

  • Keep Tray.io the source of truth, mirror to WordPress.
  • Dedupe on stable IDs — never on display names.
  • Alert on drift daily, not per-event.
  • Version the workflow JSON in Git.

Syncing Tray.io with WordPress is one of the highest-leverage automations you can build in n8n. Done right it removes a whole class of copy-paste work; done wrong it creates duplicate records for a decade. This guide shows the exact n8n pattern that survives production.

Pick a source of truth

Before touching n8n, decide which system owns each field. In most ipaas setups Tray.io owns identity while WordPress owns lifecycle state — but yours may differ. Write it down, get sign-off, then build.

A one-page conflict table pays for itself the first time an edit collides.

Wire up n8n

Create credentials for both Tray.io and WordPress. Add a webhook trigger where the platform supports it, polling elsewhere. Normalise both payloads to a common shape with a Set node before any writes.

Add an idempotency key based on the Tray.io record ID so replays never double-write.

  • Trigger
  • Normalise
  • Lookup counterpart record
  • Upsert
  • Log

Two-way vs one-way

Start one-way, Tray.io → WordPress. Prove correctness for a week. Only then add the reverse direction, with a loop-breaker (e.g. a last-updated-by flag) so events don't ping-pong.

Monitor, don't hope

Send a daily drift report — count of records in Tray.io minus matched records in WordPress. Alert if drift crosses a threshold. Silent syncs erode trust faster than loud failures.

Frequently asked questions

Do I need queue mode?
Only above roughly 10k events per day. Below that, a single n8n instance handles Tray.io ⇄ WordPress comfortably.
How to handle deletions?
Soft-delete in WordPress with a tombstone field. Never hard-delete on receipt of a Tray.io delete — you'll lose audit trail.
What if schemas drift?
Fail closed — the workflow should stop, alert and wait for a human. Silent schema drift is the #1 source of bad data.
Can I self-host this?
Yes. Any n8n deployment (Docker, Coolify, Railway) works for a Tray.io ⇄ WordPress sync of this shape.
HomePathTemplatesBlogAllMy