Use Google Sheet as a data base. Count files from Telegram

Hi community,

I searched for this anywhere but can’t find a solution.
The goal is to count files from Telegram messenger for a specific user (Telegram ID), and give this number to the Sendpulse system.

I already tried different approaches:

  • Use make.com data storage module, but it’s too small and limited. I could count the number of lines but I don’t understand how to count only specific lines with user name ID.
  • Tried to use Sendpulse modules to directly change the data in their database, but for some reason I can’t make it right. Ther is no way to receive all contacts and add +1 there.
  • I had an idea that it’s possible to somehow get the whole user chat data with a single Telegram api request and count it all in one go but I don’t understand how to do it.

The latest approach is to use Google Sheets as a data base.

  1. Watch Telegram updates
  2. Copy template with correct columns if the sheet with username is not existing
  3. Add raws
  4. User a Sheet formula to count the number of cells with the input.

I use Telegram Watch events module that always gives me only one set of data for one operation (one image received.)

Right now I have an issues with the filtering. It works very similary for my other scenario where I need to check if the golder with a name exists ans create a new one.
Here I want to check if the sheet exists and create a copy if not.
No matter what I do after the router it always goes to the “user is not existing” and tries to create a sheet with already existing name which results in the Google error.

Scenario

Filters to check existing user


Please, help. Maybe I can count this number somehow differently.

Adding ny latest blueprint.
blueprint-2.json (108.2 KB)