Migrating from Jira to Halo failures


This is the closest I’ve gotten to succeeding. The issue in this one is (I assume) running out of memory.

So with up to 300 tickets, this works how I need it, albeit a bit slow. I would love if there were a trick or two that could do what I need.


As for what is going on in the screenshot:

HTTP Request to Jira with JQL specifying group, user, and ticket status(closed). I query only the fields needed to build the HaloPSA ticket out.

Get Many Users is pinned so it isn’t making unnecessary calls to Halo API.

Map to Halo IDs is mapping specifically to the IDs in our instance of HaloPSA. This is how we get the users/ticket types,etc.. from Jira and have them match to HaloPSA’s equivalent.

Map to Halo Users and Agents is the same concept, but for the users/agents in HaloPSA.

I learned pretty quickly I’d need to separate the batched tickets into smaller batches, because the HTTP Request for Halo will only process 100 tickets at a time maximum. Force Batching separates them into 25 tickets each, then feeds them into the loop.

The loop then creates the ticket, waits, batches the comments, attaches the comments, waits, repeats. (In the Prod version, it will also write the tickets to the table for referencing)


All of that said, it hits the loop, processes 275 tickets, then just stops with no given warning. I would love suggestions on mass migration, because I’m about to the point of just writing up a custom python script to do all this instead.

Hey @mgriffin, while you wait for a response, here are some things that might help:

Suggested resources

Automatically matched to your question.

Docs:

Forum:

@kjooleng, @dmitrijz, @Niffzy - you’ve helped with similar issues before, can you take a look?

Automatically suggested by n8n’s community bot. It’s a pilot - please share feedback here.

I saw your flow and it’s possible your costs are skyrocketing because you’re processing record by record inside the loop using direct HTTP requests. Each time the flow iterates, you’re sending the entire instruction prompt to the API again, so you end up paying for the same instructions thousands of times. You can use batching/grouping instead of making an HTTP request for each ticket — use a node to group 20 to 50 elements into a single call. Ask the model to return a processed JSON array. That reduces prompt costs by 80-90%. Or you can also do filtering with JavaScript that performs basic data validations or cleanup using code nodes within n8n before calling the API. Send the AI only what requires intelligent processing or transformation. OpenAI Batch API or Models. I wish you luck and that you find the best solution — I hope my suggestion has been helpful to you.

The silent stop (o error shown at a consistent-ish point strongly suggests this is a container/process OOM kill, not a node failure, n8n wouldn’t just vanish an execution on a normal error. A key thing to check: n8n’s Loop Over Items node keeps the full accumulated dataset for every iteration in memory for the whole execution, it doesn’t release processed batches as it goes. With 300 tickets plus their comments held in memory simultaneously, that adds up fast.

Two fixes worth trying:

Move the per-batch logic into a separate sub-workflow, called via Execute Workflow for each batch of 25. Each sub-workflow execution gets its own memory context and doesn’t accumulate against the parent’s growing dataset, this is the standard fix for exactly this pattern (see n8n’s own guide).

If self-hosted, raise the heap limit explicitly with NODE_OPTIONS=–max-old-space-size=4096 (or higher) in your environment, and check your container’s actual memory limit isn’t capping it lower than that.

The sub-workflow approach is worth trying first, it usually fixes this class of “stops partway through a big loop with zero error” issue outright, without needing more RAM.

Thanks for letting us know about this, We have created CAT-4058 as the internal dev ticket to look into it.

Good diagnoses above on the OOM/timeout angle. I want to add a layer nobody’s covered yet: **resumability**.

Right now, if it stops at ticket 275, you have to figure out which 275 got migrated and re-run from scratch (or manually start at 276 and hope). At this scale that’s a real problem - and with OOM/timeout as the likely culprit, it will happen again even after you fix the root cause.

**The pattern that solves this: a migration tracking table + idempotency check**

1. Create a simple Postgres table (or even a Google Sheet) with columns: jira_ticket_id, halo_ticket_id, migrated_at, status

2. At the start of each run, fetch the full Jira ticket list AND your tracking table, then filter out any Jira IDs already marked complete

3. After each successful Halo ticket creation, immediately write to the tracking table before moving to the next ticket

4. If the workflow stops at 275, your next run automatically picks up at 276

Combined with Hovec’s sub-workflow suggestion (each batch of 25 in its own execution context), you get something both memory-safe AND resumable.

Also worth checking: is this self-hosted or Cloud? Default execution timeout is `EXECUTIONS_TIMEOUT` (default 3600 sec). At roughly 15 sec/ticket x 275 tickets = ~68 minutes, you may be hitting timeout rather than OOM - same fix applies either way, but knowing which one helps you tune the right variable.

For what it’s worth, migrations like this (Jira to HaloPSA, Zendesk to Freshdesk, etc.) are exactly what we specialize in at Occelatus (Automation Services — Occelatus Labs) - happy to scope it out if this becomes a larger project.

Hi @mgriffin Welcome!
Manual executions cost far more memory than production ones because n8n keeps a second copy of the run data for the frontend, and your “Get many users - Halo” node is pinned with 11901 items that sit in memory for the whole execution. Replace the UAT manual trigger with a Schedule Trigger, activate the workflow, and let the migration run as a production execution instead of from the Execute workflow button.
Unpin “Get many users - Halo” as part of that, pin data is ignored in production executions so the prod version never receives it anyway. Wire the real Halo call back in with a Set node directly after it that keeps only the id fields you match on, so the loop carries a small lookup instead of 11901 full user records.

Hi @mgriffin thank you for reporting this! We’re looking into it as a possible OOM issue, but we’d like to know which deployment you’re using as that changes things a lot. Is this self hosted or cloud deployment? Is the EXECUTIONS_MODE environment variable set?

An option to work around it would be like @pirateprentice suggests, but I’d also recommend looking into Data tables | Build | n8n Docs!

Company owned Cloud deployment

So, as it stands, I hardcoded in the users/agents. The workflow seemed to be working last week due to a combination of making a sub-workflow for comments, and only passing it the halo id to pull from.

Now it doesn’t seem to even get to that step, and has begun having a gateway timeout when making tickets, which I thought I had solved previously by overriding the timeout with my own value. Apparently, this is not the case.

Half of my problem seems to have been solved. I stopped the OOM issue by adding a sub-workflow, coupled with passing only the Halo Ticket ID to that sub-workflow.

The comment HTTP request was moved into its own workflow, and right after the table data is set, I set the halo ID and it only passes that data forward. It seems to cause a memory dump mid loop, allowing my comments to post with zero issure.

What I am running into now is that the initial ticket request has resumed having a gateway timeout, but that is a separate issue than this topic.

Other solutions that helped involved hard coding the clients, users, and agent IDs once they were pulled, so I did not have a pinned data set hogging memory. All of this was combined with me forcing the hundreds of tickets into batches of 25 for each halo batch posting. This may be reduced to 20 to try and overcome the gateway timeout.

Part of how I solved the OOM was simply setting the halo ticket ID in a set node right after making the batch post, and letting that carry into a sub-workflow for the comments to handle. The real monster I’m dealing with is a gateway timeout from Halo. Currently, I am testing if maybe I just need to do batches of 20 instead of 25.

I will definitely keep the Postgres table/google sheet in mind for the future, as that may just solve the issues more readily if I have to migrate again.

This is Cloud, via company.

I’m not certain what you mean. I am already grouping/batching. Once before the loop into batches of 20-25, and batch posting inside of the loop for the actual HTTP requests.

I don’t know what you mean by instruction prompt, or prompt costs. There is no LLM involved in this workflow, outside of some data processing externally that I manually verify and input.

My final solution was to integrate quite a few suggestions.

First, I created a table that would contain all information needed for posting a ticket. I then populated that table with every ticket needing migration from Jira. This included two columns that contained the Halo ticket number, and a boolean on if it had comments added or not.

Using that table, I mapped out the Users, Agents, Client/Company, and status IDs.

After mapping, I built out the structure for Halo’s API, assigning the correct IDs dynamically. Once the table was populated, I set a schedule to run. It would pull the table, with conditions checking for a null ticket value, and a null comment value. If both of those matched, it needed processing still.

Two things here: You can set a limit on how many tickets are pulled from your table, and those tickets need to be grouped together. That information is drawn down the pipeline to a step that batches them. Depending on your setup, it may be between batches of 10 and 25, though could be as high as batches of 50. It requires experimentation on your part.

These are fed into a loop that will post each batch under a single API call. Important step here was to capture each Jira ticket number, and each Halo ticket number, so they can be updated in the table for the next step. After the table is updated, a Wait is put into place to avoid throttling and limits. The loop then processes the next batch.

A helpful note: If you pull in a large amount of tickets (Say around 800 or so), it could take close to an hour to actually push all those tickets in a run. I recommend taking in no more than 150 at a time, and having the workflow run every 20-30 minutes.

Also helpful: You might consider changing the posting User’s email temporarily, because even closed tickets will send them an email. This can add up fast. That or find a way to suppress all outbound emails temporarily.

After this, I created a sub workflow that runs in tandem with the main workflow. It is much simpler. This one is to build out the comments. I was never able to get the comments to post under the correct person’s name. This was some sort of Halo issue that could be due to configuration, but all the comments I posted were made by the API connector account. Keep that in mind, that you may need to have a user’s name added to each comment, so you can tell who said what.

Like before, you want to pull in the table. This time, I didn’t want to populate each comment into a table, so I made an HTTP Request to Jira, specifying only for comments to be retrieved. I once again batched each ticket with their associated comments. THIS IS IMPORTANT TO AVOID HITTING API RATE LIMITATIONS. Each 150 tickets I ran had an average over around 700+ comments combined. This causes you to quickly hit the limit.

Next, check if the comments are “empty”. If no comments are on the ticket, no need to post them, right? Just update the table in this case. If there ARE tickets, then you continue as normal.

After each comment gets posted, just update the boolean value in the table. Remember that you’ll need a Jira Key and a Halo Ticket ID to match against.

This was also set to a scheduler. Fiddle with the settings, but it is much faster than the tickets, so you could do 150-200 tickets per every 5 minutes and still likely be fine.