logo_dark.png


<aside> Šī¸ Author: _yudax

Website: instapost

Contact Me: [email protected]

Contributors:

🚀 Getting Started

Introduction

This tool enables you to publish Instagram posts directly from Notion, with the scheduling posts feature that helps you to plan and publish posts automatically. All in one place!

<aside> ⚠ī¸ This project is currently beta and uses Instagram's private API to publish posts. Use it at your own risk.

</aside>

Features

Video Tutorial

https://youtu.be/7mKTh9ot1Nk

⚙ī¸ Setup & Deployment

You need to complete the steps below to use the tool.

<aside> 💡 Each Step has â–ļī¸ See How? toggle that contains a GIF that shows how to complete the step.

</aside>

1. Duplicate this Notion Template

👇 Open the link below and click the Duplicate button on the top right. this creates a new page in your workspace where you can manage Instagram posts.

Notion-Instagram

2. Share the Notion page (that you just duplicated) to the web

  1. Click on the Share button on the top right
  2. Enable the Share to the web option.
  3. Copy the page link (you will need it in step 4.1.1)

3. Create a Notion Integration

  1. Go https://www.notion.so/my-integrations
  2. Click Create a new integration
  3. Give a name to your integration and click submit
  4. Please copy the Internal integration Token (you will need it in step 4.1.1)

<aside> ⚠ī¸ Don't forget to Invite the integration to the Notion page

  1. Click share
  2. Click add people, groups, or integration input
  3. Select your integration and click invite

https://s3-us-west-2.amazonaws.com/secure.notion-static.com/a7e5620a-fccc-4c6b-9d46-bf76e63d6465/K5YI5qkJ6P.gif

</aside>

4. Deployment

4.1 - ⚡ Once-click setup (Recommended)

4.1.1 - 👇 Use one of the One-click setup links Below to deploy to your favorite hosting provider.

For every provider, you will be asked to enter these properties.

**IG_USERNAME** is your Instagram account username.
****IG_PASSWORD** **is **your **Instagram account password.
****PAGE_LINK**  **is the link of the Notion page that you just duplicated in step 2
****NT_SECRET** ** is the Notion internal integration secret that you created in step 3.

4.2 Manual setup

You Must have Nodejs and Npm installed in your machine.

  1. Clone the tool repository
git clone [email protected]:notionblog/notion-instagram.git
  1. Install Dependencies
cd notion-intagram
npm install
  1. Create .env File (copy from .env.template)
cp .env.template .env
  1. Fill the environment variables values
**IG_USERNAME=** #is your Instagram account username. (*Required)
****IG_PASSWORD=** *#*is **your **Instagram account password. (*Required)
****PAGE_LINK=**  *#*is the link of the Notion page that you just duplicated in step 2 (*Required)
****NT_SECRET=** ** #is the Notion internal integration secret that you created in step 3. (*Required)
  1. Start the script
npm start

đŸĨŗ if You Completed these steps you can head over to your Notion page and test the Tool, Enjoy!

📚 Guides

How to fix duplicated posting issue

By increasing INTERVAL in ms (milliseconds) in environment variables solve the problem of duplicated posting.

INTERVAL=10000

How to create multiple instances to publish to multiple accounts

You Must have Nodejs and Npm installed in your machine.

  1. Clone the tool repository
git clone [email protected]:notionblog/notion-instagram.git
  1. Install Dependencies
cd notion-intagram
npm install
  1. Install PM2 (a process manager)
npm install pm2 -g
  1. Create a file and name it ecosystem.config.js in the root directory of the project

    For each account, you need to add an object inside the apps array You need to change name , PORT and Instagram credentials for each instance

module.exports = {
  apps: [
	  {
      name: "ACCOUNT1",
			script: './index.js',
      env: {
				**PAGE_LINK**: "**PAGE LINK**",**
				**NT_SECRET**: "**YOUR NOTION SECRET**",**
        PORT: 3000, 
        IG_USERNAME**: "**account1username**" ,**
				**IG_PASSWORD**: "**account1password**",** 
      },
    },
	  {
      name: "ACCOUNT2",
			script: './index.js',
      env: {
				**PAGE_LINK**: "**PAGE LINK**",**
				**NT_SECRET**: "**YOUR NOTION SECRET**",**
        PORT: 3001,
        IG_USERNAME**: "**account2username**" ,**
				**IG_PASSWORD**: "**account2password**",** 
      },
    },
  ],
};
  1. launch the instances
pm2 start ecosystem.config.js