Prepare CV Data for Translation

Decode Chewbacca's CV - Challenge 3 of 6
Difficulty
2/10
Tags
EssentialsHTTP RequestEdit Fields (Set)split-outExpressionsJSONArrays

You're a headhunter. You've fetched and extracted a CV, but the fields contain values like "RAAAAWRGWAWGGR" and "WWWRRRAAAGH". These aren't words, they're Wookiee growls!

The candidate is Chewbacca. You have access to a translation API, but it only accepts one word at a time. The API provides a fieldsToTranslate array. Split it into separate items so you can translate each one.

What you'll practice:

  • Using the Split Out node to separate array items
  • Understanding how n8n processes multiple items
  • Preparing data for batch processing

Your Task

  1. 1Copy the exercise below
  2. 2Paste into your n8n editor (Ctrl+V)
  3. 3Solve it — use hints if you get stuck
  4. 4Check the solution when done

The CV API provides a fieldsToTranslate array containing each field that needs translation. Your task is to split this array into separate items so each can be translated individually.

  1. The workflow already fetches the CV and extracts the fields
  2. Add a Split Out node after the Extract Fields node
  3. Configure the Split Out node:
    • Set "Field To Split Out" to fieldsToTranslate
  4. Execute the workflow and examine the output

Expected output: 6 separate items, each with field and value properties:

{ "field": "name", "value": "RAAAAWRGWAWGGR" }
{ "field": "species", "value": "WWWRRRAAAGH" }
{ "field": "homeworld", "value": "GRRRRWAAAA" }
...

Hints

  1. Add a Split Out node (found under "Transform" in the node panel)
  2. Connect it to the output of the Extract Fields node
  3. In the Split Out settings, find "Field To Split Out"
  4. Enter fieldsToTranslate as the field name
  5. Execute and check the output - you should see 6 separate items
  6. Each item contains field (the name like "name", "species") and value (the Wookiee growl)

Explanation

Why we split into separate items:

The translation API accepts one word at a time. To translate all CV fields, we need to call the API once per field. By splitting the array into separate items, n8n can process each one through the subsequent nodes.

The Split Out node:

The Split Out node takes an array field and creates a separate n8n item for each element:

  • Input: 1 item with fieldsToTranslate containing 6 objects
  • Output: 6 separate items, one for each object in the array

This is one of the most useful nodes for preparing data for batch processing. Whenever you have an array that needs to be processed item by item, Split Out is your go-to node.

What happens next:

Now that each field is a separate item, in the next challenge you'll send each one to the translation API. n8n automatically processes all 6 items through the subsequent nodes, calling the API for each Wookiee growl.

Why the API provides fieldsToTranslate:

In real-world scenarios, APIs often provide data in formats optimized for processing. The fieldsToTranslate array is pre-built to make translation easy - each object has a field name and value to translate, ready for the translation API.

Copy the Solution

Paste into n8n with Ctrl+V to compare with your approach.

Login to see the exercise

Create an account to access challenges and track your progress.

Log in to see exercise
Step 3 of 6

Next up

Translate CV Fields

Related Content

Continue your learning journey with these related challenges and guides: