logo_smallAxellero.io

amoCRM - Setup Guide

Setup and configuration guide for amoCRM integration

amoCRM (Kommo) CRM integration for workflow automation with Axellero.

For detailed instructions on managing credentials, connectors, and triggers in Axellero Studio, see the Integration Guide.

Step 1: Create Credential

Getting Credentials from amoCRM

  1. Log in to your amoCRM/Kommo account
  2. Go to Settings (gear icon) -> Integrations
  3. Click Create Integration -> Select Private Integration
  4. Fill in the integration details:
    • Name: "Axellero Integration"
    • Redirect URI: Your Axellero callback URL
  5. Save and note the Client ID and Client Secret
  6. In the integration settings, click Keys and Access to get the authorization code

OAuth Authorization Flow

  1. Direct users to the authorization URL:

    https://{subdomain}.kommo.com/oauth?client_id={clientId}&state={state}&redirect_uri={redirectUri}
  2. After authorization, exchange the code for tokens:

    POST https://{subdomain}.kommo.com/oauth2/access_token
    {
      "client_id": "your_client_id",
      "client_secret": "your_client_secret",
      "grant_type": "authorization_code",
      "code": "authorization_code",
      "redirect_uri": "your_redirect_uri"
    }
  3. Store both access_token and refresh_token

Important: amoCRM uses rolling refresh tokens. Each time you refresh, the old refresh token becomes invalid. Always store the new refresh token.

Adding Credential to Axellero

  1. Navigate to Application > Integrations > Credentials
  2. Click "Add Credential"
  3. Select OAuth 2.0
  4. Enter:
    • Name: "amoCRM Production"
    • Client ID: From amoCRM integration settings
    • Client Secret: From amoCRM integration settings
    • Authorization URL: https://{subdomain}.kommo.com/oauth
    • Token URL: https://{subdomain}.kommo.com/oauth2/access_token
    • Scopes: (leave empty - amoCRM uses integration-level permissions)
  5. Click Save, then "Authorize"
  6. Log in to your amoCRM account and grant access

Axellero securely encrypts credentials and handles token refresh automatically.


Step 2: Create Connector

  1. Navigate to Application > Integrations > Connectors
  2. Click "Add Connector"
  3. Select amoCRM from the list
  4. Configure:
    • Name: "amoCRM - Production"
    • Credential: Select the OAuth credential you created
    • Domain: Your amoCRM subdomain (e.g., mycompany.kommo.com)
  5. Click Save
  6. Test the connection using the "Test" button

The connector is now available in any workflow or agentflow.


Step 3: Create Trigger

For supported events and payload examples, see main documentation.

3.1 Create Trigger

  1. Navigate to Integrations > Triggers
  2. Click "Add Trigger" (+) button
  3. Select your amoCRM connector
  4. Configure trigger options (see table below)
  5. Click Save

Trigger Options

OptionTypeRequiredDescription
eventsTEXTYesEvent types to trigger on. Select one or more from the available events list.
accountIdTEXTNoExpected amoCRM account ID for webhook verification. Recommended for security to ensure webhooks originate from your account.

Available Events

Event CodeLabelDescription
add_leadLead CreatedTriggers when a new lead is created
update_leadLead UpdatedTriggers when a lead is modified
delete_leadLead DeletedTriggers when a lead is deleted
restore_leadLead RestoredTriggers when a deleted lead is restored
status_leadLead Status ChangedTriggers when a lead moves to a different pipeline stage
responsible_leadLead Responsible ChangedTriggers when a lead is reassigned
add_contactContact CreatedTriggers when a new contact is created
update_contactContact UpdatedTriggers when a contact is modified
delete_contactContact DeletedTriggers when a contact is deleted
restore_contactContact RestoredTriggers when a contact is restored
responsible_contactContact Responsible ChangedTriggers when a contact is reassigned
add_companyCompany CreatedTriggers when a new company is created
update_companyCompany UpdatedTriggers when a company is modified
delete_companyCompany DeletedTriggers when a company is deleted
restore_companyCompany RestoredTriggers when a company is restored
responsible_companyCompany Responsible ChangedTriggers when a company is reassigned
add_taskTask CreatedTriggers when a new task is created
delete_taskTask DeletedTriggers when a task is deleted
complete_taskTask CompletedTriggers when a task is marked complete
note_leadNote Added to LeadTriggers when a note is added to a lead
note_contactNote Added to ContactTriggers when a note is added to a contact
note_companyNote Added to CompanyTriggers when a note is added to a company

How it works: Axellero automatically generates a unique webhook URL and registers it with amoCRM via the API. No manual webhook setup required.

Important: amoCRM webhooks require a paid subscription. Free/trial accounts do not have access to the webhooks API.

3.2 Add Trigger to Workflow

  1. Open Workflow Builder
  2. Find your trigger in the Triggers section
  3. Drag to canvas as starting node
  4. Build workflow logic after the trigger

3.3 Test the Trigger

  1. Create or update an entity in amoCRM (e.g., add a new lead)
  2. Check workflow execution logs in Axellero
  3. Verify trigger data via {{ctx.nodes.amocrm_trigger.outputs.data}}

Workflow Examples

Example 1: New Lead Notification

Send a Telegram notification when a new lead is created.

Workflow Steps:

  1. amoCRM Trigger: Events = add_lead
  2. Telegram - sendMessage: Send notification

Configuration:

{
  "chatId": "{{ctx.vars.salesChannelId}}",
  "text": "New lead: {{ctx.nodes.amocrm_trigger.outputs.data.data[0].name}}\nPrice: {{ctx.nodes.amocrm_trigger.outputs.data.data[0].price}}"
}

Example 2: Lead Stage Change Handler

Create a follow-up task when a lead moves to a specific stage.

Workflow Steps:

  1. amoCRM Trigger: Events = status_lead
  2. Condition: Check if status_id matches target stage
  3. amoCRM - createTask: Create follow-up task

Task Configuration:

{
  "text": "Follow up on qualified lead",
  "entityId": "{{ctx.nodes.amocrm_trigger.outputs.data.data[0].id}}",
  "entityType": "leads",
  "completeTill": "{{ctx.vars.nextWeekTimestamp}}",
  "taskTypeId": 1
}

Example 3: Contact-Lead Linking

Automatically link new contacts to existing leads based on email domain.

Workflow Steps:

  1. amoCRM Trigger: Events = add_contact
  2. amoCRM - listLeads: Search for leads with matching company
  3. Condition: Check if matching lead exists
  4. amoCRM - updateContact: Link contact to lead

Example 4: Daily Task Summary

Send a daily email summary of incomplete tasks.

Workflow Steps:

  1. Schedule Trigger: Daily at 8:00 AM
  2. amoCRM - listTasks: Get incomplete tasks due today
  3. Loop: Format task list
  4. Gmail - sendMessage: Send summary to manager

Task Filter Configuration:

{
  "isCompleted": "false",
  "order": "complete_till:asc",
  "limit": 50
}

Example 5: Lead Assignment Notification

Notify sales reps when they are assigned a new lead.

Workflow Steps:

  1. amoCRM Trigger: Events = responsible_lead
  2. amoCRM - listUsers: Get user details
  3. Telegram - sendMessage: Notify the assigned user

Troubleshooting

ErrorCauseSolution
401 UnauthorizedToken expired or invalidRe-authorize in credential settings
402 Payment RequiredWebhooks need paid planUpgrade amoCRM subscription
403 ForbiddenIntegration lacks permissionsCheck integration permissions in amoCRM
429 Too Many RequestsRate limit exceeded (7 req/sec)Implement delays between operations
Connection test failsInvalid domain or tokenVerify domain format and re-authorize

Common Issues

Token refresh failing

  • amoCRM uses rolling refresh tokens - each refresh invalidates the old token
  • If refresh fails, re-authorize from scratch in credential settings
  • Ensure your integration has refresh token permissions

Trigger not firing

  • Verify amoCRM account has paid subscription (webhooks require paid plan)
  • Check event types match what you are testing
  • Verify connector credentials are valid
  • Check Axellero logs for webhook registration errors

Webhooks receiving 402 error

  • amoCRM webhook API requires a paid subscription
  • Free and trial accounts cannot register webhooks
  • Upgrade your amoCRM plan to enable triggers

Custom fields not saving

  • Verify field_id values are correct (get from amoCRM API)
  • Ensure values array format is correct
  • Check field type matches value type (text, number, enum)

Security Best Practices

  • Store credentials in Axellero Credential Manager (encrypted)
  • Use Account ID verification in triggers for additional security
  • Rotate integration credentials periodically in amoCRM
  • Use minimum required integration permissions
  • Monitor API usage in amoCRM analytics

Resources