Save on Semble links from Streamplace chat

When I reply to a message with "+save", save the links it contains on Semble and add to my collection

place.stream.chat.message
Lexicon
place.stream.chat.message
Operations
Record created

Conditions

  • event.did equals {{self}} - Triggered only by my message
  • text equals +save - Triggered only by this text command

Data Sources (2)

Record lookupparentMessage— Fetches the parent chat message data
Lookup
{{event.commit.record.reply.parent.uri}}
  • Continue only if the record is found
Record lookupsembleCollection— Fetches data from Semble Collection
Lookup
{{CollectionURI}}

Actions (2)

Save on SembleAction 1- Saves each link

For each item in
parentMessage.record.facets[].features[]
Where
$type equals app.bsky.richtext.facet#link
Page URL
{{item.uri}}

Create a recordAction 2- Saves the Semble Card from action1 into the provided Semble Collection

For each item in
action1.results[]
Target Collection
network.cosmik.collectionLink
Record Template
{
  "card": {
    "cid": "{{item.cid}}",
    "uri": "{{item.uri}}"
  },
  "addedAt": "{{now}}",
  "addedBy": "{{self}}",
  "createdAt": "{{now}}",
  "collection": {
    "cid": "{{sembleCollection.cid}}",
    "uri": "{{sembleCollection.uri}}"
  },
  "provenance": {
    "via": {
      "cid": "{{item.cid}}",
      "uri": "{{item.uri}}"
    }
  }
}