🔄 amoCRM connector
The amoCRM connector brings your amoCRM leads, contacts, companies and pipelines into TSync. You connect once (a secure OAuth login), preview what will be imported, then import — and from then on new changes can flow in automatically through webhooks.
Open it from Integrations → amoCRM in the sidebar, or Configuration Center → Integrations → amoCRM.
The connector is off until you turn it on. Nothing talks to amoCRM until you enable it and connect an account.
What you need from amoCRM
In your amoCRM account, create a private integration (Settings → Integrations → create your own). You will get:
- a Client ID (integration ID),
- a Client secret,
- and you'll paste a Redirect URI that TSync gives you.
Keep the amoCRM tab open — you'll copy a couple of values back and forth.
Step 1 — open Settings and copy the callback URL
Go to amoCRM → Settings. At the top you'll see your OAuth callback URL — TSync builds it automatically from your instance address, so it is always correct for your domain:
{TSYNC_BASE_URL}/tsync_amocrm/oauth/callback
Example: https://your-erp.example.com/tsync_amocrm/oauth/callback
Use the Copy button next to it, then paste it as the Redirect URI in your amoCRM integration. The Test callback button opens the address to confirm it answers — it shows a small "amoCRM OAuth callback ready" page (that's normal, not an error).
HTTPS is required for live OAuth. amoCRM only redirects to a public https:// address. If your instance shows a non-HTTPS callback URL, TSync displays a warning — that address works for local testing only.
Step 2 — add a connection
Still on Settings, click Add connection and fill in:
- Connection name — anything you recognise, e.g. "Main amoCRM".
- Base URL — your account address, e.g.
https://yourcompany.amocrm.com. - Client ID and Client secret — from amoCRM. The secret is stored encrypted and never shown again; if you leave the masked dots, the saved secret is kept.
- Sync mode — Manual, Cron or Webhook.
- Direction — start with amoCRM → TSync.
- Optional: a default assigned staff and a default lead source for imported leads.
Click Save.
Step 3 — connect (authorize)
Click Connect amoCRM. You'll be sent to amoCRM to approve access, then returned to TSync. When it works, the connection shows connected and the tokens are stored (encrypted). You can press Test connection any time to confirm it still works.
If a token ever expires, TSync refreshes it automatically. If it can't, the connection is marked degraded and you simply press Connect again.
To unlink an account, press Disconnect on the connection. This removes the stored token from TSync and marks the connection disabled — it stops talking to amoCRM but keeps your settings, so you can press Connect again later (it does not delete anything in amoCRM). To remove a connection entirely, use Delete on Settings.
Step 4 — preview the import
Open the connection's Import preview. This is a dry run — it changes nothing. It shows how many leads would be created, updated, skipped (already there) or flagged for manual review (a possible duplicate), plus a small sample so you can check the mapping looks right.
When you're happy, click Run import. After it finishes you land on the Sync state page, which lists each import run with its time and the result (pulled · created · updated · review · errors), plus the total number of records currently linked between amoCRM and TSync. Use it to see at a glance how the last imports went.
How duplicates are avoided
TSync never blindly creates a duplicate. It matches an incoming amoCRM lead to an existing TSync lead in this order:
- a previous link to the same amoCRM record,
- the same phone number (compared in a normalized form, so
069 123 456and+373 69 123 456count as the same), - the same email,
- same name with a matching phone/email → flagged for manual review (never auto-merged).
Phone numbers are normalized for Moldova and Romania.
Step 5 — keep it in sync with webhooks
After the first import, turn on webhooks so new and changed leads flow in automatically.
On the Webhooks page you'll see a webhook URL for each connection. Register it in amoCRM (Settings → Integrations → webhooks). When amoCRM sends an event, TSync queues it and then re-checks the record directly with amoCRM before applying it — so a malformed or spoofed message can never change your data. The page also lists the recent webhook events (time, event, entity, status: processed / ignored / failed). You can press Process queued webhooks now to drain the queue immediately.
Automatic background sync
You don't have to click anything for routine upkeep — TSync runs two background jobs for the connector (visible and runnable on demand under Automation → Scheduler):
- amoCRM — token refresh (about once an hour): refreshes OAuth tokens that are close to expiry, so a connection stays connected without you reconnecting. If a refresh fails, the connection is marked degraded so you notice.
- amoCRM — process webhook queue (about every 5 minutes): drains queued webhook events the same safe way as the manual button — re-fetching each record from amoCRM before applying it.
Both jobs do nothing while the connector is off.
Diagnostics and data quality
The Diagnostics page tells you, in plain terms, whether everything is healthy: is the connector on, is the schema present, is OAuth connected, is the callback URL reachable. It also shows a data-quality score for your imported leads:
- what percentage have a phone,
- what percentage have a source,
- how many are waiting for manual review,
- how many webhooks are pending,
- errors in the last 24 hours,
- and the last successful sync time.
The Logs page lists every action with a timestamp — useful if something looks off.
Multiple accounts and multi-company
You can add as many connections as you need — for example one per amoCRM account, or one per department — each with its own credentials, sync mode, webhook URL and import history. The dashboard and Settings list them all with their status.
Every connection belongs to one company. A connection set up under Company A can only import into Company A — amoCRM data is never mixed across companies.
Who can use it
Access is controlled by the staff permissions for amoCRM (Setup → Roles / Staff):
- View — open the connector, dashboard, diagnostics, logs and sync state.
- Create / Edit — add and edit connections, connect/disconnect, test, run imports, process webhooks, and turn the connector on or off.
- Delete — remove a connection.
amoCRM is one of TSync's integrations. If you need to connect a different service over a REST or OAuth API, see the External Connections gateway.
What works now, what's coming
The connector is honest about its current scope — the dashboard shows a feature status panel:
- Ready now: OAuth connect, Test connection, leads import (preview + run), webhook receiver/queue, logs, diagnostics.
- Beta / partial: field mapping, pipeline/status mapping, contacts/companies association.
- Duplicate cleanup — already here. If an interrupted import left the same amo deal in TSync twice, the connector can find them and merge: Diagnose shows what it believes is duplicated and why, Preview shows exactly what a cleanup would do before anything happens, and Cleanup moves the duplicate's tasks, reminders, files and proposals onto the record you keep, then removes or marks the leftover. Always look at the preview first — a merge moves real work between records.
- Planned: two-way sync, pushing from TSync back to amoCRM, and automatic lead→customer conversion.
Pages that aren't fully built yet say so plainly — no button pretends to do something it can't yet.
Fixing common problems
- "Callback ready. Missing authorization code" when you open the callback URL — that's expected; start the connection from TSync's Connect button, not by visiting the URL directly.
- Connection shows "degraded" — the token couldn't refresh; open Settings and press Connect again.
- Test connection fails — check the Base URL, Client ID and Client secret, then re-save.
- A lead didn't import — check the Logs and Import preview; leads with no phone/email that match an existing name are held for manual review on purpose.
Setting up the amoCRM app (Client ID/secret) and the live OAuth approval happen on your real ERP address, because amoCRM has to be able to reach the callback URL.