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 User Media" operation of the Instagram Enhanced node retrieves media items from a specified Instagram user's account. This includes posts such as photos, videos, and carousels. It allows users to specify which fields of each media item to retrieve and limit the number of items returned.

This operation is beneficial for social media managers, marketers, or developers who want to programmatically access and analyze a user's Instagram content. For example, it can be used to fetch recent posts for displaying on a website, aggregating content for analytics, or backing up media data.

Properties

Name Meaning
User ID Instagram user ID to fetch media from. Use "me" to refer to the current authenticated user.
Fields The specific fields of each media item to retrieve. Options include: id, caption, media_type, media_url, permalink, timestamp, like_count, comments_count, video_title, thumbnail_url. Default fields are id, caption, media_type, media_url, permalink, and timestamp.
Limit Number of media items to retrieve. Defaults to 25.

Output

The output is an array of JSON objects, each representing a media item retrieved from the user's Instagram account. Each object contains the requested fields as specified in the "Fields" property. Typical fields include:

  • id: Unique identifier of the media.
  • caption: Text caption of the media.
  • media_type: Type of media (e.g., IMAGE, VIDEO, CAROUSEL_ALBUM).
  • media_url: URL to the media file.
  • permalink: Link to the media on Instagram.
  • timestamp: Date and time when the media was created.
  • like_count: Number of likes (if requested).
  • comments_count: Number of comments (if requested).
  • video_title: Title of the video (if applicable).
  • thumbnail_url: Thumbnail image URL (for videos or carousels).

No binary data is output by this operation; all data is provided as JSON.

Dependencies

  • Requires a valid API key credential for the external service called "N8N Tools API" to validate subscription and access rights.
  • Requires OAuth2 authentication credentials for Instagram Graph API access.
  • The node internally uses multiple helper classes to interact with Instagram's Graph API endpoints.
  • Network connectivity to Instagram's API and the N8N Tools API is necessary.

Troubleshooting

  • Invalid Subscription or API Key: If the node throws an error indicating invalid subscription or API key, verify that the API key credential is correctly configured and active.
  • Permission Errors: Instagram API permissions must allow reading user media. Ensure the connected Instagram account has granted the required scopes.
  • Rate Limits: Instagram enforces rate limits; excessive requests may result in temporary blocking.
  • Incorrect User ID: Using an incorrect or unauthorized user ID will cause errors or empty results. Use "me" for the authenticated user or ensure the user ID is accessible.
  • Field Selection Issues: Requesting unsupported fields may cause errors. Use only the documented field options.

Links and References

Discussion