Stupid question - Little confusion

Hey guys!

First I would like to say, that n8n is amazing. I just started with it and could do so many things. Really it’s a bless for us.

Now I try something bigger. We have an HR system which has a rest API. I currently have a python script which runs on a server and do some stuff. To get an idea of the function:

  • The script connects to the REST API and check’s if the API is reachable. When this is true, it stores the result of 4 REST endpoints in a variable
    Endpoints are:

    • Hierarchyitem
    • Jobs
    • Persons
    • Companies
  • It looks like this in python:

    persons = get_json_from_api(base_url + persons_url,headers)
    companies = get_json_from_api(base_url + companies_url,headers)
    hierarchy = get_json_from_api(base_url + hierarchyitems_url,headers)
    jobs = get_json_from_api(base_url + jobs_url,headers)

    after that the script does some stuff. so far so good.

  • Now to n8n my approach was to do 4 http get requests and merge then into objects as the same way, as my script. Right now it looks like this:

    My plan is, that I first aggregate all items into single objects as my script does. So the javascript just returns 4 objects: persons, companies, hierachyitem,jobs and from there I can do magic. How do I achieve this?

Best regards,

Dom

I would build an MCP server (Check Model Context Protocol) and have all 4 as MCP tools which are part of that single server. This way your n8n flow will interact with the endpoints more efficient.