N8N Tools - Instagram Enhanced icon

N8N Tools - Instagram Enhanced

Complete Instagram Graph API integration with media management, insights, stories, reels, shopping, and advanced features

Overview

The "Get Media" operation of the Instagram Enhanced node allows users to retrieve detailed information about a specific Instagram media item by its media ID. This is useful for scenarios where you want to fetch metadata such as captions, media type, URLs, timestamps, and engagement metrics for a particular post, photo, video, or carousel on Instagram.

Practical examples include:

  • Fetching details of a recently posted photo to display in a dashboard.
  • Retrieving media URLs and captions for content repurposing or analysis.
  • Getting engagement counts like likes and comments for performance tracking.

Properties

Name Meaning
Media ID The unique Instagram media ID identifying the specific media item to retrieve.
Fields The list of fields to retrieve for the media item. Options include:
- id
- caption
- media_type (e.g., IMAGE, VIDEO, CAROUSEL)
- media_url (direct URL to the media file)
- permalink (URL to the Instagram post)
- timestamp (date and time when the media was created)
- like_count (number of likes)
- comments_count (number of comments)
- video_title (title of the video if applicable)
- thumbnail_url (thumbnail image URL for videos or carousels)

Output

The output JSON contains the requested fields of the specified Instagram media item. The structure corresponds directly to the selected fields, for example:

{
  "id": "1234567890",
  "caption": "Enjoying the sunset! #nature",
  "media_type": "IMAGE",
  "media_url": "https://instagram.com/media/abc123.jpg",
  "permalink": "https://instagram.com/p/abc123/",
  "timestamp": "2024-06-01T12:34:56+0000",
  "like_count": 150,
  "comments_count": 10
}

If binary data were involved (not in this operation), it would typically represent media files like images or videos, but here only metadata is returned.

Dependencies

  • Requires an active subscription and valid API key for the external N8N Tools API service that validates usage.
  • Needs OAuth2 or API key credentials configured in n8n for Instagram Graph API access.
  • The node internally uses multiple helper classes to interact with Instagram's Graph API endpoints.

Troubleshooting

  • Invalid subscription or API key error: If the node throws an error about invalid subscription or API key, verify that your API key credential is correct and has an active subscription.
  • Media not found or invalid media ID: Ensure the provided Media ID exists and belongs to the authenticated Instagram account or accessible business account.
  • Permission errors: The Instagram token must have permissions to read media data; check that the OAuth2 scopes include media read access.
  • Field selection issues: Requesting unsupported fields may cause errors; use only the documented field options.

Links and References

Discussion