Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
75d5d8d
chore(grammarly): migrate to autohive-integrations-sdk 2.0.0
Shubhank-Jonnada Jun 10, 2026
6e465c2
fix(grammarly): replace body= with data=/content_type= in fetch calls
Shubhank-Jonnada Jun 11, 2026
b4163dd
fix(grammarly): use FetchResponse in unit tests instead of MagicMock
Shubhank-Jonnada Jun 11, 2026
293ea3f
fix(grammarly): rewrite integration tests with proper fixtures and co…
Shubhank-Jonnada Jun 11, 2026
82a9218
Merge branch 'master' into sj/grammarly-migration-2.0.0
Shubhank-Jonnada Jun 12, 2026
f5c0917
Merge branch 'master' into sj/grammarly-migration-2.0.0
Shubhank-Jonnada Jun 16, 2026
cd19ded
fix(.env.example): only add Grammarly section in correct alphabetical…
Shubhank-Jonnada Jun 17, 2026
cfbcae4
fix(.env.example): rebuild from current master + own section only, no…
Shubhank-Jonnada Jun 17, 2026
a2c5822
Merge remote-tracking branch 'origin/master' into sj/grammarly-migrat…
Shubhank-Jonnada Jun 17, 2026
ea04952
fix(.env.example): rebuild from current master + own section only
Shubhank-Jonnada Jun 17, 2026
5331dc4
fix(grammarly): use date range within 1-year API limit in integration…
Shubhank-Jonnada Jun 19, 2026
b78f8de
fix(grammarly): wrap upload_url in yarl.URL(encoded=True) to preserve…
Shubhank-Jonnada Jun 23, 2026
a2d2e71
fix(grammarly): compute analytics date range dynamically in integrati…
Shubhank-Jonnada Jun 23, 2026
6d24531
chore: trigger PR validation
Shubhank-Jonnada Jul 6, 2026
c2995c9
fix(grammarly): wrap mock auth in custom-auth envelope to match SDK 2…
Shubhank-Jonnada Jul 7, 2026
2fd3643
fix(grammarly): bump SDK pin to ~=2.0.1 and pass tests against it
Shubhank-Jonnada Jul 7, 2026
8278453
docs(grammarly): document SDK v2 action result contract (no result/er…
Shubhank-Jonnada Jul 7, 2026
7b3228a
docs(grammarly): add 2.0.0 entry to README version history
Shubhank-Jonnada Jul 7, 2026
38313ef
fix(grammarly): wrap live_context auth in custom-auth envelope for SD…
Shubhank-Jonnada Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@
# GOOGLE_SHEETS_ACCESS_TOKEN=
# GOOGLE_SHEETS_TEST_SPREADSHEET_ID=

# -- Grammarly --
# GRAMMARLY_CLIENT_ID=
# GRAMMARLY_CLIENT_SECRET=



# -- Harvest --
# HARVEST_ACCESS_TOKEN=
# HARVEST_ACCOUNT_ID=
Expand Down
32 changes: 6 additions & 26 deletions grammarly/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,26 +33,16 @@ The OAuth integration automatically handles token management and refresh, so you

## Action Results

All actions return a standardized response structure:
- `result` (boolean): Indicates whether the action succeeded (true) or failed (false)
- `error` (string, optional): Contains error message if the action failed
- Additional action-specific data fields (e.g., `score_request_id`, `status`, `data`)
On success, actions return only their action-specific data fields (documented per action below), with no wrapping `result`/`error` envelope.

Example successful response:
```json
{
"result": true,
"score_request_id": "abc123"
}
```

Example error response:
```json
{
"result": false,
"error": "Invalid file format"
}
```
On failure, the action raises an `ActionError` with a `message` describing what went wrong, rather than returning a response field.

## Actions

Expand All @@ -67,8 +57,6 @@ Submits a document for comprehensive writing quality analysis.

**Outputs:**
- `score_request_id`: Unique identifier to retrieve the analysis results
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Supports .doc, .docx, .odt, .txt, .rtf formats
Expand All @@ -90,8 +78,6 @@ Retrieves the writing quality score results for a previously submitted document.
- `correctness`: Correctness score (null if status is PENDING or FAILED)
- `delivery`: Delivery score (null if status is PENDING or FAILED)
- `clarity`: Clarity score (null if status is PENDING or FAILED)
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Results available for 30 days after submission
Expand Down Expand Up @@ -123,8 +109,6 @@ Retrieves paginated list of users with Grammarly usage statistics for a date ran
- `next_cursor`: Cursor for next page of results
- `has_more`: Whether more results are available
- `page_size`: Number of items in current page
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Data available for past 365 days with 2-day lag
Expand All @@ -143,8 +127,6 @@ Submits a document for AI content detection analysis.

**Outputs:**
- `score_request_id`: Unique identifier to retrieve the analysis results
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Evaluates likelihood text was generated by AI
Expand All @@ -164,8 +146,6 @@ Retrieves AI detection results for a previously submitted document.
- `average_confidence`: Confidence level of the AI detection (0-1 scale, null if status is PENDING or FAILED)
- `ai_generated_percentage`: Percentage of text that appears to be AI-generated (0-100, null if status is PENDING or FAILED)
- `updated_at`: Timestamp when the result was last updated
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Results available for 30 days after submission
Expand All @@ -184,8 +164,6 @@ Submits a document for plagiarism detection analysis.

**Outputs:**
- `score_request_id`: Unique identifier to retrieve the analysis results
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Compares text against billions of web pages and academic papers
Expand All @@ -205,8 +183,6 @@ Retrieves plagiarism detection results for a previously submitted document.
- `originality_score`: Originality score (higher means more original, null if status is PENDING or FAILED)
- `plagiarism_percentage`: Percentage of text that appears to be plagiarized (0-100, null if status is PENDING or FAILED)
- `updated_at`: Timestamp when the result was last updated
- `result`: Success status (boolean)
- `error`: Error message if action failed (optional)

**Notes:**
- Results available for 30 days after submission
Expand Down Expand Up @@ -294,6 +270,10 @@ To test the integration:

## Version History

- **2.0.0** - Migrated to autohive-integrations-sdk 2.0.0
- `context.fetch()` now returns a `FetchResponse` object; response bodies are read via `.data`
- Failures are now surfaced as `ActionError` (with a `message`) instead of an in-band `result`/`error` response field
- Successful actions return only their action-specific data fields, with no `result`/`error` envelope
- **1.0.0** - Initial release with 7 comprehensive actions
- Writing Score API: analyze_writing_score, get_writing_score_results (2 actions)
- Analytics API: get_user_analytics (1 action)
Expand Down
Loading
Loading