---
original_url: "https://jace.pro/blog/meetup-lab-integrate-repeatably-faster-with-import-sets/"
format: markdown
ai_optimized: true
---

Meetup Lab: Integrate Repeatably Faster with Import Sets- # Meetup Lab: Integrate Repeatably Faster with Import Sets

June 6, 2019 [servicenow ](/tags/servicenow/)[import-sets](/tags/import-sets/)

  Enable AI AnimationThis lab walks through using import sets to handle complex JSON integrations. Author: Jace Benson.
*This lab originally from the [sndevs meetups repo](https://github.com/sndevs/meetups) and [hosted on GitHub Pages](https://sndevs.github.io/meetups/).*

## [Why Import Sets](#why-import-sets)

Integrations are a big part of what we do on the platform. If we follow a few simple steps it can save a lot of time. In the past 6 months my team made integrations to Microsoft Intune, Webex, Solarwinds and Crashplan — because we followed these steps, modifications were simple for all team members.

## [Getting Started](#getting-started)

Open Studio and import the scoped app from: `https://github.com/jacebenson/mn-snug-feb-2019.git`

### [App Branches](#app-branches)

BranchDescriptionMasterVery bare minimum1Includes the Import Set Table2Includes the Script Include to get data and paginate## [Step 1: Getting the Raw Data](#step-1-getting-the-raw-data)

- Go to [https://randomuser.me/api/](https://randomuser.me/api/) and copy the JSON
- We need to flatten the object to access each part
- Go to [https://codebeautify.org/json-to-csv](https://codebeautify.org/json-to-csv) and paste the JSON
- Download and open in Excel

## [What is Flattening?](#what-is-flattening)

Before flattening, the nested JSON structure looks complex:

After flattening, each field becomes a column:

**Checkpoint:** You should have a CSV with flattened columns:

## [Massaging the CSV](#massaging-the-csv)

- Replace `results.0.` with nothing in the column headers
- Save the file

## [Load the Data](#load-the-data)

Navigate to System Import Sets → Load Data and upload your CSV:

**Checkpoint 2:** Verify the import set rows loaded:

If you don’t see the data, switch your branch to `1`.

## [Transform That Complex JSON](#transform-that-complex-json)

- Go to Studio
- Create Application File → “Table Transform Map”
- Map Email, First Name, Last Name
- Coalesce on Email

## [Switch to Branch 2](#switch-to-branch-2)

Branch 2 includes a Script Include to flatten objects and paginate results automatically.

## [Takeaways](#takeaways)

- Following a common import strategy simplifies development for the team
- Allows you to easily massage the data
- Gives your customers visibility into the data you have access to
- REST API integrations can follow this same pattern
- After doing this once, you can easily do it again

---
[View this page on GitHub](https://github.com/jacebenson/jace.pro/tree/main/./src/posts/2019/2019-06-06-meetup-import-sets-lab.md).

[Meetup Lab: Integrate Repeatably Faster with Import Sets](https://jace.pro/blog/meetup-lab-integrate-repeatably-faster-with-import-sets/) [Jace Benson](https://jace.pro) ![Jace Benson](https://jace.pro/icon-512x512.png)

---

*This content is from Jace Benson's ServiceNow and tech blog at jace.pro*
*Original post: https://jace.pro/blog/meetup-lab-integrate-repeatably-faster-with-import-sets/*
