An API returns JSON in a different shape from what the next app needs. How do you handle it?
Automation workflows · Beginner 3
Short answer
Look at a real sample of both shapes first. Then map each target field from the source: rename fields, pull values out of nested objects, split or join text, convert dates and numbers, and loop over arrays. Test with edge cases such as missing fields.
Deeper answer
Typical traps: dates in different formats or time zones (store in ISO format, and use Asia/Kolkata for display in India), numbers sent as strings, optional fields that are sometimes absent, and arrays where you expected one object.
In n8n, use the Edit Fields node, or a small Code node for anything complex. Keep transformations in one clearly named step so the next person can see what changes, and add a check that stops the workflow with a clear error if a required field is missing.
What a strong answer covers
- Starts from real samples of both shapes
- Renames and maps fields, including nested ones
- Converts types and dates
- Handles arrays
- Tests edge cases like missing fields
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- How do you handle an array of line items?
- What would you do if a required field is sometimes missing?
Common mistakes
- Mapping from memory instead of a real sample
- Ignoring time zones in dates
Learn it
- Design an automation that reads supplier invoices from email and enters them into accounting software.
- An API your workflow calls starts returning 429 errors. What do you do?
- Your automation created every order twice last night. How do you find and fix it?
- Tell me about an automation you built and how much time it saved.
- How would you build AI triage for a support inbox?
- The AI in your invoice automation sometimes reads the total wrong. How do you stop wrong amounts reaching the accounts?
- A client's old billing software has no API. How would you automate data entry into it?
- How do you measure the return on an automation project?
- How would you choose between n8n, Zapier, Make and Power Automate?
- When would you use RPA instead of an API integration?
- Walk me through building a simple automation in n8n or Zapier.
- What is a webhook, and how is it different from polling?
- How do you decide which process to automate first?
- How would you design a WhatsApp assistant for a small business, and when should it hand over to a person?
- Your automation fails halfway through. How do you design for that?