n8n Workflow Integration

Use ContextGate in n8n workflows with HTTP requests

Integrate ContextGate into your n8n workflows to access business data from Salesforce, QuickBooks, HubSpot, and 100+ other apps using HTTP requests.

1 Get Your ContextGate Bearer Token

  1. Log into your ContextGate workspace
  2. Navigate to the Install page
  3. Click View API Token and copy your bearer token

💡 Your token can be found on the Install page in your workspace settings.

2 Configure Your Toolbox (Optional)

Customize which connections, tools, and datasets are available through the API. This allows you to:

  • Limit access to specific connections for security
  • Create focused toolsets for different use cases
  • Exclude sensitive datasets from API access

On the Install page , you can manage your Active Toolbox:

Toolbox Manager

3 Add HTTP Request Node to Your Workflow

In your n8n workflow:

  1. Click the + button to add a new node
  2. Search for and select HTTP Request
  3. Configure the node with these settings:

HTTP Request Configuration:

  • Method: POST
  • URL: https://api.contextgate.ai/v1/query
  • Authentication: Header Auth
  • Header Name: Authorization
  • Header Value: Bearer YOUR_TOKEN_HERE

4 Configure Request Body

Set the body type to JSON and use one of these examples:

Example 1: Query Salesforce Opportunities

Example 2: Query QuickBooks Invoices

Example 3: Query HubSpot Contacts

5 Process the Response Data

ContextGate returns data in this format:

Access the data in subsequent nodes using:

  • `$json.data` - Array of records
  • `$json.total` - Total record count
  • `$json.connection` - Connection name

ContextGate API Endpoints

Endpoint Method Purpose
/v1/queryPOSTQuery data from connected apps
/v1/connectionsGETList your active connections
/v1/resourcesGETList available datasets per connection

Troubleshooting

🔴 401 Unauthorized Error

Verify your bearer token is correct and includes "Bearer " prefix

🔴 404 Not Found Error

Check the connection name and dataset name match your ContextGate setup

🔴 No Data Returned

Verify your connection is active in ContextGate and try removing filters

🚀 Next Steps