Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

635
Views
How can I import relational data when parsing a file in Strapi?

I’m writing a script to import bulk data entries for organizations. In Strapi, however, I have a number of relational fields for the organizations with things like “area_of_focus”, “languages”, etc. My question is, how can I import the data properly for the relational when it’s in a dropdown in the strapi admin panel? I’ve included the section of the code that maps and a screenshot of the relational data for reference.

All the data without a relation imports fine, it’s just any relational field that doesn’t work. I just have a feeling it’s how I’m calling them, but I’m unsure.

Relational Fields:

enter image description here

Mapping Code:

await Promise.all(data.map(entry => 
  strapi.query('organization').create({
    name: entry.name,
    EIN: entry.EIN,
    locations: [
      {
        streetAddress: entry.streetAddress,
        city: entry.city,
        state: entry.state,
        zipCode: entry.zipCode,
        county: entry.county,
        locationType: entry.locationType,
      }
    ],
    contact: [
      {
        firstName: entry.firstName,
        lastName: entry.lastName,
        email: entry.email,
        phone: entry.phone,
        phoneExtension: entry.phoneExtension,
      }
    ],
    description: entry.description,
    webSite: entry.webSite,
    email: entry.orgEmail,
    phone: entry.orgPhone,
    priority_area_topics: entry.priority_area_topics,
    organizationType: entry.organizationType,
    areaOfFocus: entry.organization_area_of_focus,
    localServiceArea: entry.local_service_areas,
    localServiceAreaDescription: entry.localServiceAreaDescription,
    helpDesk: entry.helpDesk,
    officeHours: entry.officeHours,
    maximumResponseTime: entry.maximumResponseTime,
    languages: entry.languages,
  })
));
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!