Download public media with more than 100 likes from an instagram page and save them with their captions

Hello there I am trying to save instagram posts with their captions in google drive and google sheet.
Below I am attaching the steps but unfortunately, I cant make it work .

The steps I used are:
List Public User Media for IG for Business
Iterator where Likes >100
Downlaod Media for IG for Business
Router
A.Upload file to Google Drive
B.Add Row in Google Sheet

My ultimate Goal is to back up files from a page I lost logins.

Any assistance will be valuable !

1 Like

If it’s public you don’t even need IG to view likes and download the media. You can use good old HTTP.

You can use an external API from RapidAPI to fetch the media

Screenshot_2024-03-01_090323 Screenshot_2024-03-01_090330

You can copy and paste this module export into your scenario. This will paste the modules shown in my screenshots above.

  1. Copy the code below by clicking the copy button when you mouseover the top-right of the code block
    Screenshot_2024-01-17_200117

  2. Enter your scenario editor. Press ESC to close any dialogs. Press CTRLV to paste in the canvas.

  3. Click on each imported module and save it. You may need to remap some variables.

Modules JSON Export

{
    "subflows": [
        {
            "flow": [
                {
                    "id": 27,
                    "module": "http:ActionSendDataAPIKeyAuth",
                    "version": 3,
                    "parameters": {
                        "auth": 1,
                        "handleErrors": true
                    },
                    "mapper": {
                        "ca": "",
                        "qs": [
                            {
                                "name": "code",
                                "value": "{{1.url}}"
                            }
                        ],
                        "url": "https://instagram130.p.rapidapi.com/media-info",
                        "gzip": true,
                        "method": "get",
                        "headers": [
                            {
                                "name": "X-RapidAPI-Host",
                                "value": "instagram130.p.rapidapi.com"
                            }
                        ],
                        "timeout": "",
                        "useMtls": false,
                        "bodyType": "",
                        "serializeUrl": false,
                        "shareCookies": false,
                        "parseResponse": true,
                        "followRedirect": true,
                        "useQuerystring": false,
                        "followAllRedirects": false,
                        "rejectUnauthorized": true
                    },
                    "metadata": {
                        "designer": {
                            "x": 1204,
                            "y": 1674,
                            "name": "instagram130"
                        },
                        "restore": {
                            "expect": {
                                "qs": {
                                    "mode": "chose",
                                    "items": [
                                        null
                                    ]
                                },
                                "method": {
                                    "mode": "chose",
                                    "label": "GET"
                                },
                                "headers": {
                                    "mode": "chose",
                                    "items": [
                                        null
                                    ]
                                },
                                "bodyType": {
                                    "label": "Empty"
                                }
                            },
                            "parameters": {
                                "auth": {
                                    "label": "RapidAPI"
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "auth",
                                "type": "keychain:apikeyauth",
                                "label": "Credentials",
                                "required": true
                            },
                            {
                                "name": "handleErrors",
                                "type": "boolean",
                                "label": "Evaluate all states as errors (except for 2xx and 3xx )",
                                "required": true
                            }
                        ],
                        "expect": [
                            {
                                "name": "url",
                                "type": "url",
                                "label": "URL",
                                "required": true
                            },
                            {
                                "name": "serializeUrl",
                                "type": "boolean",
                                "label": "Serialize URL",
                                "required": true
                            },
                            {
                                "name": "method",
                                "type": "select",
                                "label": "Method",
                                "required": true,
                                "validate": {
                                    "enum": [
                                        "get",
                                        "head",
                                        "post",
                                        "put",
                                        "patch",
                                        "delete",
                                        "options"
                                    ]
                                }
                            },
                            {
                                "name": "headers",
                                "spec": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Headers"
                            },
                            {
                                "name": "qs",
                                "spec": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Query String"
                            },
                            {
                                "name": "bodyType",
                                "type": "select",
                                "label": "Body type",
                                "validate": {
                                    "enum": [
                                        "raw",
                                        "x_www_form_urlencoded",
                                        "multipart_form_data"
                                    ]
                                }
                            },
                            {
                                "name": "parseResponse",
                                "type": "boolean",
                                "label": "Parse response",
                                "required": true
                            },
                            {
                                "name": "timeout",
                                "type": "uinteger",
                                "label": "Timeout",
                                "validate": {
                                    "max": 300,
                                    "min": 1
                                }
                            },
                            {
                                "name": "shareCookies",
                                "type": "boolean",
                                "label": "Share cookies with other HTTP modules",
                                "required": true
                            },
                            {
                                "name": "ca",
                                "type": "cert",
                                "label": "Self-signed certificate"
                            },
                            {
                                "name": "rejectUnauthorized",
                                "type": "boolean",
                                "label": "Reject connections that are using unverified (self-signed) certificates",
                                "required": true
                            },
                            {
                                "name": "followRedirect",
                                "type": "boolean",
                                "label": "Follow redirect",
                                "required": true
                            },
                            {
                                "name": "useQuerystring",
                                "type": "boolean",
                                "label": "Disable serialization of multiple same query string keys as arrays",
                                "required": true
                            },
                            {
                                "name": "gzip",
                                "type": "boolean",
                                "label": "Request compressed content",
                                "required": true
                            },
                            {
                                "name": "useMtls",
                                "type": "boolean",
                                "label": "Use Mutual TLS",
                                "required": true
                            },
                            {
                                "name": "followAllRedirects",
                                "type": "boolean",
                                "label": "Follow all redirect",
                                "required": true
                            }
                        ]
                    }
                }
            ]
        },
        {
            "flow": [
                {
                    "id": 30,
                    "module": "http:ActionSendDataAPIKeyAuth",
                    "version": 3,
                    "parameters": {
                        "auth": 2,
                        "handleErrors": true
                    },
                    "mapper": {
                        "ca": "",
                        "qs": [],
                        "url": "https://instagram243.p.rapidapi.com/postdetail/{{1.url}}",
                        "gzip": true,
                        "method": "get",
                        "headers": [
                            {
                                "name": "X-RapidAPI-Host",
                                "value": "instagram243.p.rapidapi.com"
                            }
                        ],
                        "timeout": "",
                        "useMtls": false,
                        "bodyType": "",
                        "serializeUrl": false,
                        "shareCookies": false,
                        "parseResponse": true,
                        "followRedirect": true,
                        "useQuerystring": false,
                        "followAllRedirects": false,
                        "rejectUnauthorized": true
                    },
                    "metadata": {
                        "designer": {
                            "x": 2100,
                            "y": 1650,
                            "name": "instagram243"
                        },
                        "restore": {
                            "expect": {
                                "qs": {
                                    "mode": "chose"
                                },
                                "method": {
                                    "mode": "chose",
                                    "label": "GET"
                                },
                                "headers": {
                                    "mode": "chose",
                                    "items": [
                                        null
                                    ]
                                },
                                "bodyType": {
                                    "label": "Empty"
                                }
                            },
                            "parameters": {
                                "auth": {
                                    "label": "RapidAPI"
                                }
                            }
                        },
                        "parameters": [
                            {
                                "name": "auth",
                                "type": "keychain:apikeyauth",
                                "label": "Credentials",
                                "required": true
                            },
                            {
                                "name": "handleErrors",
                                "type": "boolean",
                                "label": "Evaluate all states as errors (except for 2xx and 3xx )",
                                "required": true
                            }
                        ],
                        "expect": [
                            {
                                "name": "url",
                                "type": "url",
                                "label": "URL",
                                "required": true
                            },
                            {
                                "name": "serializeUrl",
                                "type": "boolean",
                                "label": "Serialize URL",
                                "required": true
                            },
                            {
                                "name": "method",
                                "type": "select",
                                "label": "Method",
                                "required": true,
                                "validate": {
                                    "enum": [
                                        "get",
                                        "head",
                                        "post",
                                        "put",
                                        "patch",
                                        "delete",
                                        "options"
                                    ]
                                }
                            },
                            {
                                "name": "headers",
                                "spec": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Headers"
                            },
                            {
                                "name": "qs",
                                "spec": [
                                    {
                                        "name": "name",
                                        "type": "text",
                                        "label": "Name",
                                        "required": true
                                    },
                                    {
                                        "name": "value",
                                        "type": "text",
                                        "label": "Value"
                                    }
                                ],
                                "type": "array",
                                "label": "Query String"
                            },
                            {
                                "name": "bodyType",
                                "type": "select",
                                "label": "Body type",
                                "validate": {
                                    "enum": [
                                        "raw",
                                        "x_www_form_urlencoded",
                                        "multipart_form_data"
                                    ]
                                }
                            },
                            {
                                "name": "parseResponse",
                                "type": "boolean",
                                "label": "Parse response",
                                "required": true
                            },
                            {
                                "name": "timeout",
                                "type": "uinteger",
                                "label": "Timeout",
                                "validate": {
                                    "max": 300,
                                    "min": 1
                                }
                            },
                            {
                                "name": "shareCookies",
                                "type": "boolean",
                                "label": "Share cookies with other HTTP modules",
                                "required": true
                            },
                            {
                                "name": "ca",
                                "type": "cert",
                                "label": "Self-signed certificate"
                            },
                            {
                                "name": "rejectUnauthorized",
                                "type": "boolean",
                                "label": "Reject connections that are using unverified (self-signed) certificates",
                                "required": true
                            },
                            {
                                "name": "followRedirect",
                                "type": "boolean",
                                "label": "Follow redirect",
                                "required": true
                            },
                            {
                                "name": "useQuerystring",
                                "type": "boolean",
                                "label": "Disable serialization of multiple same query string keys as arrays",
                                "required": true
                            },
                            {
                                "name": "gzip",
                                "type": "boolean",
                                "label": "Request compressed content",
                                "required": true
                            },
                            {
                                "name": "useMtls",
                                "type": "boolean",
                                "label": "Use Mutual TLS",
                                "required": true
                            },
                            {
                                "name": "followAllRedirects",
                                "type": "boolean",
                                "label": "Follow all redirect",
                                "required": true
                            }
                        ]
                    }
                }
            ]
        }
    ],
    "metadata": {
        "version": 1
    }
}

Then, use HTTP “Get a file” module to download each image/slide in each post.

Screenshot_2024-03-01_090332

3 Likes