Agent Types - huginn/huginn GitHub Wiki
[ { "id": "daily_trigger", "type": "cronplus", "name": "Daily 8 PM Trigger", "outputField": "payload", "timeZone": "Asia/Kolkata", "options": [ { "name": "8pm", "topic": "run", "payloadType": "default", "expression": "0 0 20 * * *", "type": "cron" } ], "wires": "get_topic" }, { "id": "get_topic", "type": "http request", "name": "Fetch Topic From Google Form", "method": "GET", "ret": "obj", "url": "YOUR_GOOGLE_FORM_RESPONSE_URL", "wires": "topic_parser" }, { "id": "topic_parser", "type": "function", "name": "Extract Latest Topic", "func": "msg.topic = msg.payload.latestTopic || "Default Topic";\nreturn msg;", "wires": "openai_script" }, { "id": "openai_script", "type": "http request", "name": "Generate Script (OpenAI)", "method": "POST", "url": "https://api.openai.com/v1/chat/completions", "headers": { "Content-Type": "application/json", "Authorization": "Bearer YOUR_OPENAI_KEY" }, "body": "{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Write YouTube script on: {{topic}}"}]}", "bodyType": "str", "wires": "tts_request" }, { "id": "tts_request", "type": "http request", "name": "Generate Audio (Google TTS)", "method": "POST", "url": "YOUR_GOOGLE_TTS_URL", "headers": { "Content-Type": "application/json", "Authorization": "Bearer YOUR_GOOGLE_TTS_KEY" }, "bodyType": "json", "wires": "download_media" }, { "id": "download_media", "type": "function", "name": "Download Images/Videos", "func": "msg.mediaList = [\n "https://api.pexels.com/v1/search?query=" + msg.topic,\n "https://api.pixabay.com/api/?q=" + msg.topic\n];\nreturn msg;", "wires": "ffmpeg_video" }, { "id": "ffmpeg_video", "type": "exec", "name": "Render Video with FFmpeg", "command": "ffmpeg -i audio.mp3 -i images_folder/%d.jpg -c:v libx264 final_video.mp4", "wires": "youtube_upload" }, { "id": "youtube_upload", "type": "http request", "name": "Upload to YouTube", "method": "POST", "url": "https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable", "headers": { "Authorization": "Bearer YOUR_YOUTUBE_OAUTH", "Content-Type": "application/json" }, "bodyType": "json", "wires": "log_to_sheet" }, { "id": "log_to_sheet", "type": "http request", "name": "Log to Google Sheets", "method": "POST", "url": "YOUR_GOOGLE_SHEET_WEBAPP_URL", "headers": { "Content-Type": "application/json" }, "body": "{"video_title":"{{topic}}","status":"Uploaded","timestamp":"{{now}}"}", "bodyType": "str", "wires": } ]