Build your own custom Range integration

How to see programmatically record work activity in Range

Range integrates with other software to create suggested items for users to add to their check-ins. If you would like to record activity from tools not currently integrated with Range, you can use our REST API to programmatically record activity.

Setup

Create a custom webhook from the Range integration settings page. This will be used by you to send events to Range.

Payload

The webhook expects the following fields in the payload:

  • attachment (Attachment): Details about the activity item
  • dedupe_strategy (?string): How to handle deduplication of activity
    • UNIQUE: Only one snippet will ever be created for the given attachment regardless of whether it was deleted.
    • UNIQUE_USER: Only one snippet will ever be created per user per attachment.
    • UNIQUE_PENDING: A snippet will only be created if there isn't already a pending snippet that matches the attachment (per user).
    • UPSERT_PENDING: Same as UNIQUE_PENDING, but in the case where a duplicate exists, it will be updated.
    • NONE: Disable de-duping behavior. Allow adding new snippets with any attachment regardless of the existence of other snippets with that attachment.
  • email (?string): The email address of the user to create this activity for
  • user_id (?string): Alternatively, the Range User ID of the user to create this activity for
  • reason (?string): The verb for the reason the activity is being suggested
    • One of: ADDED, EDITED, COMMENTED, CLOSED, CREATED, OPENED, STATUS_UPDATED, REVIEWED, RESOLVED, MERGED, COMPLETED, ASSIGNED, ATTENDED, CHANGED, SUBMITTED, VIEWED

Example payload

curl -X POST 'https://in.range.co/services/incoming/...' -d '
  "attachment": {
    "source_id": "Jw2XtolyoGc",
    "provider": "youtube",
    "provider_name": "YouTube",
    "name": "Lead Time Chats | Episode 2",
    "html_url": "https://www.youtube.com/watch?v=Jw2XtolyoGc"
  },
  "email": "ranger@example.com",
  "user_id": "RangeUserID",
  "reason": "VIEWED",
}'

References

Have a question?

Send us a message. We’d love to help.

Haven’t signed up yet?

It’s easy and free to get started.

Sign up for Range