Automate Instagram Stories Publishing from Google Sheets with Meta Graph API
Automated Instagram Stories from Google Sheets
π What it Does
This workflow automates posting Instagram Stories directly from a list of video URLs in a Google Sheet. Simply add a video link to the sheet, and this template will schedule and post it for you. It's designed to be a "set it and forget it" solution for your content strategy.
Key Features:
Fully Automated: Runs on a schedule to post new content without manual intervention. Simple Content Management: Manage your entire video queue from one Google Sheet. Smart & Safe: Automatically avoids posting duplicate content by tracking what has already been published. Randomized Posting: Shuffles the video list to ensure varied content is posted, not just the first one on the list.
π Pre-Setup Requirements
Before you start, you'll need a few things. This is the most important part of the setup!
Instagram Business Account: A personal account won't work. It must be a Business or Creator account. Facebook Page: Your Instagram Business Account must be connected to a Facebook Page. Meta Developer Account: This is required to create an "App" that gives n8n permission to post on your behalf. A Publicly Accessible Place to Host Videos: This is critical. The video URLs you use must be direct links to the video file. β Good Sources: Shopify file storage, Amazon S3, a WordPress site with a valid SSL certificate (https://...). β Unreliable Sources: Google Drive and Dropbox share links will not work because they are not direct links to the video file itself.
βοΈ Step-by-Step Setup Guide
Follow these three parts carefully. Once done, you won't have to touch the configuration again.
Part 1: Meta (Facebook/Instagram) Configuration
This section generates the keys and IDs you need to allow n8n to communicate with Instagram.
Create a Meta App:
Go to Meta for Developers and create a new app.
Detailed Guide: Meta's Official Guide to Creating an App
Configure App Permissions:
In your new app's dashboard, add the "Instagram Graph API" product.
Under "Permissions," you will need to grant instagram_basic, instagram_content_publish, pages_show_list, and pages_read_engagement.
Find Your Instagram Business Account ID:
You'll need this ID for the workflow.
3.1. Log in: to your Instagram account.
3.2. Click on your Profile: in the menu on the left.
3.3. Click: "Edit Profile" at the top.
3.4. Under the "Settings" heading, click "See more in Accounts Center".
3.5. Select: your intended Instagram profile.
3.6. In the URL, your Instagram Business Account ID will be displayed after /profiles in a numerical format.
Example:
https://accountscenter.instagram.com/profiles/[YOUR_ID]/?theme=dark
Generate a Long-Lived Access Token:
An access token is like a password for n8n to use. A standard one expires quickly, so you need a long-lived one.
Official Guide: Meta's Guide to Generating a Long-Lived Token
Part 2: Google Sheet Preparation
This is where you'll manage your video content.
Create a Google Sheet: You can make a new one or use our template to get started quickly. Download Template: Instagram Videos Template.xlsx Set Up Columns: Your sheet must have these two columns with these exact names: source_url: This is where you will paste the direct URL to your video file. posted_story: Leave this column empty. The workflow will automatically fill it with true after a video is successfully posted. Get the Sheet ID: In your Google Sheet URL, copy the long string of letters and numbers from the middle: https://docs.google.com/spreadsheets/d/[THIS_IS_THE_SHEET_ID]/edit
Part 3: n8n Workflow Configuration
Now, let's connect everything inside your n8n workflow.
Fill the βοΈ Configuration Hub Node:
IG\_BUSINESS\_ID: Paste the Instagram ID you found in Part 1.
SHEET\_DOC\_ID: Paste the Google Sheet ID you found in Part 2.
SHEET\_TAB\_NAME: Enter the exact name of the tab in your Google Sheet (e.g., "Instagram Videos").
Connect Your Credentials:
Google Sheets: In the π Fetch Videos from Sheet node, create a new credential and connect your Google Account.
Facebook Graph API: In the π€ Create Story Container node, create a new credential. Use the App ID, App Secret, and the Long-Lived Access Token you generated in Part 1. You will use this same credential for the other Facebook/Instagram nodes.
Activate the Workflow:
First, test it by clicking the "Execute Workflow" button on the π Manual Start node.
Once you confirm it works, activate the workflow using the toggle at the top of the screen. The β° Auto Schedule node is set to run daily by default, but you can change the time to whatever you like.
π€ Troubleshooting
Error: "(#10) This endpoint requires the 'instagram_content_publish' permission": Your Meta App is missing the correct permissions. Go back to the app settings in the Meta Developer dashboard and add it. Error: "Unsupported post request" or Video Processing Fails: This is almost always an issue with the video URL. Ensure it's a direct link and not from a service like Google Drive. Paste the URL into your browserβit should immediately start playing the video, not take you to a preview page. Error: "Sheet not found": Double-check that your SHEET_DOC_ID and SHEET_TAB_NAME in the Config node are perfectly correct (it's case-sensitive!). Workflow runs but doesn't post: Make sure you have rows in your Google Sheet where the posted_story column is empty. If all are marked true, it has nothing new to post.
@iMan https://imanetworks.ch/
Related Templates
Instagram Full Profile Scraper with Apify and Google Sheets
πΈ Instagram Full Profile Scraper with Apify and Google Sheets This n8n workflow automates the process of scraping ful...
Auto-classify Gmail emails with AI and apply labels for inbox organization
Who is this for? Professionals and individuals who receive high volumes of emails, those who want to automatically organ...
Technology News Workflow Explanation with Key Services
This workflow contains community nodes that are only compatible with the self-hosted version of n8n. Auto-Publish Techn...
π Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments