feat(missive): add Missive integration#371
Conversation
Implements full Missive integration covering conversations, messages, drafts, posts, contacts, and analytics — all actions live-tested against the Missive API.
🔍 Integration Validation ResultsCommit: Changed directories:
✅ Structure Check output
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d4ad6c40b2
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…cts and list_contact_groups
…th book filter test
… and update_contact PATCH
…on, contact kind/book fields
…contact test data
…account and update_* restrictions
…r Missive API spec
…tact, skip test when token lacks Operator role
… wrapper with id in body per Missive API spec
…c, fix notification schema
|
💡 Suggestion: Consider adding a small shared request/response helper for Missive calls to centralize headers, status handling, and Missive error extraction. The current handlers repeat the same |
|
💡 Suggestion: The unit tests are broad but shallow: they mostly assert |
TheRealAgentK
left a comment
There was a problem hiding this comment.
Posted integration review findings: blockers and should-fixes are inline on the relevant code; suggestions are posted as general PR comments.
|
💡 Suggestion: Avoid putting exact counts like “22 actions”, “16 integration tests”, etc. in PR descriptions and README copy unless the number is generated or otherwise maintained. These counts tend to drift as actions/tests are added or removed, making the docs stale. Prefer wording like “covers conversations, messages, drafts, contacts, and analytics” or “includes unit and integration coverage” without hard-coded totals. |
…tch; fix create_draft field names to match Missive API (channel, conversation, team, add_assignees)
…requires the contact_book query param
…_TEST_EMAIL in .env.example
…ng; use resp.json(content_type=None) in real_fetch
…get_update_contact
…th tests for non-2xx responses
…config-code sync warning
|
Follow-up on my earlier suggestion about centralizing Missive request/response handling: this is partially addressed by
Please make sure those fetch responses are assigned and passed through |
|
Follow-up on the exact-counts suggestion: this still looks unaddressed. The PR description/README copy still includes hard-coded counts such as “22 actions” / test totals. Please remove those exact numbers unless they are generated or otherwise maintained, and use wording like “covers conversations, messages, drafts, contacts, and analytics” / “includes unit and integration coverage” instead. |
…_draft, pass through _check_response; remove hard-coded action counts from README
|
Two follow-ups from the re-review:
Please paste the commands and output for at least: pytest missive/tests/test_missive_integration.py -m "integration and not destructive" -vAnd, if destructive tests were run: pytest missive/tests/test_missive_integration.py -m "integration and destructive" -vIf destructive tests were intentionally not rerun, please say that explicitly. |
…, use plain string IDs for conversation/team/add_assignees, add account field
TheRealAgentK
left a comment
There was a problem hiding this comment.
Integration review using the Autohive integration skills. Requesting changes for the inline blockers and should-fix items.
Make the Missive integration API-correct and agent-usable, validated against the live REST API with a PAT token. API correctness fixes (missive.py + config.json): - create_message: drop invalid channel_id; map conversation_id -> conversation - create_post: require notification (live API 400s without it); map assignee_id -> add_assignees, team_id -> team, shared_label_ids -> add_shared_labels; parse posts[].conversation; output conversation_id - create_draft/create_post/update_conversation: require organization_id for assignee/shared-label flows (live API 400s without it) - update_conversation: closed:false -> reopen:true, closed:true -> close:true - create_analytics_report: fix wire keys (time_zone, teams, users, shared_labels) - list_contact_groups: kind is required by the API (HTTP 400 without it) - fix contacts schema: infos[].kind/label/value; remove bogus top-level kind Agent usability: - add discovery actions: list_organizations, list_users, list_teams, list_shared_labels so agents can resolve required IDs - list_conversations: add email/domain/contact_organization_id/organization_id filters (mutually exclusive) to find conversations by contact - redescribe list_messages as exact Message-ID lookup (not a search) Tests: - expand unit coverage to 43 tests (request-shape + error paths) - add live coverage for discovery actions, contact filters, and message endpoint contract tests (synthetic IDs) so message paths are verified without real email data Validated: validate_integration + check_code pass; 43 unit pass; 23 live integration pass (2 data-only skips).
Review changes pushed — Missive integration now API-correct & agent-usableWorked through the open review feedback and validated every action against the live Missive REST API (PAT auth). Summary of what changed: API correctness fixes
Agent usability
Tests & validation
Contacts were also verified live after creating a contact book ( |
…ixes Address review feedback from PR #371. Blocker: non-2xx responses no longer look successful. - Every handler now returns ActionError(message=...) on failure instead of success-shaped {"result": false, "error": ...} data. - Success returns drop the "result" field; output schemas in config.json drop "result"/"error". update_conversation/merge_conversations/delete_draft now echo the relevant id. - Input-validation guards (org required, mutually exclusive filters) return ActionError too. Blocker: list_contacts now requires contact_book and sends it. - contact_book_id is required in config and mapped to the contact_book query param; non-2xx is surfaced as ActionError. Added a non-2xx unit test. Tests refactored to SDK 2.x semantics. - Unit + integration tests assert ResultType.ACTION / ResultType.ACTION_ERROR and result.result.message instead of data["result"]. Docs: README output columns updated for the id-echo actions. Already in place from earlier commits (verified): create_draft API shape, .env.example MISSIVE_* entries, safe-first test docstring, destructive post cleanup via DELETE /v1/posts/:id, and resp.json(content_type=None) in the live fixture. Validated: validate_integration, check_code, run_tests (45/45, 82% cov), check_readme all pass; 23 live integration tests pass (2 data-only skips).
Integration PR review — feedback addressedApplied sub-skills: building-integration, writing-unit-tests, writing-integration-tests, upgrading-sdk-v2. All open review comments have been addressed in 🚫 Blockers (TheRealAgentK) — all fixed
|
|
Follow-up from the latest re-review:
|
I investigated the warnings and they are a tooling false positive that I'm addressing over there. |
Summary
Adds a Missive integration to the autohive-integrations SDK (2.0.0).
Missive is a collaborative team inbox that unifies email, SMS, WhatsApp, and live chat. This integration covers conversations, messages, drafts, posts, contacts, analytics, and discovery helpers for resolving organization, user, team, and shared-label IDs.
Actions
list_conversations,get_conversation,update_conversation,merge_conversations,list_conversation_messages,list_conversation_comments,list_conversation_posts,list_conversation_draftslist_messages,get_message,create_messagecreate_draft,delete_draft,create_postlist_contacts,get_contact,create_contact,update_contact,list_contact_books,list_contact_groupscreate_analytics_report,get_analytics_reportlist_organizations,list_users,list_teams,list_shared_labelsAuth
Custom auth (
type: custom) with a singleapi_tokenfield (Bearer token). Token requires the Missive Productive plan or higher.Testing
MISSIVE_API_TOKENcreate_draft,delete_draft,create_post,create_contact,create_analytics_report) are marked with@pytest.mark.destructiveand documented separately from the safe read-only run commandNotable API quirks discovered during testing
list_conversationsuses the mailbox name as a boolean query param (all=true, notmailbox=all)team_inbox={team_uuid}list_messagesis an exact lookup by email Message-ID, not a general search/list endpointcreate_messageuses the documented custom-channel fields (account,from_field,to_fields,body) and mapsconversation_idtoconversationcreate_draftuses draft fields such asfrom_field,to_fields,account,conversation,team, andadd_assignees; it does not usechannel_idcreate_postrequires anotificationpayload and maps assignment/label inputs to Missive wire keys (team,add_assignees,add_shared_labels)organization_idlimiton paginated endpoints is 2Files