Unable to distinct items coming from a http call

I’m trying to automate the management of some repositories on Gitlab but I’m having trouble with the composition of the workflow. The goal here is to retrieve the latest stable tag (in the form vx.y.z) for each repository which stays under a certain Gitlab group.

The flow is something like this:

  1. Get all the repositories which are under a Gitlab group → this returns n items
  2. Get the list of tags for each repository → this returns a variable number of items for each of the n repository
  3. Get the latest stable tag for each repository (using code and a regular expression)

The problem I’m facing is the following: when I get the the list of tags for each repositories, all the tags of all the repositories are merged into the same array, and I’m not able to tell which tags belongs to each repository.

I’ll try to make it clear with an example:

  1. Get repositories in group: result = [ {"id":"repo1"},{"id":"repo2"} ]
  2. Get tags for each repository: result = [ {"name":"v1.2.2"},{"name":"v0.5.4"},{"name":"v0.5.6"} ], where the first tag is from “repo1” while the last two tags are from “repo2”

Here the workflow I have set right now:

  • n8n version: 1.8.2
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Gitlab APIs: v4

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

I solved this problem by means of the “Split in batches” node, specifying a batch size of 1 item


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.