Skip to content

Commit eca75ac

Browse files
committed
Add Save Set To Content action and update README with usage details
1 parent c89a3e7 commit eca75ac

5 files changed

Lines changed: 671 additions & 3 deletions

File tree

.github/README.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,64 @@ The action outputs the following, which can be referenced via bindings in later
127127
| Sets | The page of matching sets returned, summarised (SetNumber, Name, Year, Theme, Subtheme, Pieces, Minifigs, ThumbnailUrl, BricksetUrl, Rating, RetailPriceUs, RetailPriceUk, RetailPriceCa, RetailPriceDe). |
128128
| RawResponse | The full, unprocessed JSON response returned by the Brickset API. |
129129

130+
### Save Set To Content
131+
132+
Add the **Save Set To Content** action to any automation. Writes fields from a Brickset set lookup onto a content item's properties (a draft save) — combine with a **Publish Content** step in a subsequent step to publish the result. Requires the `Umb.Document.Update` permission and the `content` section.
133+
134+
Each field below is optional (other than **Content Key**) and writes to a hardcoded property alias on the target content item — a field with a supplied value is silently skipped if the content type doesn't have the matching property, so you only need to add the properties for the fields you actually use.
135+
136+
| Field | Writes to property alias | Description |
137+
|---|---|---|
138+
| Content Key || Required. The key (GUID) of the content item to update. Supports `${ binding }` expressions. |
139+
| Node Name || Optional. When supplied, renames the content item itself (its node name), independent of the Name field below. Supports `${ binding }` expressions. |
140+
| Set Id | `bricksetSetId` | Brickset's internal numeric ID for the set. |
141+
| Name | `bricksetName` | The set's name, e.g. "Millennium Falcon". |
142+
| Set Number | `bricksetSetNumber` | The resolved set number including variant suffix, e.g. "71043-1". |
143+
| Year | `bricksetYear` | The year the set was released. |
144+
| Theme | `bricksetTheme` | The theme, e.g. "Star Wars". |
145+
| Subtheme | `bricksetSubtheme` | The subtheme, e.g. "Ultimate Collector Series". |
146+
| Pieces | `bricksetPieces` | The number of pieces in the set. |
147+
| Minifigs | `bricksetMinifigs` | The number of minifigs included in the set. |
148+
| Image Url | `bricksetImageUrl` | The URL of the full-size set image. |
149+
| Thumbnail Url | `bricksetThumbnailUrl` | The URL of the thumbnail set image. |
150+
| Brickset Url | `bricksetUrl` | The URL of the set's page on Brickset. |
151+
| Rating | `bricksetRating` | The average user rating for the set. |
152+
| Review Count | `bricksetReviewCount` | The number of user reviews for the set. |
153+
| Packaging Type | `bricksetPackagingType` | The packaging type, e.g. "Box". |
154+
| Availability | `bricksetAvailability` | The set's availability, e.g. "Retail". |
155+
| Instructions Count | `bricksetInstructionsCount` | The number of instructions available for the set. |
156+
| Age Min | `bricksetAgeMin` | The minimum recommended age for the set. |
157+
| Age Max | `bricksetAgeMax` | The maximum recommended age for the set. |
158+
| Dimensions Height | `bricksetDimensionsHeight` | The packaging height in centimetres. |
159+
| Dimensions Width | `bricksetDimensionsWidth` | The packaging width in centimetres. |
160+
| Dimensions Depth | `bricksetDimensionsDepth` | The packaging depth in centimetres. |
161+
| Dimensions Weight | `bricksetDimensionsWeight` | The packaging weight in grams. |
162+
| Ean | `bricksetEan` | The set's EAN barcode. |
163+
| Upc | `bricksetUpc` | The set's UPC barcode. |
164+
| Retail Price (US) | `bricksetRetailPriceUs` | The US retail price in USD, as reported by LEGO.com. |
165+
| Retail Price (UK) | `bricksetRetailPriceUk` | The UK retail price in GBP, as reported by LEGO.com. |
166+
| Retail Price (CA) | `bricksetRetailPriceCa` | The Canadian retail price in CAD, as reported by LEGO.com. |
167+
| Retail Price (DE) | `bricksetRetailPriceDe` | The German retail price in EUR, as reported by LEGO.com. |
168+
| Last Updated | `bricksetLastUpdated` | When Brickset's data for this set was last updated. |
169+
| Product Description | `bricksetProductDescription` | Optional free-text product description, not part of Brickset's API output — typically bound from an expression composed of the other fields. Writes to a rich-text-editor property. |
170+
| Culture || Optional. Culture code (e.g. `en-US`) for variant content. Leave blank for invariant. Applies to every property written by this action. |
171+
| Segment || Optional. Segment for segmented content. Leave blank for the default segment. Applies to every property written by this action. |
172+
173+
All fields above support `${ binding }` expressions.
174+
175+
The action outputs the following, which can be referenced via bindings in later workflow steps:
176+
177+
| Output | Description |
178+
|---|---|
179+
| ContentKey | The key of the content item that was targeted. |
180+
| Culture | The culture that was targeted (null for invariant). |
181+
| Segment | The segment that was targeted (null for the default segment). |
182+
| UpdatedPropertyAliases | The hardcoded property aliases that were actually written (only fields with a supplied value are included). |
183+
| SkippedPropertyAliases | The hardcoded property aliases that had a supplied value but were skipped because the content type doesn't have that property. |
184+
| NodeNameUpdated | Whether the content item's node name was changed. |
185+
186+
If the content item does not exist, the action completes with a `notFound` outcome instead of failing.
187+
130188
## Compatibility
131189

132190
| Package version | Umbraco Automate | Umbraco CMS |

0 commit comments

Comments
 (0)