Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,63 @@ activitysmith.live_activities.end(
)
```

### Live Activity Action

Just like Actionable Push Notifications, Live Activities can have a button that opens provided URL in a browser or triggers a webhook. Webhooks are executed by the ActivitySmith backend.

<p align="center">
<img src="https://cdn.activitysmith.com/features/live-activity-with-action.png?v=20260319-1" alt="Live Activity with action" width="680" />
</p>

#### Open URL action

```ruby
start = activitysmith.live_activities.start(
{
content_state: {
title: "Deploying payments-api",
subtitle: "Running database migrations",
number_of_steps: 5,
current_step: 3,
type: "segmented_progress"
},
action: {
title: "Open Workflow",
type: "open_url",
url: "https://github.com/acme/payments-api/actions/runs/1234567890"
}
}
)

activity_id = start.activity_id
```

#### Webhook action

```ruby
activitysmith.live_activities.update(
{
activity_id: activity_id,
content_state: {
title: "Reindexing product search",
subtitle: "Shard 7 of 12",
number_of_steps: 12,
current_step: 7
},
action: {
title: "Pause Reindex",
type: "webhook",
url: "https://ops.example.com/hooks/search/reindex/pause",
method: "POST",
body: {
job_id: "reindex-2026-03-19",
requested_by: "activitysmith-ruby"
}
}
}
)
```

## Channels

Channels are used to target specific team members or devices. Can be used for both push notifications and live activities.
Expand Down
3 changes: 3 additions & 0 deletions generated/activitysmith_openapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
require 'activitysmith_openapi/models/content_state_start'
require 'activitysmith_openapi/models/content_state_update'
require 'activitysmith_openapi/models/forbidden_error'
require 'activitysmith_openapi/models/live_activity_action'
require 'activitysmith_openapi/models/live_activity_action_type'
require 'activitysmith_openapi/models/live_activity_end_request'
require 'activitysmith_openapi/models/live_activity_end_response'
require 'activitysmith_openapi/models/live_activity_limit_error'
require 'activitysmith_openapi/models/live_activity_start_request'
require 'activitysmith_openapi/models/live_activity_start_response'
require 'activitysmith_openapi/models/live_activity_update_request'
require 'activitysmith_openapi/models/live_activity_update_response'
require 'activitysmith_openapi/models/live_activity_webhook_method'
require 'activitysmith_openapi/models/no_recipients_error'
require 'activitysmith_openapi/models/push_notification_action'
require 'activitysmith_openapi/models/push_notification_action_type'
Expand Down
Loading
Loading