Skip to main content

Import Data from SaaS Services

Create Context Graph can pull data from SaaS services and map it into your Neo4j knowledge graph. This guide covers how to configure connectors during project scaffolding and how to re-import data afterward.

Available Connectors

ServiceWhat It ImportsAuth Method
GitHubRepositories, issues, pull requests, commits, users, code reviewsPersonal access token (PAT)
NotionPages, databases, blocks, users, commentsInternal integration token
JiraProjects, issues, sprints, users, comments, worklogsAPI token + Atlassian email
SlackChannels, messages, threads, users, reactionsBot token (OAuth)
GmailEmails, threads, contacts, labels, attachments (metadata)Google OAuth 2.0 / service account
Google CalendarEvents, attendees, calendars, recurring seriesGoogle OAuth 2.0 / service account
SalesforceAccounts, contacts, opportunities, leads, cases, activitiesOAuth 2.0 connected app

Selecting Connectors in the Interactive Wizard

When you run create-context-graph my-app, the wizard includes a step to connect SaaS services:

  1. Select "Connect to SaaS services" when prompted for your data source.
  2. Pick one or more connectors from the checklist.
  3. Enter the required credentials for each selected connector (tokens, keys, etc.).
  4. The scaffolded project will include connector configuration in .env and an import pipeline in backend/scripts/.

Non-Interactive CLI Usage

Pass --connector flags to skip the wizard:

create-context-graph my-app \
--domain software-development \
--framework pydanticai \
--connector github \
--connector slack

You can combine --connector with any domain and framework flags. Each connector will prompt for its credentials unless they are already set as environment variables.

Gmail and Google Calendar Setup

Gmail and Google Calendar connectors use the Google Workspace CLI (gws) for OAuth flows. When you select either connector, the wizard checks whether gws is installed:

  • If found, it uses gws to handle the OAuth consent flow and token refresh.
  • If not found, the wizard offers to install it automatically (pip install gws).
  • You can skip the install and provide a service account JSON key file instead.

Both connectors share the same Google Cloud project credentials, so configuring one makes the other available with no extra setup.

Re-Importing Data in a Generated Project

After scaffolding, the generated project includes Makefile targets for data import:

# Import data from all configured connectors
make import

# Import data and seed the graph with demo scenarios
make import-and-seed

These targets read credentials from the .env file in the project root.

Connector Credential Setup

GitHub

  1. Go to Settings > Developer settings > Personal access tokens > Tokens (classic).
  2. Generate a token with repo, read:org, and read:user scopes.
  3. Set GITHUB_TOKEN in .env.

Notion

  1. Go to notion.so/my-integrations and create an internal integration.
  2. Copy the Internal Integration Secret.
  3. Share the target pages/databases with your integration.
  4. Set NOTION_TOKEN in .env.

Jira

  1. Go to id.atlassian.com/manage-profile/security/api-tokens and create an API token.
  2. Set JIRA_EMAIL, JIRA_API_TOKEN, and JIRA_BASE_URL (e.g., https://yourorg.atlassian.net) in .env.

Slack

  1. Create a Slack app at api.slack.com/apps.
  2. Add bot token scopes: channels:history, channels:read, users:read, reactions:read.
  3. Install the app to your workspace and copy the Bot User OAuth Token.
  4. Set SLACK_BOT_TOKEN in .env.

Gmail / Google Calendar

  1. Create a project in Google Cloud Console.
  2. Enable the Gmail API and/or Google Calendar API.
  3. Create OAuth 2.0 credentials (Desktop app type) and download the JSON file.
  4. Set GOOGLE_CREDENTIALS_FILE in .env pointing to the downloaded JSON.

Salesforce

  1. In Salesforce Setup, go to App Manager and create a new Connected App.
  2. Enable OAuth and select scopes: api, refresh_token, offline_access.
  3. Set SALESFORCE_CLIENT_ID, SALESFORCE_CLIENT_SECRET, SALESFORCE_USERNAME, SALESFORCE_PASSWORD, and SALESFORCE_SECURITY_TOKEN in .env.