Bitrix24 create or update lead problems

Hello,

I struggle to create leads in Bitrix24 with make.

The modul “create lead” does not transfer any of my inputs to the created lead. BUT it does create on and tell me the ID.

So I tried it with “update lead”. BUT I geht the error that the Lead ID is not valid. If I search the exact same ID via the modul “get Lead” I get all the correct information.

Did anyone solve this and has created leads with data input?

Kind Regards
Marcel

Hi @Marcel_42,

Welcome to the Make community!

If you get an ‘invalid ID’ error, make sure you are using the same connection or that the connections you are using can access the same resource. Other than that, you can use the Integromat DevTool to see what is requested exactly when Make performs a step in the scenario.

It may help you find out why ‘create lead’ does not use any input for the creation of a lead. As far as I can see (and that is not far), it is possible that there was no input form a preceding module to begin with.

Here is the Integromat Devtool:

Please, follow these steps when asking a question, and you’ll be more likely to get a helpful answer:

:writing_hand: Give us a detailed explanation of what you’re trying to achieve

:footprints: Tell us about any steps you’ve tried so far

:camera_flash: Include screenshots of:

  • your scenario flow and setup (functions, mappings, variables, etc.)

  • module configurations and outputs

  • any error messages you are getting

:card_file_box: Share the blueprint of the scenario you are asking a question about. (this does not contain any connection or personal information)

Henk
Certified Make Expert and Partner

Please attach screenshots of your “Create a Lead” module’s configuration and paste the input bundle here with sensitive data blurred.


Zrzut ekranu 2024-07-15 o 20.26.58

Hello and thank you both.

create lead
input:

[
    {
        "NAME": "<test lead: dummy data for first_name>",
        "EMAIL": [
            {
                "VALUE": "<test lead: dummy data for work_email>",
                "TYPE_ID": "EMAIL",
                "VALUE_TYPE": "WORK"
            }
        ],
        "PHONE": [
            {
                "VALUE": "<test lead: dummy data for work_phone_number>",
                "TYPE_ID": "PHONE",
                "VALUE_TYPE": "WORK"
            }
        ],
        "COMMENTS": "test",
        "LAST_NAME": "<test lead: dummy data for last_name>",
        "ORIGIN_ID": "iD 456789",
        "SOURCE_ID": "10",
        "STATUS_ID": "NEW",
        "COMPANY_TITLE": "test <test lead: dummy data for company_name>",
        "ASSIGNED_BY_ID": "1",
        "UF_CRM_1469604937": "456789",
        "UF_CRM_1549442019": "1340",
        "SOURCE_DESCRIPTION": " ",
        "UF_CRM_1538123069839": "760",
        "UF_CRM_1705486818546": "2154"
    }
]

output:

[
    {
        "id": 19030
    }
]

Get Lead:

Input:

[
    {
        "lead": 19030
    }
]

Output:

[
    {
        "ID": "19030",
        "TITLE": "#19030  / ",
        "HONORIFIC": null,
        "NAME": null,
        "SECOND_NAME": null,
        "LAST_NAME": null,
        "COMPANY_TITLE": null,
        "COMPANY_ID": null,
        "CONTACT_ID": null,
        "IS_RETURN_CUSTOMER": false,
        "BIRTHDATE": null,
        "SOURCE_ID": null,
        "SOURCE_DESCRIPTION": null,
        "STATUS_ID": "NEW",
        "STATUS_DESCRIPTION": null,
        "POST": null,
        "COMMENTS": null,
        "CURRENCY_ID": "EUR",
        "OPPORTUNITY": "0.00",
        "IS_MANUAL_OPPORTUNITY": false,
        "HAS_PHONE": false,
        "HAS_EMAIL": false,
        "HAS_IMOL": false,
        "ASSIGNED_BY_ID": "1",
        "CREATED_BY_ID": "1",
        "MODIFY_BY_ID": "0",
        "DATE_CREATE": "2024-07-16T13:49:07.000Z",
        "DATE_MODIFY": "2024-07-16T13:49:08.000Z",
        "DATE_CLOSED": null,
        "STATUS_SEMANTIC_ID": "P",
        "OPENED": false,
        "ORIGINATOR_ID": null,
        "ORIGIN_ID": null,
        "MOVED_BY_ID": "1",
        "MOVED_TIME": "2024-07-16T13:49:07.000Z",
        "ADDRESS": null,
        "ADDRESS_2": null,
        "ADDRESS_CITY": null,
        "ADDRESS_POSTAL_CODE": null,
        "ADDRESS_REGION": null,
        "ADDRESS_PROVINCE": null,
        "ADDRESS_COUNTRY": null,
        "ADDRESS_COUNTRY_CODE": null,
        "ADDRESS_LOC_ADDR_ID": null,
        "UTM_SOURCE": null,
        "UTM_MEDIUM": null,
        "UTM_CAMPAIGN": null,
        "UTM_CONTENT": null,
        "UTM_TERM": null,
        "LAST_ACTIVITY_BY": "1",
        "LAST_ACTIVITY_TIME": "2024-07-16T13:49:07.000Z",
        "UF_CRM_1460623556": "",
        "UF_CRM_1460623612": "",
        "UF_CRM_1460623855": [],
        "UF_CRM_1468330493": "",
        "UF_CRM_1468330893": "60",
        "UF_CRM_1469604937": "Produkt:  Größe:  Material: Veredelung: Druck: Logo: Embossing: Menge: Referenz:",
        "UF_CRM_1538123069839": "",
        "UF_CRM_1538473675063": "",
        "UF_CRM_1549442019": "",
        "UF_CRM_1552572432622": "",
        "UF_CRM_1651743084877": [],
        "UF_CRM_1699871954": [],
        "UF_CRM_1705486818546": "",
        "UF_CRM_1706168828653": [],
        "UF_CRM_1706168986535": "",
        "UF_CRM_1706192151666": "",
        "UF_CRM_1706192190222": "",
        "UF_CRM_1707984951761": "0",
        "UF_CRM_LEAD_1708523550596": "",
        "UF_CRM_LEAD_1708523612304": "",
        "UF_CRM_1709046139077": "",
        "UF_CRM_1709219135797": [],
        "UF_CRM_LEAD_1709633448292": "",
        "UF_CRM_1712134689257": "",
        "UF_CRM_1714466101198": "0",
        "UF_CRM_1716972036413": "",
        "UF_CRM_1718960686533": "0",
        "UF_CRM_LEAD_1719502389939": "",
        "UF_CRM_LEAD_1719502618769": "",
        "UF_CRM_LEAD_1719502760754": "",
        "UF_CRM_LEAD_1720698043660": ""
    }
]

Update Lead

Input:

[
    {
        "lead": 19030,
        "COMPANY_TITLE": "test"
    }
]

output:

[
    null
]

Error:

##### RuntimeError

[400] ID is not defined or invalid.

###### Origin

Bitrix24

blueprint.json (147.2 KB)

As you can see in the blueprint and logs. I tried with different modules to write some date but nothing worked. With update Lead I just tried to change one field. as proof of concept (or not)

Kind Regards.

Hi,

Thank you for all the details.

When importing your blueprint, there is no mapping with the lead name. This field isn’t mandatory, but according to the uploaded input data, you are trying to pass something as the lead name:
“NAME”: “”,.

Please try to change it, even to “TEST,” and run your scenario to check if it helps.

Also, check the permission settings.

If it doesn’t help, I strongly suggest modifying scenario and checking the existence of the company and then using a router

  • Using ID of existing company,
  • Creating it and use company IDs when creating a new lead.

This will help you organize your data.

1 Like

Hello,

thank you. this did not work either.

I am currently in contact with bitrix support they already activates API logging to find the error. Maybe they can help.

IF somebody is able to import new leads or update existing ones I would be happy to get more info on how or if you had similar problems.

We are using Bitrix24 and don’t have any problems.

I was thinking about possible solutions, and I have one more question: On what subscription plan are you? Leads are unavailable on some plans.

Hello we are using Professional cloud

Hello,
update from Bitrix support. Via log they can see:

  1. create lead without any parameter
    /rest/crm.lead.add?auth=********

  2. get lead with lead id √ correct
    /rest/crm.lead.get?id=19150&auth=**************

  3. update lead again without any information

/rest/crm.lead.update?auth=*********

Hi,

It is strange because our Bitrix Module works perfectly fine.

I assume there might be an error in the connection to your Bitrix or with the input data. Have you tried not mapping values but simply writing them?

Below my scenario.

Request:

Respond:
SC_1

Log:
SC_2

Get Lead:
SC_3


Additional info:

  1. create lead without any parameter
    /rest/crm.lead.add?auth=********

It is perfectly fine. crm.lead.add uses body to send data, as Bitrix’s documentation suggest.

SC_0

Documentation

  1. get lead with lead id √ correct
    /rest/crm.lead.get?id=19150&auth=**************

Yes, here the lead id should be in the query.


So I strongly suggest creating a blank scenario and trying to create a lead without mapping any parameters and add only the mandatory fields.

This way you will know if it’s a Make.com error or a Bitrix error.

If it works, try adding the next parameters by typing them in. If it still works, you can be 100% sure that the problem is with the mapping. If it stops working on any parameter, you will find the cause of your problem.

Have a great day!

When you will find solution, remember to mark post as solved.

Hello, thank you all!

We found the Problem and it was the connection. Not sure what was wrong but we created a new one with the same user and now it works perfectly.

Kind Regards

Marcel

2 Likes