Developers

Importer Tool: Import Images, Users, Sections, and Posts

importing to RebelMouse

Welcome to the comprehensive guide on managing bulk data in RebelMouse through importing.

This article explains how to import your online content, like images, posts, and significant sections, to ensure your most essential documents stay the same when you move from your previous content management system (CMS) to RebelMouse.

Before going through our tutorial, please ensure that you've read our previous documentation first: Set up Your Import Files. It will help you make sense of the importing process and ensure that your data is streamlined for success!

The following are the types of imports you can complete and the objects that are supported:

  • You can createand updateUsers and Posts
  • You can create, but not update, Sections and Images

Steps:

  • Getting Started
  • Upload File or Choose Feed
  • Mapping Step
  • One-to-One Mapping
  • Code Mapping (Advanced)
  • Reusing the Most Used Functions
  • Reusing the Same Mapping
  • Ready With Your Mapping? Move to Validate
  • Let's Import

Getting Started

Once you've exported the data from your previous CMS and you've set up your files in the expected format, follow the instructions below to import into RebelMouse:

  • Go to your Importer Dashboard by entering yourdomain.com/r/tasks/importer in your web browser's URL address bar.

Once there, you will see the following screen:

  • You can choose any of the available objects to start the import process. As we mentioned in our previous setup article, we suggest starting with images.
  • In this example, we'll start with images:

Upload File or Choose Feed

You have two options to import data from:

  • Uploading a File
  • Using a Feed

Review the requirements and technical limits for any limitations.

Upload File

In this step you can choose to upload one of your files by clicking on the blue area. If your file is properly formatted (not broken), then once the file has been uploaded you will see the following green screen:

After uploading, continue to the Mapping Step.

If you receive the following error, please contact support@rebelmouse.com.

Choose Feed

Note: We currently only accept JSON Feeds.

If you select the option to import from a feed URL, you will need to add the details of the feed you want to pull data from:

  • URL path for the feed
  • Pagination param (optional)
  • Pagination type is either offset or page
  • Basic Auth User (if any)
  • Password (if any)

Note: Offset pagination involves specifying a numerical offset to start retrieving data from a certain position in a dataset, allowing you to fetch a specific number of items after that offset.

For example, if you have a list of 100 items and you set an offset of 20, you would then retrieve items 21–40.

Page pagination divides the dataset into fixed-size pages, and users request specific pages to navigate through the data in a structured manner.

For example, if you have a list of 100 items and the pagination is set to be pages of 20 items each, you would find items 21–40 by adding "page=2" as a parameter.

Mapping Step

Once your file has been successfully uploaded, or your URL feed has been validated, it's time to move on to mapping:

Goal: The goal of this step is to map each property (field) coming from the original input source (i.e., the feed you've connected or the file you've uploaded) to the RebelMouse-accepted format for each object.

This can be achieved using two different methods:

  1. One-to-One Mapping: This is where one field is mapped directly to another field. This assumes that the property you are mapping to has the same property type as the RebelMouse destination property, and that it's ready to be imported as is.
  2. Code Mapping (Advanced): This uses simple JavaScript code to transform the input property into the RebelMouse-accepted format as needed.

For this goal to be achieved, we have three main areas on the screen you need to use:

Input Properties (left area)

The area on the left will contain a random sample of 20 records that were pulled from the files you've uploaded or the URL feed you've chosen to help visualize and configure the mapping.

Object Properties (middle area): Actual Mapping

The area in the middle is where you will define if you want to use the One-to-One Mapping or Code Mapping method, and which input field (or fields) will be mapped to which RebelMouse property.

Preview Area (right area)

Once you perform your mapping in the middle area, you can then click on the Preview All Fields button to see a preview of what the destination object will look like for your sample records.

Let's work through some examples.

One-to-One Mapping

Example: Simple Image CSV

Import images using One-to-One Mapping.

Imagine a CSV file that looks like the following:

After importing it and reaching the mapping step, the screen will look like this:

We'll only map Image_url (since it's required) and alt text:

Click the Preview All Fields button to view the entire property layout.

What happens if the data is not prepared for importing, or is a different file type than what the destination accepts? In that case, you will need to use Code Mapping.

Code Mapping (Advanced)

To access Code Mapping , click Choose a Tool and then Code:

That will open up the TypeScript/JavaScript code editor as shown below:

Using the same example above, where the input field has been prepared and specified for a particular RebelMouse property, we can replicate the One-to-One Mapping's results as follows:

Here's the same approach in GIF format:

It's important to note that:

  1. Each code area already tells you which data type it expects:

In this case, image_url needs to use the data type "string."

And if you return a different data type, the code will let you know:

In this example, Type "number" is not assignable to type "string."

Now, let's try a harder example.

Code Mapping (Advanced)

In this example, we have a CSV file that contains only one column: image_tags. And it also contains all of the information we need for our mapping, such as image_url, alt text, caption, etc.

So when we upload it, it looks like this:

As a result, we'll want to use code to extract the image URL and the image alt text from the HTML string coming from the input property image_tags.

The way to do that is as follows:

You can create any JavaScript function (returnImgSrc) that handles the task you need. To strip the first src URL from an HTML string, you can call it from inside the transformation function, where you then pass the value of the input to it.

If no errors are displayed, you can then test the results by previewing them by clicking the Preview All Fields button:

Note: You can use as many input fields as you want, including the entire input object. You can also call as many functions as you need.

Important Limitations

  • You cannot use external libraries or DOM libraries.
  • You can only use Vanilla JavaScript. So for HTML transformations, we recommend you use RegEx.
  • You are not allowed to do external HTTP requests.

Reusing the Most Used Functions

If you're not a JavaScript developer, don't worry! We've got you covered with JavaScript 101. We can assist you on how to perform basic operations.

Reusing the Same Mapping

upload and download mappings

If you have a large import task, preparing your data may take some time.

Don’t worry though, because we have a feature that enables you to easily download or upload your mapping work. This way you can save your progress and pick up where you left off later. It also allows you to share the work with different colleagues.

And finally, if you have a blocker and need RebelMouse's support team to assist you, please send over both the object file (e.g., users, images) that you're importing and the related mapping file to support@rebelmouse.com.

To download your current mapping, click the download arrow icon. To upload a saved mapping, lick the upload arrow icon.

Ready With Your Mapping? Move to Validate

The validation step ensures that your uploaded data is properly structured and all of the transformations you've specified in the previous step work well. If any data record doesn't conform as needed, such as a field having an incorrect or untreated data type that disrupts the mapping logic, an error will appear to prevent import problems.

If you encounter an error during the validation step, we recommend that you download the error CSV and try to understand how to fix the flagged issue before continuing to import.

Let's Import

If the validation process goes smoothly and there are no errors, you're good to proceed with the import step. During import, we transfer your carefully prepared, mapped, and transformed data to RebelMouse through our public API. Should any issues arise during this phase, it may be due to API limitations. You can find additional information about API limits in our documentation located at https://apis.rebelmouse.dev.

Please note that handling large files may extend the process duration. You can monitor progress on the initial import page, and once the import is complete, it will be visible in the import history section.

Please email support@rebelmouse.com for more direction on the following if needed:

  1. Your import file
  2. The last mapping file you've downloaded using the importer tool

What Is RebelMouse?
Request a Proposal

Where 
Websites Are Built

The Fastest Sites in the World Run on RebelMouse

Let’s Chat

new!

RebelMouse Performance Monitoring

Real-Time Core Web Vitals

Get Started
DISCOVER MORE

Our Core Features

Our platform is a complete digital publishing toolbox that's built for modern-day content creators, and includes game-changing features such as our:

Layout and Design toolLayout and Design tool on mobile
animate
animate

Why RebelMouse?

Unprecedented Scale

RebelMouse sites reach more than 120M people a month, with an always-modern solution that combines cutting-edge technology with decades of media savvy. And due to our massive scale, 1 in 3 Americans have visited a website powered by RebelMouse.

120M+ Users
550M+ Pageviews
17+ Avg. Minutes per User
6+ Avg. Pages per User

Today's Top Websites Use RebelMouse

Thanks to the tremendous scale of our network, we are able to analyze a wealth of traffic data that informs our strategies and allows us to be a true strategic partner instead of just a vendor.

upworthyindy100Vault12No Film SchoolRawStoryResponsible StatecraftPrideMNI Market NewsPremierGuitarPenskeINN Educate Brand ConnectThe FulcrumGZEROOkayafricaBrit+CoPaper MagazinePowerToFlyNarcityCommonDreamsAllBusiness

What Clients Say

We’re here to help you weigh and understand every tech and strategic decision that affects your digital presence. Spend less time managing everything yourself, and more time focused on creating the quality content your users deserve.

Case Studies

A Team Built Like No Other

RebelMouse employs a unique, diverse, and decentralized team that consists of 70+ digital traffic experts across more than 25 different countries. We have no central office, and we cover every time zone to ensure that we’re able to deliver amazing results and enterprise-grade support around the clock.

Our team is well-versed in all things product, content, traffic, and revenue, and we strategically deploy ourselves to help with each element across all of our clients. We thrive on solving the complex.

Let's Chat