Adds an instagram-posts collection and a custom admin view that previews posts from a connected Instagram account. Editors pick posts to import, which can then be queried or referenced through relationship fields. The access token is stored in the database and refreshes automatically. Requires an Instagram Business or Creator account, a Meta Developer App and HTTPS for OAuth redirects.
Instagram plugin for Payload CMS
Installation
npm i payload-instagram-plugin27
Stars
3
Forks
3
Open Issues
9 months ago
Last Updated
40
Weekly Downloads
v0.2.2
npm Version
238.3 KB
Unpacked Size
0
Dependencies
27+4 since Sep 6
| Date | Stars |
|---|---|
| Dec 5, 2026 | 27 |
| Dec 4, 2026 | 27 |
| Dec 3, 2026 | 27 |
| Dec 2, 2026 | 27 |
| Dec 1, 2026 | 27 |
| Nov 30, 2026 | 27 |
| Nov 29, 2026 | 27 |
| Nov 28, 2026 | 27 |
| Nov 27, 2026 | 27 |
| Nov 26, 2026 | 27 |
| Nov 25, 2026 | 27 |
| Nov 24, 2026 | 27 |
| Nov 23, 2026 | 27 |
| Nov 22, 2026 | 27 |
| Nov 21, 2026 | 27 |
| Nov 20, 2026 | 27 |
| Nov 19, 2026 | 27 |
| Nov 18, 2026 | 27 |
| Nov 17, 2026 | 27 |
| Nov 16, 2026 | 27 |
| Nov 15, 2026 | 27 |
| Nov 14, 2026 | 27 |
| Nov 13, 2026 | 27 |
| Nov 12, 2026 | 27 |
| Nov 11, 2026 | 27 |
| Nov 10, 2026 | 27 |
| Nov 9, 2026 | 27 |
| Nov 8, 2026 | 27 |
| Nov 7, 2026 | 27 |
| Nov 6, 2026 | 27 |
| Nov 5, 2026 | 27 |
| Nov 4, 2026 | 26 |
| Nov 3, 2026 | 25 |
| Nov 2, 2026 | 25 |
| Nov 1, 2026 | 25 |
| Oct 31, 2026 | 25 |
| Oct 30, 2026 | 25 |
| Oct 29, 2026 | 25 |
| Oct 28, 2026 | 25 |
| Oct 27, 2026 | 25 |
| Oct 26, 2026 | 25 |
| Oct 25, 2026 | 25 |
| Oct 24, 2026 | 25 |
| Oct 23, 2026 | 25 |
| Oct 22, 2026 | 25 |
| Oct 21, 2026 | 25 |
| Oct 20, 2026 | 25 |
| Oct 19, 2026 | 25 |
| Oct 18, 2026 | 25 |
| Oct 17, 2026 | 25 |
| Oct 16, 2026 | 25 |
| Oct 15, 2026 | 25 |
| Oct 14, 2026 | 25 |
| Oct 13, 2026 | 25 |
| Oct 12, 2026 | 25 |
| Oct 11, 2026 | 25 |
| Oct 10, 2026 | 25 |
| Oct 9, 2026 | 25 |
| Oct 8, 2026 | 25 |
| Oct 7, 2026 | 25 |
| Oct 6, 2026 | 25 |
| Oct 5, 2026 | 25 |
| Oct 4, 2026 | 25 |
| Oct 3, 2026 | 25 |
| Oct 2, 2026 | 25 |
| Oct 1, 2026 | 25 |
| Sep 30, 2026 | 25 |
| Sep 29, 2026 | 25 |
| Sep 28, 2026 | 25 |
| Sep 27, 2026 | 25 |
| Sep 26, 2026 | 25 |
| Sep 25, 2026 | 25 |
| Sep 24, 2026 | 25 |
| Sep 23, 2026 | 25 |
| Sep 22, 2026 | 25 |
| Sep 21, 2026 | 25 |
| Sep 20, 2026 | 25 |
| Sep 19, 2026 | 25 |
| Sep 18, 2026 | 24 |
| Sep 17, 2026 | 24 |
| Sep 16, 2026 | 24 |
| Sep 15, 2026 | 24 |
| Sep 14, 2026 | 24 |
| Sep 13, 2026 | 23 |
| Sep 12, 2026 | 23 |
| Sep 11, 2026 | 23 |
| Sep 10, 2026 | 23 |
| Sep 9, 2026 | 23 |
| Sep 8, 2026 | 23 |
| Sep 7, 2026 | 23 |
| Sep 6, 2026 | 23 |
4−4 since Sep 6
| Date | Weekly downloads |
|---|---|
| Dec 5, 2026 | 4 |
| Dec 4, 2026 | 4 |
| Dec 3, 2026 | 3 |
| Dec 2, 2026 | 3 |
| Dec 1, 2026 | 21 |
| Nov 30, 2026 | 21 |
| Nov 29, 2026 | 20 |
| Nov 28, 2026 | 20 |
| Nov 27, 2026 | 20 |
| Nov 26, 2026 | 22 |
| Nov 25, 2026 | 22 |
| Nov 24, 2026 | 3 |
| Nov 23, 2026 | 3 |
| Nov 22, 2026 | 6 |
| Nov 21, 2026 | 6 |
| Nov 20, 2026 | 6 |
| Nov 19, 2026 | 5 |
| Nov 18, 2026 | 22 |
| Nov 17, 2026 | 23 |
| Nov 16, 2026 | 25 |
| Nov 15, 2026 | 25 |
| Nov 14, 2026 | 25 |
| Nov 13, 2026 | 27 |
| Nov 12, 2026 | 38 |
| Nov 11, 2026 | 21 |
| Nov 10, 2026 | 20 |
| Nov 9, 2026 | 19 |
| Nov 8, 2026 | 17 |
| Nov 7, 2026 | 18 |
| Nov 6, 2026 | 15 |
| Nov 5, 2026 | 3 |
| Nov 4, 2026 | 3 |
| Nov 3, 2026 | 4 |
| Nov 2, 2026 | 6 |
| Nov 1, 2026 | 5 |
| Oct 31, 2026 | 4 |
| Oct 30, 2026 | 4 |
| Oct 29, 2026 | 4 |
| Oct 28, 2026 | 4 |
| Oct 27, 2026 | 4 |
| Oct 26, 2026 | 1 |
| Oct 25, 2026 | 3 |
| Oct 24, 2026 | 4 |
| Oct 23, 2026 | 4 |
| Oct 22, 2026 | 7 |
| Oct 21, 2026 | 25 |
| Oct 20, 2026 | 24 |
| Oct 19, 2026 | 25 |
| Oct 18, 2026 | 23 |
| Oct 17, 2026 | 23 |
| Oct 16, 2026 | 23 |
| Oct 15, 2026 | 31 |
| Oct 14, 2026 | 39 |
| Oct 13, 2026 | 44 |
| Oct 12, 2026 | 47 |
| Oct 11, 2026 | 48 |
| Oct 10, 2026 | 47 |
| Oct 9, 2026 | 47 |
| Oct 8, 2026 | 36 |
| Oct 7, 2026 | 10 |
| Oct 6, 2026 | 5 |
| Oct 5, 2026 | 1 |
| Oct 4, 2026 | 0 |
| Oct 3, 2026 | 4 |
| Oct 2, 2026 | 5 |
| Oct 1, 2026 | 6 |
| Sep 30, 2026 | 6 |
| Sep 29, 2026 | 24 |
| Sep 28, 2026 | 24 |
| Sep 27, 2026 | 25 |
| Sep 26, 2026 | 24 |
| Sep 25, 2026 | 25 |
| Sep 24, 2026 | 24 |
| Sep 23, 2026 | 24 |
| Sep 22, 2026 | 24 |
| Sep 21, 2026 | 24 |
| Sep 20, 2026 | 24 |
| Sep 19, 2026 | 21 |
| Sep 18, 2026 | 21 |
| Sep 17, 2026 | 23 |
| Sep 16, 2026 | 25 |
| Sep 15, 2026 | 7 |
| Sep 14, 2026 | 9 |
| Sep 13, 2026 | 9 |
| Sep 12, 2026 | 9 |
| Sep 11, 2026 | 11 |
| Sep 10, 2026 | 9 |
| Sep 9, 2026 | 8 |
| Sep 8, 2026 | 8 |
| Sep 7, 2026 | 9 |
| Sep 6, 2026 | 8 |
Each point is npm's rolling 7-day download count.
Health Score
Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.
Badge for your README
[](https://payloaddirectory.dev/plugins/807004484-root)<a href="https://payloaddirectory.dev/plugins/807004484-root"><img src="https://payloaddirectory.dev/badge/807004484-root.svg" alt="Payload Directory"></a>README
This plugin allows you to use an Instagram connected feed as content to be shown inside a Payload CMS blog.
Important: Starting from 0.0.8, the access token is stored in the database and refreshes automatically. The token refreshes every 10 days and is valid for 60 days.
Follow the Setup Guide for detailed step-by-step instructions covering:
Quick summary:
Set your redirect URI in the Meta Developer App to:
https://yourBaseUrl/api/instagram/authorize
Replace yourBaseUrl with your app URL. If running locally, use --experimental-https to start your dev server with HTTPS.
Also set:
https://yourBaseUrl/api/instagram/unauthorizehttps://yourBaseUrl/api/instagram/deleteAdd the plugin to your payload.config.ts:
import { instagramPlugin } from 'instagram-payload-plugin'
export default buildConfig({
plugins: [
instagramPlugin({ enabled: true })
],
})
In the admin view, a new collection called instagram-posts is added. Do not add items to this collection manually!
A custom view called Instagram Posts is added to the left panel, allowing you to preview all connected Instagram posts. From here you can click on any post to add it to the collection.
The items in the collection have this structure:
type PostType = {
id: string
media_url: string
permalink: string
media_type: 'IMAGE' | 'VIDEO' | 'CAROUSEL_ALBUM'
caption: string
children?: {
id: string
media_url: string
permalink: string
media_type: string
}[]
}
Type CAROUSEL_ALBUM will have an additional array of children, each being the actual image of the carousel (i.e. more than one image in a post).
Method 1: instagram-posts is a regular Payload collection, so you can query it like any other:
import configPromise from '@payload-config'
import { getPayload } from 'payload'
const payload = await getPayload({ config: configPromise })
const { docs } = await payload.find({
collection: 'instagram-posts',
depth: 3,
})
Method 2: Create a relationship block:
const InstagramIntegration: Block = {
slug: 'InstagramIntegration',
interfaceName: 'InstagramIntegrationBlock',
fields: [
{
name: 'instagramSrc',
type: 'relationship',
required: true,
relationTo: 'instagram-posts',
},
],
}
Then use the component data:
const InstagramIntegration = ({ instagramSrc }: { instagramSrc: PostType }) => {
const { media_type, media_url, caption, children } = instagramSrc
return (
<section className="relative flex">
<Container>
{media_type === 'CAROUSEL_ALBUM' && (
<Carousel>
<CarouselContent>
{children?.map(({ media_url }) => (
<CarouselItem key={media_url}>
<div className="relative h-[400px] w-full">
<Image layout="fill" objectFit="contain" src={media_url || ''} alt="carousel image" />
</div>
</CarouselItem>
))}
</CarouselContent>
<CarouselPrevious />
<CarouselNext />
</Carousel>
)}
{caption && (
<div className="w-full p-6 dark:text-zinc-100">
<p>{caption}</p>
</div>
)}
</Container>
</section>
)
}
To delete an item, simply delete the entry from the collection view.
payload plugin socials
Compose, schedule and publish posts to Pinterest, Instagram, Facebook Pages and Google Business Profile from Payload
5996/wk3v3
payload dub
Create and manage Dub shortlinks, tags and analytics for published Payload documents
80746/wk4v4
payload plugin datacircle
Datacircle GTM API benchmark data as Payload endpoints, a selector field and a server-side client
77227/wk0v3
bitrix24
Send Payload form builder submissions to Bitrix24 CRM as leads or deals
76479/wk0v4
payload plugin deskcrew
Turn new documents in chosen collections into DeskCrew support tickets
696/wk0v2
payload plugin playlists
Curated YouTube creator lists with per-channel rules, review queues, quota caps and click-to-play embeds
671.8k/wk0v3