1import { ApifyClient } from 'apify-client';
2
3
4
5const client = new ApifyClient({
6 token: '<YOUR_API_TOKEN>',
7});
8
9
10const input = {
11 "brand": {
12 "name": "Example Studio",
13 "offer": "A reusable insulated bottle, described by the client for this demonstration."
14 },
15 "goals": [
16 {
17 "id": "product-use",
18 "description": "Explain how the supplied bottle is used during a workday."
19 }
20 ],
21 "audiences": [
22 {
23 "id": "commuters",
24 "description": "Adults who asked the client for reusable bottle information."
25 }
26 ],
27 "claims": [
28 {
29 "id": "capacity",
30 "text": "The client states a 500 ml capacity.",
31 "approvalEvidence": "client-product-sheet-v2"
32 }
33 ],
34 "assets": [
35 {
36 "id": "photo",
37 "description": "Client-owned bottle photograph.",
38 "sourceUrl": "https://example.com/assets/bottle"
39 }
40 ],
41 "references": [
42 {
43 "id": "pacing-note",
44 "notes": "Use the supplied reference only to discuss pacing. Keep competitor slogans outside the new copy."
45 }
46 ],
47 "requirements": [
48 {
49 "id": "ownership",
50 "text": "Designer confirms permission for every supplied asset."
51 },
52 {
53 "id": "capacity-review",
54 "text": "Reviewer checks the capacity statement against the product sheet.",
55 "deliverableIds": [
56 "meta-image"
57 ]
58 }
59 ],
60 "deliverables": [
61 {
62 "id": "meta-image",
63 "channel": "Meta",
64 "format": "Client-specified square image. Confirm current placement requirements before production.",
65 "goalIds": [
66 "product-use"
67 ],
68 "audienceIds": [
69 "commuters"
70 ],
71 "claimIds": [
72 "capacity"
73 ],
74 "assetIds": [
75 "photo"
76 ],
77 "referenceIds": [
78 "pacing-note"
79 ],
80 "acceptanceCriteria": [
81 "The reviewer can identify the bottle and find the supplied capacity statement.",
82 "The designer attaches the asset permission reference."
83 ]
84 }
85 ]
86};
87
88
89const run = await client.actor("danielmichalek/creative-brief-generator").call(input);
90
91
92console.log('Results from dataset');
93console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
94const { items } = await client.dataset(run.defaultDatasetId).listItems();
95items.forEach((item) => {
96 console.dir(item);
97});
98
99