How to acces data in code node?

Hello this is my configuration :

i m on premise :

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

hello i got a node with multi Item, but how i can acces in code at this différent item :slight_smile:

so i need to access at Covnerie-CMLToJson who is a json and show same data on it ?

Do u know how access data pleasse ?

i try with code node, can acces at différente node but with node to acess XML data ? and start do some request on it ?

THanks

Hey @Issa2024 , here’s the doc with the information you are looking for, Output of other nodes | n8n Docs.

1 Like

Hello after hour and hour of searching i found this solution :slight_smile:

// Récupérer le champ texte depuis l'entrée
const text = $input.item.json.text; // Assurez-vous que 'text' est le nom correct de votre champ

// Récupérer les fichiers binaires associés à l'entrée
for (key of Object.keys(item.binary)) {
    fileName =  item.binary[key].fileName;
    directory = item.binary[key].directory;

    // Ajouter ces valeurs au résultat JSON
    return {
        json: {
            result: [
                { fileName, directory }
            ]
        }
    };
}

And this is a demo of workflow who open a pdf files, read all data from a pdf and extract data on it :slight_smile:

1 Like

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