{
  "createdAt": "2025-04-20T00:50:25.720Z",
  "updatedAt": "2025-04-20T17:29:13.393Z",
  "id": "FXZ4tW046APURVFw",
  "name": "Authenticate_instagram",
  "active": false,
  "isArchived": false,
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "5b2109de-dbc0-40dd-9923-e69c416cc432",
        "options": {}
      },
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 2,
      "position": [
        -180,
        120
      ],
      "id": "e43ea6e7-75fe-44fe-a480-d965f6b2b68b",
      "name": "Webhook"
    },
    {
      "parameters": {
        "url": "https://graph.instagram.com/access_token",
        "authentication": "genericCredentialType",
        "genericAuthType": "oAuth2Api",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "grant_type",
              "value": "ig_exchange_token"
            },
            {
              "name": "client_secret",
              "value": "={{ $json.client_secret }}"
            },
            {
              "name": "access_token"
            }
          ]
        },
        "options": {
          "response": {
            "response": {
              "fullResponse": true
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        520,
        -100
      ],
      "id": "32c14edb-fc4e-40b3-a016-ac68a29e65f8",
      "name": "HTTP Request1",
      "executeOnce": true,
      "credentials": {
        "oAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "0ad1ed2a-ffd3-42e3-a36e-536209615733",
              "name": "scope",
              "value": "instagram_business_basic,instagram_business_manage_messages,instagram_business_manage_comments,instagram_business_basic,instagram_business_content_publish",
              "type": "string"
            },
            {
              "id": "d793fc6d-aca3-48e7-ae96-c685948f25f1",
              "name": "client_secret",
              "value": "7a2d60b51e928d9c6e1fc92faf4861d8",
              "type": "string"
            },
            {
              "id": "c5238752-a97a-4dbe-af15-1ae674e351e5",
              "name": "client_id",
              "value": "1189244906043040",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.4,
      "position": [
        -80,
        -100
      ],
      "id": "551e2ed2-d539-4032-8722-f24864e4adcc",
      "name": "Edit Fields2"
    },
    {
      "parameters": {},
      "type": "n8n-nodes-base.manualTrigger",
      "typeVersion": 1,
      "position": [
        -300,
        -120
      ],
      "id": "541f9b3d-76d0-4772-aecf-8cdfbcf31b13",
      "name": "When clicking \u2018Test workflow\u2019"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://www.instagram.com/oauth/authorize",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "client_id",
              "value": "={{ $json.client_id }}"
            },
            {
              "name": "redirect_uri",
              "value": "https://n8n-main.egtechsolutions.com.br/rest/oauth2-credential/callback"
            },
            {
              "name": "response_type",
              "value": "code"
            },
            {
              "name": "scope",
              "value": "={{ $json.scope }}"
            }
          ]
        },
        "options": {
          "batching": {
            "batch": {
              "batchSize": 0,
              "batchInterval": 10000
            }
          },
          "response": {
            "response": {
              "fullResponse": true,
              "responseFormat": "json"
            }
          }
        }
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        140,
        -100
      ],
      "id": "75e3a525-88fc-4dfc-a27d-640be3316aa1",
      "name": "HTTP Request",
      "executeOnce": true,
      "notesInFlow": false
    }
  ],
  "connections": {
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "HTTP Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking \u2018Test workflow\u2019": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HTTP Request": {
      "main": [
        [
          {
            "node": "HTTP Request1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "meta": null,
  "versionId": "e6b18dfa-1b2b-4bd3-9565-b44c60dde062",
  "triggerCount": 0,
  "tags": []
}