Json response with cursor header dosent work with Loop Over Item

Hi guys.

How do combinate Loop Over Items with a json response contais cursor header ?

json header:
[
{
“size”: 2,
“limit”: 10,
“total”: 2,
“data”: […

When a try execute my flow de loop just find one registre, this registre is all json file…

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:

Welcome to the community @Silvio_Brito :tada:

Not sure if I understand your question here, could you tell me a bit more about what you’re trying to achieve with the workflow, or share your workflow by copy & pasting the workflow JSON content (or parts of it) in between two block quotes (```)

hi, ok. Let me explain

Json file:

[
  {
    "size": 2,
    "limit": 10,
    "total": 2,
    "data": [
      {
        "id": "3458764592550886426",
        "type": "sticky_note",
        "data": {
          "content": "<p>US - Titulo US</p><p><br /></p><p>Descrição:  Descrição US</p>",
          "shape": "square"
        },
        "style": {
          "fillColor": "light_yellow",
          "textAlign": "center",
          "textAlignVertical": "middle"
        },
        "geometry": {
          "width": 604.6931417145194,
          "height": 692.8142528186453
        },
        "position": {
          "x": -143.46997784741546,
          "y": 866.8388124866581,
          "origin": "center",
          "relativeTo": "canvas_center"
        },
        "links": {
          "self": "https://api.miro.com/v2/boards/uXjVK6xJV7Q%3D/sticky_notes/3458764592550886426"
        },
        "createdAt": "2024-06-18T14:11:37Z",
        "createdBy": {
          "id": "3074457359533130449",
          "type": "user"
        },
        "modifiedAt": "2024-06-18T19:32:57Z",
        "modifiedBy": {
          "id": "3074457359533130449",
          "type": "user"
        }
      },
      {
        "id": "3458764592588857410",
        "type": "sticky_note",
        "data": {
          "content": "<p>US - Login de usuário</p><p><br /></p><p>Descrição: Como usuário do aplicativo, quero poder inserir meu usuário e senha do aplicativo na tela home a fim de poder logar na aplicação.</p>",
          "shape": "square"
        },
        "style": {
          "fillColor": "light_yellow",
          "textAlign": "center",
          "textAlignVertical": "middle"
        },
        "geometry": {
          "width": 604.6931417145194,
          "height": 692.8142528186453
        },
        "position": {
          "x": -997.2138776258422,
          "y": 866.838812486658,
          "origin": "center",
          "relativeTo": "canvas_center"
        },
        "links": {
          "self": "https://api.miro.com/v2/boards/uXjVK6xJV7Q%3D/sticky_notes/3458764592588857410"
        },
        "createdAt": "2024-06-18T20:28:43Z",
        "createdBy": {
          "id": "3074457359533130449",
          "type": "user"
        },
        "modifiedAt": "2024-06-18T20:29:17Z",
        "modifiedBy": {
          "id": "3074457359533130449",
          "type": "user"
        }
      }
    ],
    "links": {
      "self": "https://api.miro.com/v2/boards/uXjVK6xJV7Q%3D/items?limit=10&cursor="
    },
    "type": "cursor-list"
  }
]

Flow: I just need iterate de json, but because this code intial code the loop indentufy only one regitre.

Hi @Silvio_Brito thanks for sharing your workflow and the json output which looks like a paginated response from the Miro API listing sticky notes within a board. If you want to split out the json output into separate items, one for each sticky note, you can use the Split Out node:

Is this what you were looking for?

Hello, thank you for your reply. I was able to resume this project.

The split node worked perfectly. Thank you.

Now I have another problem, because this API uses cursor pagination. I saw the pagination option in the HTTP node but I didn’t understand how to use a cursor that comes inside the API’s json return.

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