cortana-ai

Cortana AI community node for n8n — receive and create conversions with full attribution data.

Package Information

Downloads: 526 weekly / 526 monthly
Latest Version: 0.1.11
Author: Cortana AI

Documentation

n8n-nodes-cortana-ai

This is an n8n community node package for Cortana AI. It provides a trigger node and action node to integrate Cortana AI's conversion attribution data with your n8n workflows.

Nodes

  • Cortana AI Trigger — Starts a workflow instantly when a new conversion is recorded in Cortana AI
  • Cortana AI — Create conversions, list conversions, search contacts, and get conversion types

Installation

In n8n Cloud or Self-Hosted

  1. Go to Settings → Community Nodes
  2. Click Install
  3. Enter: n8n-nodes-cortana-ai
  4. Toggle "I understand the risks" and click Install

Manual (Docker / npm)

npm install n8n-nodes-cortana-ai

Then restart your n8n instance.

Authentication

  1. In n8n, go to Credentials → New → Cortana AI API
  2. Enter your:
    • API Key — Generate in Cortana AI → Business Settings → API & Webhooks tab (starts with ak_live_)
    • Business ID — Found in the URL when viewing business settings

Usage

Cortana AI Trigger (Recommended Starting Point)

Add this node at the start of any workflow to receive real-time conversion data:

[Cortana AI Trigger] → [Slack: Send Message]
[Cortana AI Trigger] → [Google Sheets: Add Row]
[Cortana AI Trigger] → [HubSpot: Create/Update Contact]

Output data structure:

{
  "id": "evt_...",
  "event": "conversion.created",
  "timestamp": "2024-01-15T10:30:00.000Z",
  "conversion": {
    "id": "clx...",
    "occurredAt": "2024-01-15T10:30:00.000Z",
    "eventValue": 99.99,
    "currency": "USD",
    "attributionSource": "facebook",
    "attributionMedium": "cpc",
    "attributionCampaign": "winter-promo",
    "attributionMethod": "TRACKED",
    "conversionType": "Lead Form"
  },
  "contact": {
    "id": "clx...",
    "email": "john@example.com",
    "phone": "+1234567890",
    "name": "John Smith",
    "firstName": "John",
    "lastName": "Smith"
  },
  "attribution": {
    "source": "facebook",
    "medium": "cpc",
    "campaign": "winter-promo",
    "method": "TRACKED"
  },
  "business": {
    "id": "clx...",
    "name": "Acme Corp"
  }
}

Cortana AI Action: Create Conversion

Use to send conversions from other tools into Cortana AI:

[Typeform: New Submission] → [Cortana AI: Create Conversion]
[Stripe: Payment Succeeded] → [Cortana AI: Create Conversion]
[HubSpot: Deal Closed] → [Cortana AI: Create Conversion]

Required fields:

  • Conversion Type (select from dropdown)
  • Email OR Phone (at least one)

Optional fields:

  • Contact Name, Revenue, Currency, UTM Source/Medium/Campaign/Content/Term, Note

Example Workflow: New Conversion → Slack Alert

  1. Add Cortana AI Trigger node
    • Events: Conversion Created
  2. Add Slack node (Send Message)
    • Channel: #conversions
    • Message: New {{$json.conversion.conversionType}} from {{$json.contact.email}} — ${{$json.conversion.eventValue}} via {{$json.attribution.source}}

Example Workflow: Typeform Lead → Cortana AI

  1. Add Typeform Trigger node
  2. Add Cortana AI node
    • Resource: Conversion
    • Operation: Create
    • Conversion Type: "Lead Form"
    • Email: {{$json.email}}
    • Contact Name: {{$json.name}}

Webhook Security

All webhooks sent by Cortana AI include an X-Cortana AI-Signature header with an HMAC-SHA256 signature. The signing secret is stored per subscription and can be used to verify authenticity in a Function node:

const crypto = require('crypto');
const secret = 'whsec_...'; // from subscription creation
const body = JSON.stringify($input.item.json);
const expected = 'sha256=' + crypto.createHmac('sha256', secret).update(body).digest('hex');
const received = $input.item.headers['x-agentkong-signature'];
if (expected !== received) throw new Error('Invalid webhook signature');
return $input.item;

Development

# Clone and install
git clone https://github.com/Cortana AI/n8n-nodes-cortana-ai
cd n8n-nodes-cortana-ai
npm install

# Build
npm run build

# Watch mode
npm run dev

# Lint
npm run lint

License

MIT

Discussion