File size: 4,701 Bytes
6869ec5
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
{
  "name": "script-agent.json",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "daysInterval": 5,
              "triggerAtHour": 9
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -576,
        32
      ],
      "id": "820ad7b8-75a7-4d90-9cb9-dde3fcdb0b6a",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.groq.com/openai/v1/chat/completions",
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Authorization",
              "value": "Bearer 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"
            },
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        },
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n  \"model\": \"llama-3.3-70b-versatile\",\n  \"messages\": [\n    {\n      \"role\": \"user\",\n      \"content\": \"Create a finance video script (500-800 words). Choose a UNIQUE topic from this list: budgeting, saving money, investing for beginners, debt repayment, emergency funds, retirement planning, side hustles, credit score, financial freedom, frugal living, taxes, real estate investing, student loans, mortgage tips, car buying, insurance savings, or grocery budgeting.\\n\\nUse the topic: {{Date.now() % 20}}. Pick the topic based on this number.\\n\\nFormat:\\nFirst line: 'SEO KEYWORDS:' then 5 keywords.\\nThen 'SCRIPT:' then the script.\\n\\nIn the script include:\\n- VIRAL HOOK (first 5-10 seconds) - must stop scrolling\\n- PROBLEM\\n- SOLUTION\\n- 3 KEY POINTS with real examples\\n- CALL TO ACTION\\n\\nMake it completely different from typical finance scripts. Use fresh angles, surprising statistics, or contrarian views. Format as continuous voiceover with ONLY spoken words. No timestamps, no labels.\"\n    }\n  ]\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.4,
      "position": [
        -144,
        32
      ],
      "id": "ba97c1d9-3686-4a53-a143-8ab46e38d3eb",
      "name": "HTTP Request1"
    },
    {
      "parameters": {
        "sendTo": "mariaajames280@gmail.com",
        "subject": "🎬 New Finance Script",
        "emailType": "text",
        "message": "={{$node[\"HTTP Request1\"].json.choices[0].message.content}}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        64,
        32
      ],
      "id": "d84ec7ae-3282-42b7-9196-656bffdf4c4b",
      "name": "Send a message",
      "webhookId": "be4f5227-cfc0-4a2b-b274-a4f98c96df48",
      "credentials": {
        "gmailOAuth2": {
          "id": "UMvduKDcAbWxjmNK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "jsCode": "const topics = [\n  \"budgeting for beginners\",\n  \"how to save $10,000 fast\",\n  \"investing with $100 a month\",\n  \"pay off credit card debt\",\n  \"build an emergency fund\",\n  \"retirement planning in your 20s\",\n  \"side hustles that pay\",\n  \"improve your credit score\",\n  \"financial freedom steps\",\n  \"frugal living tips\"\n];\n\nconst randomIndex = Math.floor(Math.random() * topics.length);\nconst randomTopic = topics[randomIndex];\n\nreturn { topic: randomTopic };"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        -368,
        32
      ],
      "id": "387b2fdb-2e4e-4a16-8807-fda3face2da0",
      "name": "Code in JavaScript"
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Code in JavaScript",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request1": {
      "main": [
        [
          {
            "node": "Send a message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Code in JavaScript": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate"
  },
  "versionId": "c4f51403-00e1-4feb-ba6d-dc6cb476e6e7",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "c5fb64c0035bc94075d79019bfa2c1429a80dbb6e9fd3b850964246ec8ebdf03"
  },
  "id": "m8IOca9a1IsWLyB3",
  "tags": []
}