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

Steps (10)

VariableCollectionURI
Value
Hidden
Note
ATURI for the Semble Collection of destination
Conditionbranch
  • If event.did equals {{self}} - Triggered only by my message
  • and event.commit.record.text equals +save - Triggered only by this text command
Then
Fetch recordparentMessage- Fetches the parent chat message data
Lookup
{{event.commit.record.reply.parent.uri}}
Fetch recordsembleCollection- Fetches data from Semble Collection
Lookup
{{CollectionURI}}
Conditionbranch
  • If parentMessage.found equals true
Then
Looploop1
For each item in parentMessage.record.facets[].features[]
Conditiongate
  • Continue only if item.$type equals app.bsky.richtext.facet#link

Save on SembleAction 1

Page URL
{{item.uri}}
Looploop2
For each item in loop1.results[]

Create a recordAction 2

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}}"
    }
  }
}