Post to social media when we create a new blog post

When we create a blog post with standard.site: - Post on Bluesky - Save the blog post as a card on Semble and add it to a collection that people can follow - Post in a Discord channel using Webhooks

site.standard.document
Lexicon
site.standard.document
Operations
Record created

Steps (16)

Conditiongate
  • Continue only if event.did equals {{self}}
VariablepublicationRkey
Value
Hidden
Note
rkey for the target publication
VariablecollectionRkey
Value
Hidden
Note
rkey for the Semble collection
VariableextraHashtags
Value
Hidden
Note
Extra hashtags for the Bluesky & Mastodon posts
VariablediscordRoleId
Value
Hidden
Note
Role to ping in Discord
VariablecollectionUri
Value
at://{{self}}/network.cosmik.collection/{{collectionRkey}}
Note
Semble collection URI
VariablepublicationUri
Value
at://{{self}}/site.standard.publication/{{publicationRkey}}
Note
Target publication URI
Conditiongate
  • Continue only if event.commit.record.site equals {{publicationUri}} - Only activate for the target publication (blog), not any other documents
Fetch recordpublication
Lookup
{{publicationUri}}
Fetch recordcollection
Lookup
{{collectionUri}}
Conditiongate
  • Continue only if publication.found equals true
  • and collection.found equals true
VariablepageUrl
Value
{{publication.record.url}}/{{event.commit.record.path}}
Note
URL of the published document

Save on SembleAction 1card

Page URL
{{pageUrl}}

Create a recordAction 2

Target Collection
network.cosmik.collectionLink
Record Template
{
  "card": {
    "cid": "{{card.cid}}",
    "uri": "{{card.uri}}"
  },
  "addedAt": "{{now}}",
  "addedBy": "{{self}}",
  "createdAt": "{{now}}",
  "collection": {
    "cid": "{{collection.cid}}",
    "uri": "{{collection.uri}}"
  }
}

Post to BlueskyAction 3

Text Template
{{event.commit.record.description}}

View the full blog post at {{pageUrl}}
{{extraHashtags}}
Embed URL
{{pageUrl}}

Send a webhookAction 4Unverified

Destination
discord.com