Task management API

Two-way sync between your tasks and your CRM

Two-way sync means work flows both directions on its own: something happening in your CRM creates a task in 0nTask, and finishing that task sends an update back to the CRM. Neither one is the follower. Nobody copies anything by hand.

Before you start, you need three things:

Part 1 — CRM creates a task

Goal: when a lead comes in, a task appears on your list automatically.

  1. 1

    Get your API key from 0nTask

    Sign in to 0nTask, open Settings, and create an API key. It starts with 0nt_live_.

    Copy it now. It is stored scrambled, so it can never be shown to you again. If you lose it, delete it and make a new one.

  2. 2

    Create a workflow in your CRM

    Go to Automation → Workflows → Create Workflow, and start from scratch.

    Pick the trigger that should produce a task. Common choices: Form Submitted, Contact Created, Opportunity Stage Changed, or Tag Added.

  3. 3

    Add a Webhook action pointing at 0nTask

    Add an action and choose Webhook. Fill it in exactly like this:

    Method: POST
    URL: https://app.0ntask.com/api/v1/tasks
    Headers:
    Authorization: Bearer 0nt_live_YOUR_KEY
    Content-Type: application/json

    Then set the body to this. The {{...}} parts are your CRM’s own merge fields — pick them from its field picker rather than typing them.

    {
      "title": "Follow up with {{contact.first_name}} {{contact.last_name}}",
      "notes": "New lead from {{contact.source}} — {{contact.email}}",
      "priority": "high",
      "category": "Sales",
    
      "contact_id": "{{contact.id}}",
      "external_id": "{{contact.id}}-new-lead",
    
      "source": "crm",
      "skip_webhooks": true
    }

    Why those four extra lines matter — and why two of them are different.

    contact_id links the task to the person. Many tasks can share one contact, which is normal — three follow-ups for the same lead all carry the same contact_id.

    external_id must be unique to this one task. It is how 0nTask recognises a task it has already made, so a workflow that fires twice updates rather than duplicates. Give each workflow its own suffix — the example uses -new-lead. A second workflow would use -quote-followup, and so on.

    Do not put the contact id in external_id. If you do, the second task for that contact will overwrite the first, because 0nTask will think it is the same task.

    source records who created it, and skip_webhooks stops 0nTask echoing this change back to the CRM that just made it.

  4. 4

    Save, publish, and test it

    Publish the workflow, then trigger it for real — submit the form, or add the tag to a test contact.

    Open 0nTask. The task should be there within a few seconds. If it is, this direction is done.

If your CRM’s webhook step will not let you add headers

Some older workflow builders only let you paste a URL. Use this instead — it does the same job with the key in the address:

https://app.0ntask.com/api/v1/quick?key=0nt_live_YOUR_KEY&title=New+lead+{{contact.first_name}}

Part 2 — finishing a task updates the CRM

Goal: when you tick the task off, the contact record moves on by itself.

  1. 5

    Create an inbound webhook workflow in your CRM

    Create a second workflow. This time choose the trigger called Inbound Webhook.

    The CRM will show you a webhook URL. Copy it — that is the address 0nTask will send to.

  2. 6

    Register that URL in 0nTask

    In 0nTask, open Settings → Webhooks, paste the URL, and choose which events should send.

    For most people task.completed is the useful one. You can also send created, updated and deleted.

    Set a secret if you want to be able to prove a message really came from 0nTask. Optional but recommended.

  3. 7

    Add the loop guard, then decide what happens

    In that second workflow, add an If/Else condition as the very first step:

    If source equals crm → stop.
    Otherwise → carry on.

    Then add what should actually happen: update a field, move the opportunity, send a confirmation, add a note.

    Match the right person using the contact_id that arrives in the message — it is the same contact id you sent in Part 1. (external_id identifies the task, not the person.)

  4. 8

    Test the full circle

    Trigger Part 1 to create a task. Open 0nTask and complete it. Watch the contact in your CRM update on its own.

    That is two-way sync working.

The one thing that goes wrong

Two-way sync’s classic failure is an infinite loop. The CRM makes a task, 0nTask announces the new task, the CRM hears its own announcement and makes another task, and round it goes — thousands of times, quickly.

The instructions above stop it twice over, on purpose, because either guard alone can be forgotten:

Keep both. It costs nothing and it is the difference between a sync that runs for years and one that melts down on day one.

If something is not working

What you seeWhat it means
401 Missing or invalid API keyThe key is wrong, revoked, or the Authorization header is missing the word Bearer before it.
400 A title is requiredThe body reached us but had no title. Check the merge field actually resolved — an empty CRM field sends an empty string.
Task appears twiceexternal_id was missing, or different on each send. It must be the same string every time that workflow runs — and unique to that one task.
Only one task per contact ever appearsYou used the contact id as external_id. Each task needs its own unique external_id; put the contact id in contact_id instead.
Nothing happens at allThe workflow did not run. Check it is published, not in draft, and that the trigger really fired.
Tasks keep multiplyingA loop. Add skip_webhooks to Part 1 and the source filter to Part 2, then delete the tasks it created.
CRM never hears about completionsThe webhook URL is wrong, or task.completed was not ticked when you registered it.

Questions

What is two-way sync between tasks and a CRM?

Two-way sync means work flows in both directions automatically: something happening in your CRM creates a task in 0nTask, and finishing that task sends an update back to the CRM. Neither system is the follower — both stay current without anyone copying anything by hand.

Do I need a developer to set this up?

No. Both halves are built with the workflow builder in your CRM and a settings screen in 0nTask. You paste a URL and a short block of text; there is no code to write and nothing to host.

How long does it take?

About fifteen minutes for both directions, most of which is clicking through the CRM workflow builder.

Is it free?

Yes. The 0nTask API and its outbound webhooks are free. You will need a CRM plan that includes workflows, which most do.

Will it create duplicate tasks if the CRM fires more than once?

No, as long as you include the external_id field shown below and keep it the same on every send. 0nTask uses it to recognise a task it has already made and updates that one instead of creating another.

What is the difference between contact_id and external_id?

contact_id links the task to a person, and many tasks can share one contact. external_id must be unique to a single task — it is how 0nTask avoids duplicates. Putting the contact id into external_id is the common mistake: the second task for that contact would overwrite the first.

Can this cause an infinite loop?

It could, which is why the instructions include two safeguards. Setting "skip_webhooks": true tells 0nTask not to echo a change the CRM just made, and every outbound message includes a "source" field your CRM workflow can filter on. Use both and a loop cannot start.

What happens if my CRM is down when a task changes?

The delivery is recorded as failed and counted against that webhook. Nothing in 0nTask breaks, and the task change still saves normally.

Start with a free account

The API, the webhooks and the sync are free. You only need somewhere to put the tasks.

Create a free account