Instagram post error for image posting

Describe the problem/error/question

When connected with Imgbb to fetch the image URL(image is jpeg), Instagram media container in Facebook Graph API node is showing an error.

What is the error message (if any)?

Only photo or video can be accepted as media type.

Please share your workflow

{
“nodes”: [
{
“parameters”: {
“rule”: {
“interval”: [
{}
]
}
},
“id”: “c53bc70a-2e85-465a-b977-73cfd268ba41”,
“name”: “Scheduled Start: Check for New Posts”,
“type”: “n8n-nodes-base.scheduleTrigger”,
“position”: [
896,
304
],
“typeVersion”: 1.2
},
{
“parameters”: {
“documentId”: {
“__rl”: true,
“value”: “1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4”,
“mode”: “list”,
“cachedResultName”: “n8n Posts”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4/edit?usp=drivesdk”
},
“sheetName”: {
“__rl”: true,
“value”: “gid=0”,
“mode”: “list”,
“cachedResultName”: “LinkedIn”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4/edit#gid=0”
},
“options”: {}
},
“id”: “aa73f2af-f311-465b-8270-b027b17eec0d”,
“name”: “1. Get Next Post Idea from Sheet”,
“type”: “n8n-nodes-base.googleSheets”,
“position”: [
1120,
304
],
“typeVersion”: 4.5,
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “B8ovAUeYzT3AdRgF”,
“name”: “Google Sheets account”
}
}
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “aa3b9a02-ac6a-4d7f-937f-a0e6e566a0c8”,
“name”: “Topic”,
“type”: “string”,
“value”: “={{ $json.Topic }}”
},
{
“id”: “e48783e8-5f6b-4c54-bf4f-c004414dc510”,
“name”: “TargetAudience”,
“type”: “string”,
“value”: “={{ $json.Audience }}”
},
{
“id”: “c499a954-b4c6-4702-ab86-3656aa2b1783”,
“name”: “BrandVoice”,
“type”: “string”,
“value”: “={{ $json.Voice }}”
},
{
“id”: “210f7103-4d6b-42e9-9168-fd99dff94b5a”,
“name”: “Platform”,
“type”: “string”,
“value”: “={{ $json.Platform }}”
}
]
},
“options”: {}
},
“id”: “42e129d0-5e4f-4226-a86f-b7fd04c8c497”,
“name”: “2. Prepare Input Variables (Topic, Audience, etc.)”,
“type”: “n8n-nodes-base.set”,
“position”: [
1344,
304
],
“typeVersion”: 3.4
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=”,
“hasOutputParser”: true,
“messages”: {
“messageValues”: [
{
“message”: “= You are a highly imaginative Social Media Strategist specializing in generating unique, platform-aware content CONCEPTS for Instagram and LinkedIn. You think beyond basic formats and consider audience engagement. Based only on the Topic, Target Audience, Brand Voice, AND target Platform (‘Instagram’ or ‘LinkedIn’), generate exactly 1 creative content CONCEPT. Focus on the core message, angle, or hook. The suggested format MUST be “Single Image”. 1. Platform Optimization: Explicitly tailor the type and angle of the concept to the specified Platform. Consider typical user expectations and content formats: * Instagram: Often more visual, storytelling, personal, community-focused, impactful single images. * LinkedIn: Can utilize impactful single images to convey data points, key takeaways, or thought-provoking visuals supporting a concise message. 2. Originality: Avoid common tropes (like basic quotes) unless the input strongly suggests it. Explore diverse angles: striking visual representations of data, metaphorical imagery, thought-provoking questions presented visually, behind-the-scenes moments captured in a compelling image, key message highlighted graphically. 3. Format Suggestion: The format MUST be “Single Image”. The CONCEPT is primary, the format is fixed. <input_context> {{ $json.Topic }} </input_context> <output_instructions> Your response MUST be a single, valid JSON object containing exactly one key: ideas. The value of ideas MUST be an array containing exactly 1 object. The object in the array MUST have two keys: concept (string: the descriptive concept text) and suggested_format (string: MUST be “Single Image”). Example: {\"ideas\": [{\"concept\": \"Concept text...\", \"suggested_format\": \"Single Image\"}]} Do NOT include any other text, explanations, or formatting outside the JSON structure. </output_instructions> ”
}
]
}
},
“id”: “5036db9b-1a1b-48d7-bfaa-1839ba5331b5”,
“name”: “3a. Generate Content Concept (Gemini)”,
“type”: “@n8n/n8n-nodes-langchain.chainLlm”,
“position”: [
1568,
304
],
“typeVersion”: 1.5
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-001”,
“options”: {}
},
“id”: “5a882770-53af-466c-a297-856b088eb2b9”,
“name”: “(LLM Model for Concept)”,
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“position”: [
1600,
528
],
“typeVersion”: 1,
“credentials”: {
“googlePalmApi”: {
“id”: “iHs6MQeMdaPRCTTC”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“schemaType”: “manual”,
“inputSchema”: “{\n “type”: “object”,\n “properties”: {\n “ideas”: {\n “type”: “array”,\n “description”: “An array containing exactly 1 content concept.”,\n “minItems”: 1,\n “maxItems”: 1,\n “items”: {\n “type”: “object”,\n “properties”: {\n “concept”: {\n “type”: “string”,\n “description”: “The detailed text describing the content concept for a Single Image.”\n },\n “suggested_format”: {\n “type”: “string”,\n “description”: “The post format, which MUST be ‘Single Image’.”,\n “const”: “Single Image”\n }\n },\n “required”: [\n “concept”,\n “suggested_format”\n ]\n }\n }\n },\n “required”: [\n “ideas”\n ]\n}”
},
“id”: “a4132a05-def7-4c4f-ad1d-092533f3b9f2”,
“name”: “(Parse Concept JSON)”,
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“position”: [
1728,
528
],
“typeVersion”: 1.2
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=”,
“hasOutputParser”: true,
“messages”: {
“messageValues”: [
{
“message”: “=\n \n You are an Expert Instagram/LinkedIn Content Strategist and AI Image Prompt Engineer. You excel at elaborating concepts based on user feedback and crafting distinct, detailed, and visually consistent prompt options tailored for the target platform.\n \n\n \n 1. Analyze the Chosen Idea, User Visual Input (if provided and relevant), and target Platform to determine the optimal post format (in this case, assumed to be Single Image based on the output) and elaborate this into a practical expanded_post_concept. Justify format choice based on concept AND platform norms.\n 2. Incorporate the user’s visual direction (if any) into the concept description. If no specific visual input was given, propose a clear visual direction that aligns with the concept and platform.\n 3. Generate TWO DISTINCT OPTIONS for the image prompts based on the expanded_post_concept. Tailor the visual style and content nuances described in the prompts to the target Platform. (E.g., LinkedIn visuals might be cleaner, more data-oriented; Instagram more lifestyle or emotive).\n 4. Ensure Distinction: The two options should offer meaningful variety (e.g., style, composition, focus) while remaining true to the core concept.\n 5. Detail: Prompts should be highly detailed, suitable for advanced AI image generators (include subject, action, setting, style, mood, composition, lighting, color palette keywords).\n \n\n <input_context>\n {{ $json.output.ideas[0].concept }}\n {{ $(‘2. Prepare Input Variables (Topic, Audience, etc.)’).item.json.Topic }}\n </input_context>\n\n <output_instructions>\n Your response MUST be a single, valid JSON object containing exactly two keys: expanded_post_concept and prompt_options.\n - expanded_post_concept (string): The elaborated visual concept, stating Single Image format and incorporating user input/platform considerations.\n - prompt_options (array): MUST contain exactly TWO objects.\n - Each object represents one prompt option and MUST have two keys:\n - option_description (string): Briefly describe the distinct angle/style of this option (e.g., “Option 1: Hyperrealistic…”).\n - prompts (array of strings): Contains ONE string representing the detailed prompt for the single image.\n \n \n Do NOT include any text outside this JSON structure. Do NOT generate captions here.\n </output_instructions>\n”
}
]
}
},
“id”: “46338aad-5f7d-464f-a7fe-e9ae00aacad5”,
“name”: “3b. Generate Image Prompt Options (Gemini)”,
“type”: “@n8n/n8n-nodes-langchain.chainLlm”,
“position”: [
1968,
304
],
“typeVersion”: 1.5
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash-001”,
“options”: {}
},
“id”: “950b7c2f-cebc-41ae-aad8-38b139c1b2ea”,
“name”: “(LLM Model for Prompts)”,
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“position”: [
2000,
528
],
“typeVersion”: 1,
“credentials”: {
“googlePalmApi”: {
“id”: “iHs6MQeMdaPRCTTC”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“schemaType”: “manual”,
“inputSchema”: “{\n “type”: “object”,\n “properties”: {\n “expanded_post_concept”: {\n “type”: “string”,\n “description”: “The elaborated visual concept, stating Single Image format and incorporating user input/platform considerations.”\n },\n “prompt_options”: {\n “type”: “array”,\n “description”: “An array containing exactly TWO prompt options for the single image concept.”,\n “minItems”: 2,\n “maxItems”: 2,\n “items”: {\n “type”: “object”,\n “properties”: {\n “option_description”: {\n “type”: “string”,\n “description”: “Briefly describes the distinct angle/style of this option (e.g., ‘Option 1: Hyperrealistic…’).”\n },\n “prompts”: {\n “type”: “array”,\n “description”: “Contains ONE detailed prompt string for the single image.”,\n “minItems”: 1,\n “maxItems”: 1,\n “items”: {\n “type”: “string”,\n “description”: “A detailed image generation prompt.”\n }\n }\n },\n “required”: [\n “option_description”,\n “prompts”\n ]\n }\n }\n },\n “required”: [\n “expanded_post_concept”,\n “prompt_options”\n ]\n}”
},
“id”: “bfda2858-3a3a-4997-b30c-ce64429bd255”,
“name”: “(Parse Prompts JSON)”,
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“position”: [
2128,
528
],
“typeVersion”: 1.2
},
{
“parameters”: {
“promptType”: “define”,
“text”: “=”,
“hasOutputParser”: true,
“messages”: {
“messageValues”: [
{
“message”: “=\n \n You are an AI Instagram/LinkedIn Caption Writer. You specialize in crafting concise, engaging, and contextually relevant captions based on a generated image (represented by its prompt) and the overall content strategy, specifically tailored for the target platform.\n \n\n \n Write a short, effective social media caption specifically tailored for the target Platform (‘Instagram’ or ‘LinkedIn’).\n * The caption must complement the image described by ImagePrompt and align with all context parameters (ChosenIdea, OriginalTopic, TargetAudience, BrandVoice).\n * Platform Style: Adapt tone, length, calls-to-action, and hashtag usage:\n * Instagram: Can be more conversational, use more emojis, ask engaging questions, often benefits from slightly longer, more storytelling captions if relevant. Use a mix of popular and niche hashtags (3-7 recommended).\n * LinkedIn: Generally more professional, concise, focused on insights or value proposition. Calls-to-action often relate to reading more, commenting with professional opinions, or business objectives. Use targeted, professional hashtags (1-3 recommended).\n * Include 1-5 relevant, platform-appropriate hashtags.\n \n\n <input_context>\n {{ $json.output.prompt_options[0].prompts[0] }}\n {{ $(‘3a. Generate Content Concept (Gemini)’).item.json.output.ideas[0].concept }} \n {{ $(‘1. Get Next Post Idea from Sheet’).item.json.Topic }} \n </input_context>\n\n <output_instructions>\n Your response MUST be a single, valid JSON object containing exactly one key: Caption.\n The value of Caption MUST be a string containing the generated caption text, including hashtags.\n Example: {\"Caption\": \"Caption text tailored for LinkedIn goes here. #ProfessionalDevelopment #IndustryInsights\"}\n Do NOT include any other text, explanations, or formatting outside the JSON structure.\n </output_instructions>\n”
}
]
}
},
“id”: “0151450f-fca2-4628-a268-f90186a79b9e”,
“name”: “3c. Generate Post Caption (Gemini)”,
“type”: “@n8n/n8n-nodes-langchain.chainLlm”,
“position”: [
2368,
304
],
“typeVersion”: 1.5
},
{
“parameters”: {
“modelName”: “models/gemini-2.0-flash”,
“options”: {}
},
“id”: “d4667681-a5aa-4b63-802c-2adf8c111bb9”,
“name”: “(LLM Model for Caption)”,
“type”: “@n8n/n8n-nodes-langchain.lmChatGoogleGemini”,
“position”: [
2400,
528
],
“typeVersion”: 1,
“credentials”: {
“googlePalmApi”: {
“id”: “iHs6MQeMdaPRCTTC”,
“name”: “Google Gemini(PaLM) Api account”
}
}
},
{
“parameters”: {
“jsonSchemaExample”: “{\n\t"Caption": “Thee future of call centers is here!”\n}”
},
“id”: “59da1f6c-ee55-4095-8c95-d60d1177c142”,
“name”: “(Parse Caption JSON)”,
“type”: “@n8n/n8n-nodes-langchain.outputParserStructured”,
“position”: [
2528,
528
],
“typeVersion”: 1.2
},
{
“parameters”: {
“assignments”: {
“assignments”: [
{
“id”: “17ebaaca-7f32-447c-8a61-5122b7edb273”,
“name”: “ImageURL”,
“value”: “={{ $json.data.image.url }}”,
“type”: “string”
},
{
“id”: “1953ae03-6a86-4847-8686-5a928637be1d”,
“name”: “Caption”,
“type”: “string”,
“value”: “={{ $(‘3c. Generate Post Caption (Gemini)’).item.json.output.Caption }}”
}
]
},
“options”: {}
},
“id”: “cc0f0035-0d63-4988-8ec8-89260261960a”,
“name”: “5. Prepare Data for Instagram API”,
“type”: “n8n-nodes-base.set”,
“position”: [
3440,
304
],
“typeVersion”: 3.4
},
{
“parameters”: {
“httpRequestMethod”: “POST”,
“graphApiVersion”: “v23.0”,
“node”: “17841404239641548”,
“edge”: “media”,
“options”: {
“queryParameters”: {
“parameter”: [
{
“name”: “caption”,
“value”: “={{ $json.Caption }}”
},
{
“name”: “image_url”,
“value”: “={{ $json.ImageURL }}”
}
]
}
}
},
“id”: “f010c17f-1af3-4d04-a69c-8b03c70fc8f0”,
“name”: “6a. Create Instagram Media Container”,
“type”: “n8n-nodes-base.facebookGraphApi”,
“position”: [
3664,
304
],
“typeVersion”: 1,
“credentials”: {
“facebookGraphApi”: {
“id”: “ZEdNq3rBD9ziJMXp”,
“name”: “Facebook Graph account”
}
}
},
{
“parameters”: {},
“id”: “c69f1856-efa2-48a5-9e41-71ab67bcaeca”,
“name”: “6b. Wait for Container Processing”,
“type”: “n8n-nodes-base.wait”,
“position”: [
3888,
304
],
“webhookId”: “1b14c8bf-151a-4054-8215-093dd5b6cbcc”,
“typeVersion”: 1.1
},
{
“parameters”: {
“httpRequestMethod”: “POST”,
“graphApiVersion”: “v23.0”,
“node”: “17841404239641548”,
“edge”: “media_publish”,
“options”: {
“queryParameters”: {
“parameter”: [
{
“name”: “creation_id”,
“value”: “={{ $json.id }}”
}
]
}
}
},
“id”: “516b61f0-825e-468b-8eb7-80f757171465”,
“name”: “6c. Publish Post to Instagram”,
“type”: “n8n-nodes-base.facebookGraphApi”,
“position”: [
4112,
304
],
“typeVersion”: 1,
“credentials”: {
“facebookGraphApi”: {
“id”: “ZEdNq3rBD9ziJMXp”,
“name”: “Facebook Graph account”
}
}
},
{
“parameters”: {
“operation”: “update”,
“documentId”: {
“__rl”: true,
“value”: “1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4”,
“mode”: “list”,
“cachedResultName”: “n8n Posts”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4/edit?usp=drivesdk”
},
“sheetName”: {
“__rl”: true,
“value”: “gid=0”,
“mode”: “list”,
“cachedResultName”: “Instagram”,
“cachedResultUrl”: “https://docs.google.com/spreadsheets/d/1iLEoKjLPYeWsxttcpJFTrSgE9DrvFXIXlN8BM_26WN4/edit#gid=0”
},
“columns”: {
“value”: {
“Topic”: “={{ $(‘1. Get Next Post Idea from Sheet’).item.json.Topic }}”,
“Status”: “1”
},
“schema”: [
{
“id”: “Topic”,
“type”: “string”,
“display”: true,
“removed”: false,
“required”: false,
“displayName”: “Topic”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
},
{
“id”: “Audience”,
“type”: “string”,
“display”: true,
“removed”: true,
“required”: false,
“displayName”: “Audience”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
},
{
“id”: “Voice”,
“type”: “string”,
“display”: true,
“removed”: true,
“required”: false,
“displayName”: “Voice”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
},
{
“id”: “Platform”,
“type”: “string”,
“display”: true,
“removed”: true,
“required”: false,
“displayName”: “Platform”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
},
{
“id”: “Status”,
“type”: “string”,
“display”: true,
“required”: false,
“displayName”: “Status”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
},
{
“id”: “row_number”,
“type”: “string”,
“display”: true,
“removed”: true,
“readOnly”: true,
“required”: false,
“displayName”: “row_number”,
“defaultMatch”: false,
“canBeUsedToMatch”: true
}
],
“mappingMode”: “defineBelow”,
“matchingColumns”: [
“Topic”
],
“attemptToConvertTypes”: false,
“convertFieldsToString”: false
},
“options”: {}
},
“id”: “1a94c8ba-7b59-4337-ae07-5c0b2b8349dd”,
“name”: “7. Update Post Status in Sheet”,
“type”: “n8n-nodes-base.googleSheets”,
“position”: [
4336,
304
],
“typeVersion”: 4.5,
“credentials”: {
“googleSheetsOAuth2Api”: {
“id”: “B8ovAUeYzT3AdRgF”,
“name”: “Google Sheets account”
}
}
},
{
“parameters”: {
“resource”: “image”,
“prompt”: “={{ $(‘3b. Generate Image Prompt Options (Gemini)’).item.json.output.prompt_options[0].prompts[0] }}"”,
“options”: {}
},
“type”: “@n8n/n8n-nodes-langchain.openAi”,
“typeVersion”: 1.8,
“position”: [
2768,
304
],
“id”: “813893a1-8289-4193-96fd-96a7d19feea3”,
“name”: “Generate an image”,
“credentials”: {
“openAiApi”: {
“id”: “3ACtIVqXfhnxNbGf”,
“name”: “OpenAi account”
}
}
},
{
“parameters”: {
“method”: “POST”,
“url”: “https://api.imgbb.com/1/upload”,
“sendQuery”: true,
“queryParameters”: {
“parameters”: [
{
“name”: “expiration”,
“value”: “0”
},
{
“name”: “key”,
“value”: "={{ $vars.IMGBB_API_KEY }} "
}
]
},
“sendBody”: true,
“contentType”: “multipart-form-data”,
“bodyParameters”: {
“parameters”: [
{
“parameterType”: “formBinaryData”,
“name”: “image”,
“inputDataFieldName”: “data”
}
]
},
“options”: {
“redirect”: {
“redirect”: {}
}
}
},
“type”: “n8n-nodes-base.httpRequest”,
“typeVersion”: 4.2,
“position”: [
3216,
304
],
“id”: “78a14096-2f70-4a8b-b3cf-83646d1d01a5”,
“name”: “Save Image to imgbb.com3”
},
{
“parameters”: {
“operation”: “resize”,
“width”: 1024,
“height”: 1024,
“options”: {
“format”: “jpeg”
}
},
“type”: “n8n-nodes-base.editImage”,
“typeVersion”: 1,
“position”: [
2992,
304
],
“id”: “a2a3be69-3496-4e63-9f9a-9cbb9e1657bd”,
“name”: “Edit Image”
}
],
“connections”: {
“Scheduled Start: Check for New Posts”: {
“main”: [
[
{
“node”: “1. Get Next Post Idea from Sheet”,
“type”: “main”,
“index”: 0
}
]
]
},
“1. Get Next Post Idea from Sheet”: {
“main”: [
[
{
“node”: “2. Prepare Input Variables (Topic, Audience, etc.)”,
“type”: “main”,
“index”: 0
}
]
]
},
“2. Prepare Input Variables (Topic, Audience, etc.)”: {
“main”: [
[
{
“node”: “3a. Generate Content Concept (Gemini)”,
“type”: “main”,
“index”: 0
}
]
]
},
“3a. Generate Content Concept (Gemini)”: {
“main”: [
[
{
“node”: “3b. Generate Image Prompt Options (Gemini)”,
“type”: “main”,
“index”: 0
}
]
]
},
“(LLM Model for Concept)”: {
“ai_languageModel”: [
[
{
“node”: “3a. Generate Content Concept (Gemini)”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“(Parse Concept JSON)”: {
“ai_outputParser”: [
[
{
“node”: “3a. Generate Content Concept (Gemini)”,
“type”: “ai_outputParser”,
“index”: 0
}
]
]
},
“3b. Generate Image Prompt Options (Gemini)”: {
“main”: [
[
{
“node”: “3c. Generate Post Caption (Gemini)”,
“type”: “main”,
“index”: 0
}
]
]
},
“(LLM Model for Prompts)”: {
“ai_languageModel”: [
[
{
“node”: “3b. Generate Image Prompt Options (Gemini)”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“(Parse Prompts JSON)”: {
“ai_outputParser”: [
[
{
“node”: “3b. Generate Image Prompt Options (Gemini)”,
“type”: “ai_outputParser”,
“index”: 0
}
]
]
},
“3c. Generate Post Caption (Gemini)”: {
“main”: [
[
{
“node”: “Generate an image”,
“type”: “main”,
“index”: 0
}
]
]
},
“(LLM Model for Caption)”: {
“ai_languageModel”: [
[
{
“node”: “3c. Generate Post Caption (Gemini)”,
“type”: “ai_languageModel”,
“index”: 0
}
]
]
},
“(Parse Caption JSON)”: {
“ai_outputParser”: [
[
{
“node”: “3c. Generate Post Caption (Gemini)”,
“type”: “ai_outputParser”,
“index”: 0
}
]
]
},
“5. Prepare Data for Instagram API”: {
“main”: [
[
{
“node”: “6a. Create Instagram Media Container”,
“type”: “main”,
“index”: 0
}
]
]
},
“6a. Create Instagram Media Container”: {
“main”: [
[
{
“node”: “6b. Wait for Container Processing”,
“type”: “main”,
“index”: 0
}
]
]
},
“6b. Wait for Container Processing”: {
“main”: [
[
{
“node”: “6c. Publish Post to Instagram”,
“type”: “main”,
“index”: 0
}
]
]
},
“6c. Publish Post to Instagram”: {
“main”: [
[
{
“node”: “7. Update Post Status in Sheet”,
“type”: “main”,
“index”: 0
}
]
]
},
“Generate an image”: {
“main”: [
[
{
“node”: “Edit Image”,
“type”: “main”,
“index”: 0
}
]
]
},
“Save Image to imgbb.com3”: {
“main”: [
[
{
“node”: “5. Prepare Data for Instagram API”,
“type”: “main”,
“index”: 0
}
]
]
},
“Edit Image”: {
“main”: [
[
{
“node”: “Save Image to imgbb.com3”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateId”: “3840”,
“templateCredsSetupCompleted”: true,
“instanceId”: “0a606510a39546350ca950cb0bd9bb108927f2ed4772cdeaafdc6da681a3e8e1”
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @haroon1427 welcome to the community.

What’s your question?

Instagram media container in Facebook Graph API node is showing an error when trying to run a POST request for media.

The image is stored in Imgbb site in jpeg format. The workflow worked for Facebook but not working for Instagram.

1 Like

Can you send a screenshot of the error?

@haroon1427 the URL you used is the reason for the error.

Re confirm the url is correct and let me know if that works.

@haroon1427

these are the image specifications you need to satisfy according to documentation linked in your the error

Format: JPEG
File size: 8 MB maximum.
Aspect ratio: Must be within a 4:5 to 1.91:1 range
Minimum width: 320 (will be scaled up to the minimum if necessary)
Maximum width: 1440 (will be scaled down to the maximum if necessary)
Height: Varies, depending on width and aspect ratio
Color Space: sRGB. Images using other color spaces will have their color spaces converted to sRGB.

This is the URL for the image :https://i.ibb.co/1B5V34v/data.jpg. It works.

@swoonunits The image could not be fetched from the url provided.

The image is jpeg format in 1024x1024 square. Should I change to 4:5 ratio for Instagram?

@haroon1427 Try using a different image URL to see if the issue is specific to this particular image or if it’s a more general problem.

Hi there, The url is correct? Because i try to click on it and i cant open it n i think tht could also cause the error youre having

It works for me. I was able to open the URL in both incognito and normal mode in browser. The issue is not seen for this particular URL. Its for all the images generated during the testing.

@haroon1427 might be something about your robots.txt not allowing the facebook crawler from this bug report

see this page on how to add the crawler to your robots.txt