All In One Post Facebook/MidoAI


Nội dung File JSON

{
    "name": "All Post Facebook copy",
    "nodes": [
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                0
            ],
            "id": "fe9d55fa-339a-4396-a8ec-84f865b1c676",
            "name": "Set Var"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $json.page_id }}/feed",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "message",
                            "value": "=Xin chào, post test"
                        },
                        {
                            "name": "access_token",
                            "value": "={{ $json.access_token }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -380,
                -900
            ],
            "id": "8071ee81-cfd7-4563-9c3c-5315013f650d",
            "name": "Feed Post Text Only"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $json.page_id }}/feed",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "message",
                            "value": "=Xin chào, post test"
                        },
                        {
                            "name": "access_token",
                            "value": "={{ $json.access_token }}"
                        },
                        {
                            "name": "text_format_preset_id",
                            "value": "={{ $json.text_format_preset_id }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -380,
                -680
            ],
            "id": "547ae36a-95d6-48e0-80a1-330b8ca9f6bb",
            "name": "Feed With Background"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $json.url_drive }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                -380,
                -460
            ],
            "id": "e8aceb9b-c413-48fb-97c3-ffdad5e64070",
            "name": "Dowload Single Photo",
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "e9ed794d-54ad-4e59-a021-649dee1c7d82",
                            "name": "urls",
                            "value": "={{ $json.url_drive.split(\"\\n\") }}",
                            "type": "array"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -200,
                -240
            ],
            "id": "e8ee67d9-4372-473d-9b1b-ba8188e8f891",
            "name": "Convert Array"
        },
        {
            "parameters": {
                "fieldToSplitOut": "urls",
                "options": {}
            },
            "type": "n8n-nodes-base.splitOut",
            "typeVersion": 1,
            "position": [
                0,
                -240
            ],
            "id": "d108101b-9721-469e-be55-1674fbf1d1b7",
            "name": "Split Out"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $json.urls }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                220,
                -240
            ],
            "id": "ce1f9cc2-d58a-45a6-8a9d-88516fbe703c",
            "name": "Dowload Lần Lượt",
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "b9565927-0581-4d8e-9c31-1e3e2c1c8ebc",
                            "name": "media_fbid",
                            "value": "={{ $json.id }}",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                660,
                -240
            ],
            "id": "a965c292-fd85-4d2e-99e9-966f53b5bd7e",
            "name": "Get Media FBID"
        },
        {
            "parameters": {
                "aggregate": "aggregateAllItemData",
                "destinationFieldName": "=all",
                "options": {}
            },
            "type": "n8n-nodes-base.aggregate",
            "typeVersion": 1,
            "position": [
                860,
                -240
            ],
            "id": "e0390088-8061-4ed2-a1e4-44e0d1848248",
            "name": "Aggregate"
        },
        {
            "parameters": {
                "httpRequestMethod": "POST",
                "graphApiVersion": "v22.0",
                "node": "={{ $json.page_id }}",
                "edge": "photos",
                "sendBinaryData": true,
                "binaryPropertyName": "data",
                "options": {
                    "queryParameters": {
                        "parameter": [
                            {
                                "name": "message",
                                "value": "Xin Chào Việt Nam"
                            }
                        ]
                    }
                }
            },
            "type": "n8n-nodes-base.facebookGraphApi",
            "typeVersion": 1,
            "position": [
                60,
                -460
            ],
            "id": "a9afa5cd-9fb2-4533-84ad-ba7873501c99",
            "name": "Single Post Graph API",
            "credentials": {
                "facebookGraphApi": {
                    "id": "IFvXGSERLSUx5QLq",
                    "name": "Thoi_dai5.0"
                }
            }
        },
        {
            "parameters": {
                "httpRequestMethod": "POST",
                "graphApiVersion": "v22.0",
                "node": "={{ $('Set Var').item.json.page_id }}",
                "edge": "photos",
                "sendBinaryData": true,
                "binaryPropertyName": "data",
                "options": {
                    "queryParameters": {
                        "parameter": [
                            {
                                "name": "published",
                                "value": "false"
                            }
                        ]
                    }
                }
            },
            "type": "n8n-nodes-base.facebookGraphApi",
            "typeVersion": 1,
            "position": [
                1300,
                -240
            ],
            "id": "a9af6824-f43f-4cd9-b1bc-bcdedc2356b1",
            "name": "Post Get ID - Not Public",
            "credentials": {
                "facebookGraphApi": {
                    "id": "IFvXGSERLSUx5QLq",
                    "name": "Thoi_dai5.0"
                }
            }
        },
        {
            "parameters": {
                "httpRequestMethod": "POST",
                "graphApiVersion": "v22.0",
                "node": "={{ $('Set Var').item.json.page_id }}",
                "edge": "feed",
                "options": {
                    "queryParameters": {
                        "parameter": [
                            {
                                "name": "message",
                                "value": "Đây là post nhiều ảnh"
                            },
                            {
                                "name": "published",
                                "value": "true"
                            },
                            {
                                "name": "attached_media",
                                "value": "={{ $json.attached_media }}"
                            }
                        ]
                    }
                }
            },
            "type": "n8n-nodes-base.facebookGraphApi",
            "typeVersion": 1,
            "position": [
                1520,
                -240
            ],
            "id": "d0a688ce-3add-414e-98ad-0538416de50a",
            "name": "Public Post & All Img",
            "credentials": {
                "facebookGraphApi": {
                    "id": "IFvXGSERLSUx5QLq",
                    "name": "Thoi_dai5.0"
                }
            }
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var6').item.json.page_id }}/photos",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var6').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "multipart-form-data",
                "bodyParameters": {
                    "parameters": [
                        {
                            "parameterType": "formBinaryData",
                            "name": "=data",
                            "inputDataFieldName": "data"
                        },
                        {
                            "name": "published",
                            "value": "false"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                440,
                -240
            ],
            "id": "4d3155ca-39f7-498f-a45d-16d79eb0c9fe",
            "name": "HTTP Post Img Not Public"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var6').item.json.page_id }}/feed",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var6').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "bodyParameters": {
                    "parameters": [
                        {
                            "name": "published",
                            "value": "true"
                        },
                        {
                            "name": "=message",
                            "value": "=Xin chào\n\nTest nhiều hình"
                        },
                        {
                            "name": "=attached_media",
                            "value": "={{ $json.all }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                1080,
                -240
            ],
            "id": "71cea737-255a-4a00-8ea1-fbed27be89a0",
            "name": "HTTP Public Post Imgs"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/{{ $('Set Var').item.json.page_id }}/videos",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "=access_token",
                            "value": "={{ $('Set Var').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "multipart-form-data",
                "bodyParameters": {
                    "parameters": [
                        {
                            "parameterType": "formBinaryData",
                            "name": "=source",
                            "inputDataFieldName": "=data"
                        },
                        {
                            "name": "description",
                            "value": "=Tiêu đề video hôm nay"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -60,
                0
            ],
            "id": "79aed00d-bdfb-4cb9-a7dc-15a4b81d353a",
            "name": "Public Video"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $('Set Var').item.json.url_drive }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                -340,
                0
            ],
            "id": "beb1e28d-bdab-4fac-aa78-423694d53262",
            "name": "Dowload Video",
            "retryOnFail": true,
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var5').item.json.page_id }}/photos",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "multipart-form-data",
                "bodyParameters": {
                    "parameters": [
                        {
                            "parameterType": "formBinaryData",
                            "name": "=data",
                            "inputDataFieldName": "data"
                        },
                        {
                            "parameterType": "=formData",
                            "name": "=message",
                            "value": "Hello"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -180,
                -460
            ],
            "id": "53279bb6-e104-4e8a-b164-f24619bca167",
            "name": "Single Img HTTP"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                240
            ],
            "id": "490bb205-a1e3-4585-bad5-de615635a94f",
            "name": "Schedule Trigger"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                240
            ],
            "id": "18272cd3-1dca-4adb-b523-fc608ef13d92",
            "name": "Set Var1"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $json.page_id }}/video_reels",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "bodyParameters": {
                    "parameters": [
                        {
                            "name": "upload_phase",
                            "value": "start"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -360,
                240
            ],
            "id": "de70b6cd-50a5-428c-a6ab-a9a26631a9e8",
            "name": "Initial"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $('Set Var1').item.json.url_drive }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                -140,
                240
            ],
            "id": "cdfd46d3-afcc-4216-9aec-2acd993afe95",
            "name": "Dowload Reel",
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "method": "POST",
                "url": "={{ $('Initial').item.json.upload_url }}",
                "sendHeaders": true,
                "headerParameters": {
                    "parameters": [
                        {
                            "name": "Authorization",
                            "value": "=OAuth {{ $('Set Var1').item.json.access_token }}"
                        },
                        {
                            "name": "offset",
                            "value": "0"
                        },
                        {
                            "name": "file_size",
                            "value": "={{ parseInt($('Dowload Reel').item.binary.data.fileSize.split(\" \")[0]*100000,10) }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "binaryData",
                "inputDataFieldName": "data",
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                80,
                240
            ],
            "id": "d9a6e2c2-9325-4b18-a46f-156222ef7896",
            "name": "Upload Local"
        },
        {
            "parameters": {
                "url": "=https://graph.facebook.com/v22.0/{{ $('Initial').item.json.video_id }}",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "fields",
                            "value": "status"
                        },
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var1').item.json.access_token }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                300,
                240
            ],
            "id": "ac6e13c3-f185-4322-ad0b-ff76b9c0132a",
            "name": "Get Status Reel"
        },
        {
            "parameters": {
                "amount": 10
            },
            "type": "n8n-nodes-base.wait",
            "typeVersion": 1.1,
            "position": [
                760,
                340
            ],
            "id": "016010d1-0283-4c61-8421-9cceb89b9999",
            "name": "Wait",
            "webhookId": "106b7021-878a-4bf4-b8ed-3beec48f6513"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var1').item.json.page_id }}/video_reels",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var1').item.json.access_token }}"
                        },
                        {
                            "name": "=video_id",
                            "value": "={{ $('Initial').item.json.video_id }}"
                        },
                        {
                            "name": "upload_phase",
                            "value": "finish"
                        },
                        {
                            "name": "video_state",
                            "value": "PUBLISHED"
                        },
                        {
                            "name": "description",
                            "value": "What a beautiful day! #sunnyand72"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                900,
                220
            ],
            "id": "61978611-d280-4afa-b2ee-6d754b8e10fc",
            "name": "Public"
        },
        {
            "parameters": {
                "conditions": {
                    "options": {
                        "caseSensitive": true,
                        "leftValue": "",
                        "typeValidation": "strict",
                        "version": 2
                    },
                    "conditions": [
                        {
                            "id": "667fa6d2-9f2f-40a0-ac1c-5821650b74d5",
                            "leftValue": "={{ $json.status.video_status }}",
                            "rightValue": "upload_complete",
                            "operator": {
                                "type": "string",
                                "operation": "equals",
                                "name": "filter.operator.equals"
                            }
                        }
                    ],
                    "combinator": "and"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.if",
            "typeVersion": 2.2,
            "position": [
                520,
                240
            ],
            "id": "69796871-47ec-491d-8ec6-db8b9f26f7d7",
            "name": "If"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                -240
            ],
            "id": "968f2376-fe58-4284-ab60-1be676b8b712",
            "name": "Schedule Trigger1"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                0
            ],
            "id": "2fecd8b1-8ec1-4517-950e-1113573ea4ec",
            "name": "Schedule Trigger2"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                -460
            ],
            "id": "932eb262-38d2-4115-9f92-7c153e3df862",
            "name": "Schedule Trigger3"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                -680
            ],
            "id": "3cf31714-a989-4c18-b662-1c50e12755ca",
            "name": "Schedule Trigger4"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                -900
            ],
            "id": "618657fe-7991-464e-96de-f81c61c0a591",
            "name": "Schedule Trigger5"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                -900
            ],
            "id": "0dcd0c37-7c94-4117-a363-0a044897354d",
            "name": "Set Var3"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                -680
            ],
            "id": "6f2deee2-80f0-4375-b3ab-a3a463cd4b69",
            "name": "Set Var4"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                -460
            ],
            "id": "50f51142-150b-4996-8b24-9ea14a401e82",
            "name": "Set Var5"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "=https://drive.google.com/file/d/a\nhttps://drive.google.com/file/d/b\nhttps://drive.google.com/file/d/c",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -560,
                -240
            ],
            "id": "1478a0a1-5a62-409d-853c-6bc7730ea867",
            "name": "Set Var6"
        },
        {
            "parameters": {
                "content": "### Chỉ post status",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                -160,
                -900
            ],
            "typeVersion": 1,
            "id": "66db8283-92c9-41ad-9154-ed6eeff827a6",
            "name": "Sticky Note"
        },
        {
            "parameters": {
                "content": "### Post text + background",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                -160,
                -660
            ],
            "typeVersion": 1,
            "id": "395118ff-e04b-4431-bc53-90cfbd737b6f",
            "name": "Sticky Note1"
        },
        {
            "parameters": {
                "content": "### Post ảnh đơn",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                280,
                -460
            ],
            "typeVersion": 1,
            "id": "4420931f-a2a1-418e-9a17-e6dafef830ca",
            "name": "Sticky Note2"
        },
        {
            "parameters": {
                "content": "### Post nhiều ảnh",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                1740,
                -220
            ],
            "typeVersion": 1,
            "id": "d00a5ce4-e415-4010-b30b-06667e4fa2a8",
            "name": "Sticky Note3"
        },
        {
            "parameters": {
                "content": "### Post video",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                300,
                20
            ],
            "typeVersion": 1,
            "id": "4c05503c-ed4f-40ab-a0b9-9ca3ca29a381",
            "name": "Sticky Note4"
        },
        {
            "parameters": {
                "content": "### Post reels",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                1120,
                240
            ],
            "typeVersion": 1,
            "id": "62ff5515-5311-46a3-aa16-5a6af2f31062",
            "name": "Sticky Note5"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $json.url_drive }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                -380,
                520
            ],
            "id": "2ceb7ab1-7635-4f81-99c8-33418665baba",
            "name": "Dowload Single Photo1",
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -780,
                520
            ],
            "id": "b6c23a55-b263-4540-93c6-0d048b3660a3",
            "name": "Schedule Trigger6"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -580,
                520
            ],
            "id": "57acaded-4b5d-445b-896e-060d3b2ad907",
            "name": "Set Var7"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var7').item.json.page_id }}/photos",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var7').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "multipart-form-data",
                "bodyParameters": {
                    "parameters": [
                        {
                            "parameterType": "formBinaryData",
                            "name": "=data",
                            "inputDataFieldName": "data"
                        },
                        {
                            "name": "published",
                            "value": "false"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -160,
                520
            ],
            "id": "587cd5f7-1fae-49f0-963f-80f4916ce5f1",
            "name": "HTTP Post Img Not Public1"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Dowload Single Photo1').item.json.page_id }}/photo_stories",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var7').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "bodyParameters": {
                    "parameters": [
                        {
                            "name": "photo_id",
                            "value": "={{ $json.id }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                60,
                520
            ],
            "id": "f9dbe017-e906-4b87-b784-a02ebc8932bf",
            "name": "Public Story Img"
        },
        {
            "parameters": {
                "content": "### Post story img",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                340,
                560
            ],
            "typeVersion": 1,
            "id": "1c51c59e-c587-42a5-9db7-408bf81451f5",
            "name": "Sticky Note6"
        },
        {
            "parameters": {
                "assignments": {
                    "assignments": [
                        {
                            "id": "995f4bef-e899-42b5-a30f-f8d85aa76221",
                            "name": "access_token",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "60a401d9-57f2-4f41-8739-e262367288a4",
                            "name": "page_id",
                            "value": "",
                            "type": "string"
                        },
                        {
                            "id": "22e7fe25-0fef-4419-b2c4-8af581403ba6",
                            "name": "text_format_preset_id",
                            "value": "248623902401250",
                            "type": "string"
                        },
                        {
                            "id": "2bd7fe90-dd38-478a-bff8-a4d19b4c5089",
                            "name": "url_drive",
                            "value": "",
                            "type": "string"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.set",
            "typeVersion": 3.4,
            "position": [
                -580,
                740
            ],
            "id": "683ab09a-45ea-4295-838d-c2af9d1d5db0",
            "name": "Set Var8"
        },
        {
            "parameters": {
                "operation": "download",
                "fileId": {
                    "__rl": true,
                    "value": "={{ $('Set Var8').item.json.url_drive }}",
                    "mode": "url"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.googleDrive",
            "typeVersion": 3,
            "position": [
                -140,
                740
            ],
            "id": "a722b143-bd63-4f07-863f-89e8d894593e",
            "name": "Dowload Video2",
            "retryOnFail": true,
            "credentials": {
                "googleDriveOAuth2Api": {
                    "id": "e5m1Lngzxn42ydJD",
                    "name": "Upload_GGDrive"
                }
            }
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $json.page_id }}/video_stories",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "=upload_phase",
                            "value": "=start"
                        },
                        {
                            "name": "access_token",
                            "value": "={{ $json.access_token }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                -380,
                740
            ],
            "id": "893b0daa-42e2-4571-ad02-8e634402acbe",
            "name": "Khởi tạo phiên2"
        },
        {
            "parameters": {
                "rule": {
                    "interval": [
                        {}
                    ]
                }
            },
            "type": "n8n-nodes-base.scheduleTrigger",
            "typeVersion": 1.2,
            "position": [
                -800,
                740
            ],
            "id": "f5b4a4ed-fdd7-4399-a6ed-5d9aa332b1f1",
            "name": "Schedule Trigger7"
        },
        {
            "parameters": {
                "content": "### Post story video",
                "height": 80,
                "width": 150
            },
            "type": "n8n-nodes-base.stickyNote",
            "position": [
                1140,
                720
            ],
            "typeVersion": 1,
            "id": "30778415-1759-4b9d-8a66-0f2b8b351d8a",
            "name": "Sticky Note7"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://rupload.facebook.com/video-upload/v22.0/{{ $('Khởi tạo phiên2').item.json.video_id }}",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var8').item.json.access_token }}"
                        }
                    ]
                },
                "sendHeaders": true,
                "headerParameters": {
                    "parameters": [
                        {
                            "name": "offset",
                            "value": "0"
                        },
                        {
                            "name": "file_size",
                            "value": "={{ parseInt($('Dowload Video2').item.binary.data.fileSize.split(\" \")[0]*100000) }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "binaryData",
                "inputDataFieldName": "=data",
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                80,
                740
            ],
            "id": "0e03a73c-2f59-436c-9eae-0fb23645d2c4",
            "name": "Upload Video Story"
        },
        {
            "parameters": {
                "url": "=https://graph.facebook.com/v22.0/{{ $('Khởi tạo phiên2').item.json.video_id }}",
                "sendQuery": true,
                "queryParameters": {
                    "parameters": [
                        {
                            "name": "access_token",
                            "value": "={{ $('Set Var8').item.json.access_token }}"
                        },
                        {
                            "name": "fields",
                            "value": "status"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                300,
                740
            ],
            "id": "c87e6b0a-94c9-4c31-82d4-c1f89a03117a",
            "name": "Get Status Video Story"
        },
        {
            "parameters": {
                "amount": 10
            },
            "type": "n8n-nodes-base.wait",
            "typeVersion": 1.1,
            "position": [
                780,
                840
            ],
            "id": "783f2911-d2e9-484a-bfa0-9a33dde72a6a",
            "name": "Wait1",
            "webhookId": "b8636840-6294-43f7-89d3-4315997342fa"
        },
        {
            "parameters": {
                "conditions": {
                    "options": {
                        "caseSensitive": true,
                        "leftValue": "",
                        "typeValidation": "strict",
                        "version": 2
                    },
                    "conditions": [
                        {
                            "id": "667fa6d2-9f2f-40a0-ac1c-5821650b74d5",
                            "leftValue": "={{ $json.status.video_status }}",
                            "rightValue": "upload_complete",
                            "operator": {
                                "type": "string",
                                "operation": "equals",
                                "name": "filter.operator.equals"
                            }
                        }
                    ],
                    "combinator": "and"
                },
                "options": {}
            },
            "type": "n8n-nodes-base.if",
            "typeVersion": 2.2,
            "position": [
                540,
                740
            ],
            "id": "dae0878d-cf5f-439c-b308-5664613edf7d",
            "name": "If1"
        },
        {
            "parameters": {
                "method": "POST",
                "url": "=https://graph.facebook.com/v22.0/{{ $('Set Var8').item.json.page_id }}/video_stories",
                "sendHeaders": true,
                "headerParameters": {
                    "parameters": [
                        {
                            "name": "Authorization",
                            "value": "=Bearer {{ $('Set Var8').item.json.access_token }}"
                        }
                    ]
                },
                "sendBody": true,
                "contentType": "form-urlencoded",
                "bodyParameters": {
                    "parameters": [
                        {
                            "name": "upload_phase",
                            "value": "finish"
                        },
                        {
                            "name": "video_id",
                            "value": "={{ $('Dowload Video2').item.json.video_id }}"
                        }
                    ]
                },
                "options": {}
            },
            "type": "n8n-nodes-base.httpRequest",
            "typeVersion": 4.2,
            "position": [
                920,
                720
            ],
            "id": "7281aee3-f5a4-43a6-9e76-896ac8d165bc",
            "name": "Public Video Story"
        }
    ],
    "pinData": {
        "Schedule Trigger7": [
            {
                "json": {
                    "timestamp": "2025-05-06T11:58:21.370-04:00",
                    "Readable date": "May 6th 2025, 11:58:21 am",
                    "Readable time": "11:58:21 am",
                    "Day of week": "Tuesday",
                    "Year": "2025",
                    "Month": "May",
                    "Day of month": "06",
                    "Hour": "11",
                    "Minute": "58",
                    "Second": "21",
                    "Timezone": "America/New_York (UTC-04:00)"
                }
            }
        ]
    },
    "connections": {
        "Set Var": {
            "main": [
                [
                    {
                        "node": "Dowload Video",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Feed Post Text Only": {
            "main": [
                []
            ]
        },
        "Dowload Single Photo": {
            "main": [
                [
                    {
                        "node": "Single Img HTTP",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Convert Array": {
            "main": [
                [
                    {
                        "node": "Split Out",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Split Out": {
            "main": [
                [
                    {
                        "node": "Dowload Lần Lượt",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Dowload Lần Lượt": {
            "main": [
                [
                    {
                        "node": "HTTP Post Img Not Public",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get Media FBID": {
            "main": [
                [
                    {
                        "node": "Aggregate",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Aggregate": {
            "main": [
                [
                    {
                        "node": "HTTP Public Post Imgs",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Single Post Graph API": {
            "main": [
                []
            ]
        },
        "HTTP Post Img Not Public": {
            "main": [
                [
                    {
                        "node": "Get Media FBID",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Dowload Video": {
            "main": [
                [
                    {
                        "node": "Public Video",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger": {
            "main": [
                [
                    {
                        "node": "Set Var1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var1": {
            "main": [
                [
                    {
                        "node": "Initial",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Initial": {
            "main": [
                [
                    {
                        "node": "Dowload Reel",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Dowload Reel": {
            "main": [
                [
                    {
                        "node": "Upload Local",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Upload Local": {
            "main": [
                [
                    {
                        "node": "Get Status Reel",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get Status Reel": {
            "main": [
                [
                    {
                        "node": "If",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Wait": {
            "main": [
                [
                    {
                        "node": "If",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "If": {
            "main": [
                [
                    {
                        "node": "Public",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Wait",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger1": {
            "main": [
                [
                    {
                        "node": "Set Var6",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger2": {
            "main": [
                [
                    {
                        "node": "Set Var",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger3": {
            "main": [
                [
                    {
                        "node": "Set Var5",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger4": {
            "main": [
                [
                    {
                        "node": "Set Var4",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger5": {
            "main": [
                [
                    {
                        "node": "Set Var3",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var3": {
            "main": [
                [
                    {
                        "node": "Feed Post Text Only",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var4": {
            "main": [
                [
                    {
                        "node": "Feed With Background",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var5": {
            "main": [
                [
                    {
                        "node": "Dowload Single Photo",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var6": {
            "main": [
                [
                    {
                        "node": "Convert Array",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger6": {
            "main": [
                [
                    {
                        "node": "Set Var7",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var7": {
            "main": [
                [
                    {
                        "node": "Dowload Single Photo1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Dowload Single Photo1": {
            "main": [
                [
                    {
                        "node": "HTTP Post Img Not Public1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "HTTP Post Img Not Public1": {
            "main": [
                [
                    {
                        "node": "Public Story Img",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Set Var8": {
            "main": [
                [
                    {
                        "node": "Khởi tạo phiên2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Khởi tạo phiên2": {
            "main": [
                [
                    {
                        "node": "Dowload Video2",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Schedule Trigger7": {
            "main": [
                [
                    {
                        "node": "Set Var8",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Dowload Video2": {
            "main": [
                [
                    {
                        "node": "Upload Video Story",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Upload Video Story": {
            "main": [
                [
                    {
                        "node": "Get Status Video Story",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Wait1": {
            "main": [
                [
                    {
                        "node": "If1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "If1": {
            "main": [
                [
                    {
                        "node": "Public Video Story",
                        "type": "main",
                        "index": 0
                    }
                ],
                [
                    {
                        "node": "Wait1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        },
        "Get Status Video Story": {
            "main": [
                [
                    {
                        "node": "If1",
                        "type": "main",
                        "index": 0
                    }
                ]
            ]
        }
    },
    "active": false,
    "settings": {
        "executionOrder": "v1"
    },
    "versionId": "9a559796-ff99-4a32-b492-4602ceb991b0",
    "meta": {
        "templateCredsSetupCompleted": true,
        "instanceId": "99bb852dcc3552c3d88ab95d0ac8b2f305fe468bdc1a11804fc1762bd072fe04"
    },
    "id": "CHQLs2odLfzeJmY3",
    "tags": []
}