How Import Works
Import is the first stage of every implementation. It fetches assets from a source HubSpot portal, resolves their dependencies, and stores everything in JetStack AI’s cloud infrastructure. This page explains what happens under the hood.
Overview
Section titled “Overview”When you launch an import, JetStack AI:
- Connects to the source portal using its stored OAuth credentials
- Fetches each selected asset via the HubSpot API
- Parses the asset configuration through a specialized parser for that asset type
- Discovers dependencies referenced within the asset
- Recursively imports each dependency before the parent asset
- Extracts and caches images to Firebase Storage
- Stores the parsed asset data in JetStack AI’s cloud database
The entire process is read-only. JetStack AI never creates, modifies, or deletes anything in the source portal.
Depth-First Dependency Traversal
Section titled “Depth-First Dependency Traversal”JetStack AI uses depth-first traversal to resolve the dependency tree. This means every dependency is fully imported before the asset that references it.
Here is a simplified example. You select a workflow for import. JetStack AI discovers that the workflow references a list and an email:
Workflow "Lead Nurture" -> List "MQL Contacts" -> Form "Contact Us" -> Email "Welcome Sequence #1" -> Template "Marketing Email v2"The import order is:
- Form “Contact Us” (deepest dependency, no further deps)
- List “MQL Contacts” (depends on form, which is now imported)
- Template “Marketing Email v2” (deepest in the email branch)
- Email “Welcome Sequence #1” (depends on template, now imported)
- Workflow “Lead Nurture” (all dependencies satisfied)
This ordering guarantees that when any asset is stored, every asset it depends on is already present in the library. This same ordering principle is later used during deployment to ensure assets are created in the correct sequence.
Specialized Parsers
Section titled “Specialized Parsers”JetStack AI includes 13 specialized parsers, one for each major asset type. Each parser understands the internal structure of its asset type and knows where to look for dependency references.
For example:
- The workflow parser extracts references from enrollment criteria, action definitions (send-email, add-to-list), branching conditions, and goal criteria
- The list parser scans filter groups for references to forms, emails, other lists, workflows, and page views
- The page parser identifies template references, embedded forms, HubDB data sources, and linked template modules
- The email parser extracts template references, blog RSS feeds, linked workflows, and subscription types
Each parser produces a normalized asset record with a consistent structure: the asset’s configuration data, a list of discovered dependencies, and metadata such as name, type, and source portal ID.
Dependency Auto-Detection
Section titled “Dependency Auto-Detection”You do not need to know what an asset depends on. When you select a workflow for import, JetStack AI automatically detects and imports every list, form, email, pipeline, property, and sub-workflow that the workflow references.
These auto-detected assets are flagged as dependency imports in your Asset Library, distinguishing them from assets you explicitly selected. This is why you may sometimes see more assets in your library than you originally chose — those extras are dependencies that your selected assets require.
See Dependencies and Auto-Import for the complete dependency map.
What Gets Stored
Section titled “What Gets Stored”Each imported asset is stored with the following data:
- Configuration — the full asset definition as returned by the HubSpot API, normalized and parsed
- Dependencies — a list of references to other assets this asset depends on, stored as typed IDs
- Metadata — asset name, type, source portal ID, source asset ID, import timestamp, and the user who performed the import
- Images — any images referenced by the asset (email graphics, page images, blog post thumbnails) are extracted, uploaded to Firebase Storage, and linked to the asset record
Asset data is stored in JetStack AI’s cloud infrastructure (MongoDB for asset records, Firestore for operational state). This storage is independent of the source portal — if the source portal is disconnected or the original asset is deleted, your imported copy remains available.
Image Handling
Section titled “Image Handling”Images embedded in emails, pages, blog posts, and templates are handled specially during import:
- JetStack AI identifies image URLs in the asset’s HTML content and configuration
- Each image is downloaded from the source (typically HubSpot’s CDN or file manager)
- The image is uploaded to Firebase Storage under your organization’s namespace
- The asset record is updated with the new cached image URL
During deployment, these cached images are uploaded to the destination portal’s HubSpot file manager and the asset’s references are updated to point to the new URLs. This ensures images work correctly even if the source portal’s file manager is inaccessible.
Circular Dependency Handling
Section titled “Circular Dependency Handling”In rare cases, two assets may reference each other — for example, a workflow that adds contacts to a list, where the list’s filter criteria reference that same workflow. This creates a circular dependency.
JetStack AI detects circular dependencies by tracking the current processing path during traversal. When a cycle is detected:
- The circular reference is noted in the asset record
- The asset that would cause the cycle is imported with a partial result — its direct data is stored, but the circular reference is deferred
- Import continues normally for all remaining assets
Circular dependencies do not cause import failures. The affected assets are stored with a flag indicating the circular reference, which is resolved during deployment through a two-pass creation strategy.
Import Performance
Section titled “Import Performance”Import duration depends on:
- Number of assets selected — more assets means more API calls
- Depth of the dependency tree — deeply nested dependencies add traversal time
- Size of individual assets — large pages, complex workflows, and image-heavy emails take longer to parse and store
- HubSpot API rate limits — JetStack AI respects HubSpot’s rate limits and uses intelligent retry with backoff when limits are approached
A typical import of 10-20 assets with moderate dependencies completes in under a minute. Large imports with 100+ assets and deep dependency trees may take several minutes. Progress is reported in real time in the Activity Log.
Next Steps
Section titled “Next Steps”- Supported Asset Types — What asset types can be imported and what data is captured
- Selecting Assets to Import — Step-by-step walkthrough of the import wizard
- Dependencies and Auto-Import — Full dependency map and auto-detection details
- Troubleshooting Import Failures — Common errors and how to resolve them