Skip to content

feat: servicenow incident activity sync#5556

Open
zekebawt wants to merge 2 commits intokeephq:mainfrom
zekebawt:feat/servicenow-activity-sync
Open

feat: servicenow incident activity sync#5556
zekebawt wants to merge 2 commits intokeephq:mainfrom
zekebawt:feat/servicenow-activity-sync

Conversation

@zekebawt
Copy link

@zekebawt zekebawt commented Feb 3, 2026

Summary

This PR adds incident activity synchronization capabilities to the ServiceNow provider.

Closes #3379

Changes

  • _get_incident_activities(): Fetches work notes and comments from ServiceNow incidents via the sys_journal_field table
  • _add_incident_activity(): Pushes activities (work notes/comments) to ServiceNow incidents
  • sync_incident_activities(): Bidirectional sync between ServiceNow and Keep

Usage

# Get activities from ServiceNow
activities = provider._get_incident_activities(incident_id="INC0010001")

# Add activity to ServiceNow
provider._add_incident_activity(
    incident_id="INC0010001",
    content="Investigating issue...",
    activity_type="work_notes"
)

# Bidirectional sync
sn_activities, synced = provider.sync_incident_activities(
    incident_id="INC0010001",
    keep_activities=[{"content": "Update from Keep", "type": "work_notes"}]
)

Testing

  • Tested with ServiceNow REST API
  • Supports both basic auth and OAuth
  • Handles pagination for large activity lists

/claim #3379

- Add _get_incident_activities() to fetch work notes and comments
- Add _add_incident_activity() to push activities to ServiceNow
- Add sync_incident_activities() for bidirectional sync
- Implements keephq#3379
@vercel
Copy link

vercel bot commented Feb 3, 2026

@zekebawt is attempting to deploy a commit to the KeepHQ Team on Vercel.

A member of the Team first needs to authorize it.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 3, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 3, 2026

Target branch is not in the allowed branches list.

@dosubot dosubot bot added the Feature A new feature label Feb 3, 2026
@zekebawt
Copy link
Author

zekebawt commented Feb 3, 2026

ServiceNow activity sync PR is ready! Implements incident work notes/comments sync as requested in #3379.

Features:

  • Fetch activities from ServiceNow ()
  • Push activities to ServiceNow ()
  • Bidirectional sync ()

Ready for review! 🚀

@zekebawt zekebawt changed the title feat: ServiceNow incident activity sync feat: servicenow incident activity sync Feb 4, 2026
- Extend ServiceNow provider to support BaseIncidentProvider
- Add _get_incidents() and _format_incident() methods for incident sync
- Add _get_auth_and_headers() helper for cleaner API requests
- Implement bidirectional activity sync between ServiceNow and Keep
- Add PROVIDER_METHODS for workflow integration
- Map ServiceNow states/severity to Keep incident status/severity

Closes keephq#3379
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🙋 Bounty claim Feature A new feature size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🔌 Provider]: ServiceNow pull activity from incidents into incidents

1 participant