Incremental upload from Bitrix24 using “Variables”

This article describes an example of setting up a project for incremental downloading from Bitrix24.

Setting example

In the Read Data From Bitrix24 node in the “Webhook Url” field, and in the fields of the “Mode” section (“Start Date”, “End Date”, “Last modified”), instead of absolute values, you can use “Variables”, which are supplied to the “input” (input_vasriables) of the Read Data From Bitrix24 node.

In the node itself, variables are called via =. For example, =url or =last_Date.

As a result, you can make an unloading project that works like this:

  1. Read the maximum successfully loaded modification date from the “resulting table” using an SQL query in the Read Query node (you can also use the Read Table node):

    -- Пример SQL-запроса к таблице, для получения максимальной загруженной даты модификации: select max(`DATE_MODIFY`) as last_Date from `DVT_Test`.`2026-04-17-leads`
  2. The maximum modification date is converted into a “Variable” through the Select Variables from DataFrame** node.**

  3. The generated “Variables” are submitted to the “input” of the Read Data From Bitrix24 node.

  4. At the “output” of the Read Data From Bitrix24 node, we get a dataframe that can then be transformed. For example:

  5. The final dataframe can be written to the database using the WriteDataFrame to DB node in upsert mode. In this case, the (1) table update is configured based on the key data change field (2).

Project template

You can also use a ready-made file to import the project:

In the loaded project it is necessary to replace (write):

  1. WebHook in the Create Variable node.

  2. In the node Get Existing DB Connection register your connection to the database.

  3. Database and Table from which the maximum change date is read in the Read Query node.

  4. Database and Table in the data recording node WriteDataFrame to DB.