Kommo + Wrike: automatic project creation from won deals

Kommo + Wrike: automatic project creation from won deals

Wrike is an enterprise project management platform: folder templates, task dependencies, time tracking, resource management, and Gantt charts. For teams where sales happen in Kommo and delivery and customer success happen in Wrike, the absence of synchronisation means manually creating a project for every Won deal and manually updating the CRM when work is completed. A custom integration eliminates both steps: Won -> project created; project completed -> Kommo updated.

Wrike vs Jira, Asana, Monday for delivery integration

PlatformStrengthKommo integration
WrikeEnterprise, Gantt, resource mgmtREST API + Webhook
JiraDev teams, AgileREST API v3, ADF
AsanaSimplicity, templatesREST API
MondayVisual, GraphQLGraphQL API

Wrike is chosen when enterprise requirements are present: multiple dependencies, resource load balancing, detailed time reporting for client projects.

What gets synchronised

Kommo -> Wrike:
— Won -> create a project folder from a template with the client name
— Won -> populate custom fields in the folder (plan tier, amount, start date)
— Won -> assign a responsible user (via mapping: Kommo manager -> Wrike member)
— Won -> create a set of tasks from the standard onboarding template

Wrike -> Kommo:
— Task moved to Completed -> Note in the deal: “Wrike: {task} completed”
— Project folder moved to Completed status -> Note + stage change in Kommo
— Task comment -> Note in the deal (if it contains the marker @kommo)

Architecture

Kommo Webhook: deal moved to Won
  ↓ Backend
  1. GET /api/v4/leads/{id} + contacts
     -> client, plan, amount, responsible user
  2. Wrike API: POST /folders/{space_id}/folders
     -> create folder from sharedIds (blueprint/template)
     -> title = "Onboarding: {client_name}"
  3. Wrike API: PUT /folders/{folder_id}
     -> customFields: plan, amount, kommo_deal_id
  4. Wrike API: POST /folders/{folder_id}/tasks (for each onboarding task)
  5. Kommo: PATCH /leads/{id}
     -> custom field wrike_folder_id = folder_id
  6. Kommo: POST /leads/{id}/notes
     -> "Wrike: project created, folder {folder_id}"

Wrike Webhook: task status -> Completed
  ↓ Backend
  1. From payload: taskId, folderId, status
  2. Find deal by wrike_folder_id
  3. Kommo: POST /notes -> "Wrike: task "{title}" completed"

Wrike API: key requests

Base URL: https://www.wrike.com/api/v4/.
Authentication: Bearer token (Permanent Access Token from Wrike Settings -> Apps & Integrations -> API).

import requests

WRIKE_TOKEN = "your_permanent_access_token"
WRIKE_BASE_URL = "https://www.wrike.com/api/v4"
WRIKE_SPACE_ID = "IEAABCDE"  # Space ID - from the URL

headers = {
    "Authorization": f"Bearer {WRIKE_TOKEN}",
    "Content-Type": "application/json"
}

def create_project_folder(parent_folder_id: str, title: str,
                           blueprint_id: str = None) -> dict:
    payload = {"title": title}
    if blueprint_id:
        # Create from template (Blueprint)
        payload["copyDescendants"] = True
        payload["copyWorkflow"] = True
        resp = requests.post(
            f"{WRIKE_BASE_URL}/folders/{blueprint_id}/copy",
            headers=headers,
            json={"parent": parent_folder_id, "title": title}
        )
    else:
        resp = requests.post(
            f"{WRIKE_BASE_URL}/folders/{parent_folder_id}/folders",
            headers=headers,
            json=payload
        )
    resp.raise_for_status()
    return resp.json()["data"][0]

def set_custom_fields(folder_id: str, custom_fields: list) -> None:
    # custom_fields: [{"id": "IEABCFID", "value": "Growth"}]
    resp = requests.put(
        f"{WRIKE_BASE_URL}/folders/{folder_id}",
        headers=headers,
        json={"customFields": custom_fields}
    )
    resp.raise_for_status()

def create_task(folder_id: str, title: str,
                assignee_id: str = None, due_date: str = None) -> dict:
    payload = {"title": title}
    if assignee_id:
        payload["responsibles"] = [assignee_id]
    if due_date:
        payload["dates"] = {"due": due_date}
    resp = requests.post(
        f"{WRIKE_BASE_URL}/folders/{folder_id}/tasks",
        headers=headers,
        json=payload
    )
    resp.raise_for_status()
    return resp.json()["data"][0]

ONBOARDING_TASKS = [
    "Kick-off call with client",
    "Access provisioning",
    "Data migration",
    "Team training",
    "Acceptance and sign-off",
]

MANAGER_TO_WRIKE = {
    "alice@company.com": "WRIKE_USER_ID_ALICE",
    "bob@company.com":   "WRIKE_USER_ID_BOB",
}

def on_deal_won(lead: dict, contact: dict):
    client_name = contact["name"]
    plan = get_custom_field(lead, PLAN_FIELD_ID) or "Starter"
    amount = lead.get("price", 0)
    manager_email = get_manager_email(lead)

    folder = create_project_folder(
        parent_folder_id=WRIKE_ONBOARDING_SPACE_ID,
        title=f"Onboarding: {client_name}",
        blueprint_id=WRIKE_ONBOARDING_BLUEPRINT_ID  # None if no template
    )
    folder_id = folder["id"]

    set_custom_fields(folder_id, [
        {"id": WRIKE_FIELD_PLAN,       "value": plan},
        {"id": WRIKE_FIELD_AMOUNT,     "value": str(amount)},
        {"id": WRIKE_FIELD_DEAL_ID,    "value": str(lead["id"])},
    ])

    assignee = MANAGER_TO_WRIKE.get(manager_email)
    for task_title in ONBOARDING_TASKS:
        create_task(folder_id, task_title, assignee_id=assignee)

    update_kommo_deal(lead["id"], {"wrike_folder_id": folder_id})
    create_kommo_note(lead["id"],
        f"Wrike: project 'Onboarding: {client_name}' created")

Registering a Wrike Webhook:

def register_wrike_webhook(account_id: str, hook_url: str, events: list) -> dict:
    resp = requests.post(
        f"{WRIKE_BASE_URL}/webhooks",
        headers=headers,
        json={
            "accountId": account_id,
            "hookUrl": hook_url,
            "events": events  # ["TaskStatusChanged", "FolderStatusChanged", "CommentAdded"]
        }
    )
    resp.raise_for_status()
    return resp.json()["data"][0]

Handling a Wrike Webhook:

from flask import Flask, request

app = Flask(__name__)

@app.route("/webhooks/wrike", methods=["POST"])
def wrike_webhook():
    events = request.json  # Wrike sends an array of events
    for event in events:
        event_type = event.get("Type")
        folder_id = event.get("FolderId") or event.get("ParentFolderId")

        deal_id = find_deal_by_field("wrike_folder_id", folder_id)
        if not deal_id:
            continue

        if event_type == "TaskStatusChanged":
            task_id = event.get("TaskId")
            new_status = event.get("NewValue")  # "Completed", "In Progress" etc.
            if new_status == "Completed":
                task_title = get_wrike_task_title(task_id)
                create_kommo_note(deal_id,
                    f"Wrike: task '{task_title}' completed")

        elif event_type == "FolderStatusChanged":
            new_status = event.get("NewValue")
            if new_status == "Completed":
                update_kommo_deal(deal_id, {"stage_id": STAGE_DELIVERY_DONE})
                create_kommo_note(deal_id,
                    "Wrike: project completed - client handed off to support")

    return "", 200

Blueprints: creating from a template

A Wrike Blueprint (template) is a folder with tasks, dependencies, and roles. When copied (POST /folders/{blueprint_id}/copy), Wrike creates the complete structure with all tasks. This is more powerful than creating tasks via API manually — all dependencies and statuses are inherited.

To find the Blueprint ID: Wrike UI -> navigate to the template folder -> the URL contains IEAXXXXX — that is the ID.

Real-world case

IT consultancy (EU, 15–20 projects per month, Kommo + Wrike):

  • Before: the sales manager closed a deal -> messaged the project manager in Slack -> the PM manually created a project in Wrike (15–20 minutes per setup). The PM did not update Kommo — the CRM had no visibility into delivery progress.
  • After: Won -> project from Blueprint created in 10 seconds. All tasks, dependencies, and assignments come from the template. When a milestone is completed -> Note in Kommo. The sales manager sees delivery progress without switching systems.
  • Additional: FolderStatusChanged -> Completed -> Kommo stage change to “Project Completed” -> NPS survey triggered for the client.

Who this is relevant for

  • Agencies and consultancies with Wrike as their primary PM tool
  • SaaS companies with enterprise onboarding — long projects with task dependencies
  • Teams that need resource planning and time tracking on client projects
  • 10+ concurrent projects — below that, Trello or Notion is sufficient

Frequently asked questions

Wrike Permanent Token vs OAuth — which to use for integration?

A Permanent Access Token is simpler: created in Wrike Settings -> API, it does not expire. OAuth is only needed if the integration operates on behalf of multiple users (multi-tenant). For a single account — use a Permanent Token.

Which Wrike plan includes Blueprint?

Blueprint is available from the Business plan ($24.80/user/month and above). On the free and Professional plans, creating from a template via API is not available — only manual task creation.

How to find the Space ID in Wrike?

GET /spaces returns a list of Spaces with their IDs. Or from the URL: wrike.com/workspace.htm#path=folder&id=IEABCDEIEABCDE is the folder/space ID. Space IDs and Folder IDs in Wrike use the same format.

Does Wrike support nested folders and task dependencies via API?

Yes. Nested folders: POST /folders/{parent_id}/folders. Task dependencies: POST /tasks/{id}/dependencies specifying predecessor, successor, and dependency type (FS, FF, SS, SF).

Summary

  • Wrike API: Bearer token (Permanent), https://www.wrike.com/api/v4/
  • Create folder from Blueprint: POST /folders/{blueprint_id}/copy
  • Create a task: POST /folders/{folder_id}/tasks
  • Webhook: POST /webhooks — events TaskStatusChanged, FolderStatusChanged
  • Store wrike_folder_id in a Kommo custom field for reverse lookup
  • Blueprint (Business+) — the fastest way to create a complete project from a template

If you use Wrike and Kommo and want to automate project creation on Won — describe your template structure. Exceltic.dev will configure the Blueprint integration and webhook handling.

More articles

All →