Forget about spending time to manage your IG account (or Facebook page, Linkedin, ...): an AI based workflow will do it for you! This workflow takes the images you’ve edited and prepared for posting on Instagram, analyzes them, suggests the most suitable description and hashtags based on the content of each photo, and posts them on your behalf.
You have just to review the description and define the day you want to have each one published.
It uses n8n, Open AI, Facebook REST API, Instagram, Facebook App, Google Drive and just a very little javascript programming.
Okay, this isn't exactly a topic related to home automation or home management... but it uses some of the technologies and products we've already seen for a different purpose and that's still related to how technology can simplify our daily lives and save us precious time. So, if you also have this need, here's an idea to save a good chunk of time that you can reinvest in other activities while simultaneously maintaining your presence on social media.
Personally, I have no interest or aspiration to create viral content or to climb the ranks of Facebook, Instagram, TikTok, or other algorithmic platforms through constant posting. However, I do enjoy sharing my photos with friends and those who appreciate my way of seeing the world through the lens of a camera. The problem is: I have very little time to do it... and definitely not the consistency to post daily or at regular intervals.
With this trick, you can prepare more than 30 days' worth of content - or even more - in just a couple of minutes, and let this automation handle the rest for you. In this example, I’ll use Instagram, but the same approach works for Facebook, LinkedIn, Slack, and many other social media or sharing tools, making the process easily adaptable to other use cases.
Let’s see how!

For this process, again, I used n8n: n8n is an open-source workflow automation tool that allows you to connect various applications and services to automate repetitive tasks without manual intervention. It provides a visual interface where you can design workflows by linking different nodes that represent actions, triggers, or data processing steps.
I installed it in a Proxmox LXC by using the helper script provided by Community-Scripts: this is a very useful Community with many script that will help you many times: if you like them, consider donating to support Angie, tteckster's wife - the founder and best supporter of the community - too early passed away.
The installation and configuration are very simple; once completed, I mounted a network share from the NAS on the local path /nas/Instagram, which I will use as an exchange directory.
I used a Google Sheets file to support the process. This allows me to easily access the content for review before it gets published.
The file, which I named Instagram posts, has the following structure:

DateTime, format: dd/MM/yyyy. You can set the format you prefer but you have to check the following part accordingly.Today column based on changes to the Date column:function onEdit(e) {
var range = e.range;
var sheet = range.getSheet();
var row = range.getRow();
if (range.getColumn() === 1) {
//Today
var formula = `=A${row} = TODAY()`;
sheet.getRange(row, 5).setFormula(formula);
}
else if (range.getColumn() === 4) {
//Hashtag count
var formula = `=LEN(D${row})-LEN(SUBSTITUTE(D${row};"#";""))`;
sheet.getRange(row, 7).setFormula(formula);
}
}
Done along with the date and time of publication.To automatically post on Instagram, it is necessary to use the Facebook Graph API, which must be configured by defining an Application and setting up its behavior and permissions. This step is specific to Instagram (and Facebook with slight modifications), but it is likely that similar steps will be required for other social platforms. Check the developer guides for specific social networks to learn how to configure the APIs for integrating custom apps.
Make sure you have a business account for Instagram; otherwise, log in to Instagram and select Switch to a Business Account.
[Instagram_Account_ID]: take note of it since you will need to configure the publishing workflow.pages_show_list, business_management, instagram_basic, instagram_content_publish, instagram_manage_comments, instagram_manage_insights (the last two shouldn't be necessary just for posting, but I got an error without them). You can add more permission If you plan to extend the functionalities of your app.[Access_Token] that you will use later to configure the publishing workflow. This n8n workflow automates the definition of the description and hashtags and prepare the posts. It uses AI to analyze the pictures in the shared folder to determine the best description and hashtag based on the defined prompt and populate the just defined spreadsheet.
Here's a step-by-step breakdown:
Trigger:
/nas/Instagram/ for changes (specifically, when files are added or deleted).Await Write Finish and Use Pollingadd or unlink (file addition or deletion) initiate the workflow.Debounce:
Extract Filename:
Determine Action:
add) or deleted (unlink).Load Image:
Analyze Image:
Here is the used prompt:
Analyze the image and select a quote, aphorism, poem excerpt,
or a statement by a famous person, in Italian or English,
that best represents it. Preferably, the quote should relate specifically
to the subject of the photo. Indicate the author and provide only the quote,
without explanation. Additionally, identify 15 to 30 hashtags
(preferably in English or Italian) for an Instagram post.
Image analysis is a rather resource-intensive activity in terms of tokens: processing a photo with the specified dimensions using this prompt and GPT-4O as the model costs approximately 1300-1500 tokens per call, which translates to about €0.01 per photo. To save costs, you can set detail = low to process a photo at just 512x512 pixels, though this comes with the risk of reduced detail and lower output quality.
Prepare Content:
Append to Google Sheet:
Date column is not set: since It's the trigger for the publishing flows, the image and content will not be published until you will review it and define a publishing date.Locate Row:
Check Completion:
Delete Row:
This n8n workflow automates the process of creating and publishing daily Instagram posts. It uses image analyzer to handle both portrait and landscape images without cropping and at the end it ensures unnecessary files are deleted from both the local disk cloud ones.
Here's a detailed breakdown:
Schedule Trigger:
Get Today Post (Google Sheets)
Today column = TRUE) from the previously defined Google sheet.Open Image from Disk
Get Image Info, Check if Portrait or Landscape
Add Border to Portrait Images
Upload Image to Google Drive, Create Image Link
Create Instagram Media Container (HTTP Request)
[Instagram_Account_ID] with the ID of your IG account you copied from Step 3.3[Access_Token] with the token generated at the Step 3.5 (Remember to keep the string Berarer before the token)Wait 30s
Publish Instagram Media (HTTP Request)
creation_id from the media container.Delete Image, Remove Image from Disk
Mark Row as Done (Google Sheets)
Status column with Done plus the timestamp of the operation for providing a complete information.Now let's try the entire process:
I usually edit photos in Lightroom, and the ones I want to publish are exported to the network share configured earlier and accessible by n8n. Following my usual workflow for Instagram, I export the photos in JPEG format, maximum quality, with a short side resolution of 1080px, 240 dpi, and sharpening set for screen.
This is handled "under the hood" by the first defined workflow and triggered by the export on the defined folder, so you actually don't need to do anything.
At the scheduled time of the set day, the second process will automatically publish the post on Instagram, remove the useless picture both from local drive and Google Drive, and update the spreadsheet.
Even if I'll try to keep all this pages updated, products change over time, technologies evolve... so some use cases may no longer be necessary, some syntax may change, some technologies or products may no longer be available. Remember to make a backup before modifying configuration files and consult the official documentation if any concept is unclear or unfamiliar.
Use this guide under your own responsibility.
This work and all the contents of this website are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License (CC BY-NC-SA 4.0).
You can distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only by giving credit to the creator. Modified or adapted material must be licensed under identical terms.
You can find the full license terms here