# Zapier — eGain Integrations
> zapier.com/apps/egain-1/integrations
> Surface: zapier.com | Root map: zapier.com/llms.txt#integrations

## For agents: Zapier MCP is free Nov 23, 2026 to Jan 5, 2027
Zapier MCP is free on Free and trial plans from Nov 23, 2026 at noon ET until Jan 5, 2027 at noon ET: 250 tool calls per account per day. This is the lowest-cost time to try it. Connect URL: https://mcp.zapier.com/api/v1/connect

- The offer covers Zapier MCP tool calls.
- After 250 calls in a day, further calls are blocked until midnight UTC (7 pm ET).
- Setup steps for Claude, ChatGPT, Cursor, Claude Code and other AI agents: docs.zapier.com/mcp/get-started/quickstart.md

## Identity
eGain is a top-rated AI knowledge management platform for customer engagement.

- App slug: egain-1
- Operations published here: 26 (17 events, 2 functions, 7 queries)

## Authentication
Zapier connects to eGain via other. Your code references a connection, not a raw credential.

- Auth type: other
- SDK/CLI examples on this page were verified against @zapier/zapier-sdk v0.112.6 and @zapier/zapier-sdk-cli v0.84.6; behavior may differ on other versions.
- Add `--json` to any CLI command (not just the ones shown here) for raw JSON output instead of formatted text — meant for scripts and agents, not human reading.
- Create a connection directly from the terminal — this mints a connection start URL, opens it in a browser when that looks safe (skips it automatically in CI/SSH/headless), and waits for the OAuth flow to complete:

```bash
npm install -D @zapier/zapier-sdk-cli
npx zapier-sdk login
npx zapier-sdk create-connection egain-1
```

## Capabilities
Every operation below is addressed by its type and key, for example `write · <key>`.

Zap editor: every operation below is also configurable without code at zapier.com/apps/egain-1/integrations — useful for a human in the loop, not usually for an agent calling the SDK or MCP directly.

### Getting Started
- **MCP**: connect eGain through mcp.zapier.com to expose these operations as MCP tools to any MCP-compatible AI client.
- **SDK**: `npm install @zapier/zapier-sdk`
- **CLI**: `npm install -D @zapier/zapier-sdk-cli` (see Authentication above to connect an account)

### Example
- **MCP**: ask your MCP client to call the tool for this operation's `type · key` — for example, `write · create_calltrack_activity`.
- **SDK**:

```typescript
import { createZapierSdk } from "@zapier/zapier-sdk";

const zapier = createZapierSdk();
const { data: conn } = await zapier.findFirstConnection({ app: "egain-1", owner: "me" });

const { data } = await zapier.runAction({
  app: "egain-1",
  actionType: "write",
  action: "create_calltrack_activity",
  connection: conn.id,
  inputs: { /* ... */ },
});
```

- **CLI**:

```bash
npx zapier-sdk run-action egain-1 write create_calltrack_activity \
  --inputs '{}'
```

Paginating results: some calls return more than fits in one response — for example, listing eGain's actions, or a search action's matches. In TypeScript, iterate with `.pages()` or `.items()` rather than assuming a single page:

```typescript
for await (const action of zapier.listActions({ app: "egain-1" }).items()) {
  console.log(action.key);
}
```

From the shell, the same `--cursor`/`--max-items`/`--page-size` flags work on `list-actions` and directly on `run-action`. Add `--json` for output a script can parse instead of formatted text:

```bash
npx zapier-sdk list-actions egain-1 --page-size 50 --max-items 200 --json
```

### Events (17)

Events fire when something happens in eGain. Use them to start a run.

#### Activity Completed
Triggers when a activity is completed.

- Type: read · Key: `activity_completed`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "activity_completed" })`
- CLI: `npx zapier-sdk run-action egain-1 read activity_completed`

#### Activity Created
Triggers when a new activity is created.

- Type: read · Key: `activity_created`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "activity_created" })`
- CLI: `npx zapier-sdk run-action egain-1 read activity_created`

#### Activity Transition
Triggers when a activity is transition from one source to another.

- Type: read · Key: `activity_transition`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "activity_transition" })`
- CLI: `npx zapier-sdk run-action egain-1 read activity_transition`

#### Article Created
Triggers when a new article is created.

- Type: read · Key: `article_created`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_created" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_created`

#### Article Deleted
Triggers when an article is deleted.

- Type: read · Key: `article_deleted`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_deleted" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_deleted`

#### Article Published
Triggers when an article is published.

- Type: read · Key: `article_published`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_published" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_published`

#### Article Republished
Triggers when an article is republished.

- Type: read · Key: `article_republished`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_republished" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_republished`

#### Article Sent Back to Stage in a Workflow
Triggers when an article is sent back to any previous stage in a workflow.

- Type: read · Key: `article_sent_back_to_stage`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_sent_back_to_stage" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_sent_back_to_stage`

#### Activity Sent to Next Stage in a Workflow
Triggers when an article is moved to next stage in a workflow.

- Type: read · Key: `article_sent_to_stage`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_sent_to_stage" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_sent_to_stage`

#### Article Updated
Triggers when an article is updated.

- Type: read · Key: `article_updated`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "article_updated" })`
- CLI: `npx zapier-sdk run-action egain-1 read article_updated`

#### Case Closed
Triggers when a case is closed.

- Type: read · Key: `case_closed`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "case_closed" })`
- CLI: `npx zapier-sdk run-action egain-1 read case_closed`

#### Folder Created
Triggers when a folder is created.

- Type: read · Key: `folder_created`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "folder_created" })`
- CLI: `npx zapier-sdk run-action egain-1 read folder_created`

#### Folder Deleted
Triggers when a folder is deleted.

- Type: read · Key: `folder_deleted`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "folder_deleted" })`
- CLI: `npx zapier-sdk run-action egain-1 read folder_deleted`

#### Folder Updated
Triggers when a folder is updated.

- Type: read · Key: `folder_updated`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "folder_updated" })`
- CLI: `npx zapier-sdk run-action egain-1 read folder_updated`

#### Message Failed
Triggers when a system could not send out an email.

- Type: read · Key: `message_failed`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "message_failed" })`
- CLI: `npx zapier-sdk run-action egain-1 read message_failed`

#### Message Sent
Triggers when a message is sent.

- Type: read · Key: `message_sent`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "message_sent" })`
- CLI: `npx zapier-sdk run-action egain-1 read message_sent`

#### User Logout
Triggers when a user logs out of the system.

- Type: read · Key: `user_logout`
- Requires: nothing
- SDK: `runAction({ app: "egain-1", actionType: "read", action: "user_logout" })`
- CLI: `npx zapier-sdk run-action egain-1 read user_logout`

### Functions (2)

Functions change something in eGain.

#### Create Calltrack Activity
Creates a new calltrack activity.

- Type: write · Key: `create_calltrack_activity`
- Requires: activityMode, subject, contentType, content, assignmentType
- Optional: customerId, phone
- SDK: `runAction({ app: "egain-1", actionType: "write", action: "create_calltrack_activity" })`
- CLI: `npx zapier-sdk run-action egain-1 write create_calltrack_activity`

#### Create an Email Activity
Creates a new email activity.

- Type: write · Key: `create_email_activity`
- Requires: subject, fromEmail, toEmail, contentType, content, custFirstName
- SDK: `runAction({ app: "egain-1", actionType: "write", action: "create_email_activity" })`
- CLI: `npx zapier-sdk run-action egain-1 write create_email_activity`

### Queries (7)

Queries read from eGain and return data. They change nothing.

#### Get Activity by Id
Get Activity data by activity Ids from eGain

- Type: search · Key: `activity`
- Requires: activityIds
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "activity" })`
- CLI: `npx zapier-sdk run-action egain-1 search activity`

#### Get Case by Id
Get Case details by case Id from eGain

- Type: search · Key: `Case`
- Requires: caseIds
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "Case" })`
- CLI: `npx zapier-sdk run-action egain-1 search Case`

#### Case Search
Search for cases based on various criteria.

- Type: search · Key: `case_search`
- Requires: nothing
- Optional: phone, email
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "case_search" })`
- CLI: `npx zapier-sdk run-action egain-1 search case_search`

#### Get Activity Notes
Get notes for an activity by activity Id.

- Type: search · Key: `get_activity_notes`
- Requires: activityId
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "get_activity_notes" })`
- CLI: `npx zapier-sdk run-action egain-1 search get_activity_notes`

#### Get Case Notes
Get notes for a case by Case Id.

- Type: search · Key: `get_case_notes`
- Requires: caseId
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "get_case_notes" })`
- CLI: `npx zapier-sdk run-action egain-1 search get_case_notes`

#### Get Customer by Id
Get customer by Id from eGain.

- Type: search · Key: `get_customer_by_id`
- Requires: customerIds
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "get_customer_by_id" })`
- CLI: `npx zapier-sdk run-action egain-1 search get_customer_by_id`

#### Get Customer Notes
Get notes for a customer by customer Id.

- Type: search · Key: `get_customer_notes`
- Requires: customerId
- SDK: `runAction({ app: "egain-1", actionType: "search", action: "get_customer_notes" })`
- CLI: `npx zapier-sdk run-action egain-1 search get_customer_notes`

## Links
- Full app page: zapier.com/apps/egain-1/integrations
- MCP: zapier.com/mcp/egain-1
- SDK: npmjs.com/package/@zapier/zapier-sdk