# Ilka

Ilka is an automated Excel reporting agent: create or improve `.xlsx` workbooks with AI, then schedule recurring report packs from Airtable, Google Sheets, QuickBooks, Stripe, HubSpot, or Notion.

Public docs for agents: https://www.ilka.co/llms.txt · https://www.ilka.co/product.md · https://www.ilka.co/glossary.md

The generator UI at `/generate` requires sign-in. Do not scrape `/admin`, `/api` (except documented webhook **receipt** on your server), or gated app routes.

## Installation

There is no npm package. Teams use the web app at [https://www.ilka.co](https://www.ilka.co).

1. Sign up and run one Create or Improve generation (Free: 3/month + 1 trial schedule).
2. On Pro, Team, or Agency: add a data connection under Scheduled reports.
3. Save a recipe (prompt), set cron + delivery (email, signed webhook, Drive, or recipient portal).

## Configuration

Customer-side webhook receiver (your HTTPS endpoint):

- Method: `POST`
- Headers: `Content-Type: application/json`, `X-Ilka-Signature` (hex HMAC-SHA256 of the **raw body** using the secret you saved on the schedule), `X-Ilka-Timestamp` (unix seconds)
- JSON fields: `event` (`report.success`), `reportId`, `reportName`, `runId`, `generationId`, `connectionType`, `xlsxByteSize`, `occurredAt`, optional `downloadUrl` (time-limited), optional `downloadHint`

```javascript
const crypto = require('crypto');

function verifyIlkaWebhook(rawBody, signatureHex, secret) {
  const expected = crypto.createHmac('sha256', secret).update(rawBody).digest('hex');
  const a = Buffer.from(signatureHex, 'hex');
  const b = Buffer.from(expected, 'hex');
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
```

Reject requests if the signature is missing or `X-Ilka-Timestamp` is older than ~5 minutes (replay window you choose).

## Usage

Typical agency pack:

1. Improve an existing client export once; save the prompt as a recipe.
2. Connect the client Airtable base or Google Sheet (read-only).
3. Schedule Monday 09:00 in the client timezone; deliver email + webhook.
4. On Agency, share a recipient portal link instead of requiring an Ilka login.

Row caps: 500 rows per scheduled pull (most connectors). Charts: bar, line, stacked, pie, scatter — max 3 per workbook.

Do not wrap Ilka as a paid API resale product (see https://www.ilka.co/licenses.md).
