Bot for Automatic Product Publishing from Website to Instagram

Our company is engaged in the development, support and maintenance of sites of any complexity. From simple one-page sites to large-scale cluster systems built on micro services. Experience of developers is confirmed by certificates from vendors.

Development and maintenance of all types of websites:

Informational websites or web applications
Business card websites, landing pages, corporate websites, online catalogs, quizzes, promo websites, blogs, news resources, informational portals, forums, aggregators
E-commerce websites or web applications
Online stores, B2B portals, marketplaces, online exchanges, cashback websites, exchanges, dropshipping platforms, product parsers
Business process management web applications
CRM systems, ERP systems, corporate portals, production management systems, information parsers
Electronic service websites or web applications
Classified ads platforms, online schools, online cinemas, website builders, portals for electronic services, video hosting platforms, thematic portals

These are just some of the technical types of websites we work with, and each of them can have its own specific features and functionality, as well as be customized to meet the specific needs and goals of the client.

Showing 1 of 1 servicesAll 2065 services
Bot for Automatic Product Publishing from Website to Instagram
Medium
~3-5 business days
FAQ

Our competencies:

Development stages

Latest works

  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1171
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1094
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    831
  • image_crm_chasseurs_493_0.webp
    CRM development for Chasseurs
    879
  • image_website-sbh_0.png
    Website development for SBH Partners
    999
  • image_website-_0.png
    Website development for Red Pear
    453

Developing a Bot for Automatic Product Publishing from Website to Instagram

Bot automatically takes products from website catalog and publishes them to Instagram — with photo, description, price, hashtags. Without manual content manager work, without data duplication, without delays.

How It Works Technically

Instagram doesn't provide direct public API for posting from personal account. Official way — Instagram Graph API through Meta Business Suite. It allows publishing photos, carousels, and Reels for business accounts and creator accounts.

Integration scheme:

  1. Website (CMS/store) → task queue (Redis + BullMQ or Laravel Queue)
  2. Worker gets task → prepares media and text
  3. Request to Graph API: upload image → create container → publish
POST https://graph.facebook.com/v19.0/{ig-user-id}/media
  ?image_url=https://cdn.example.com/products/123.jpg
  &caption=New%3A%20Sneakers%20Air%20Max%0A%0APrice%3A%201290%20rubles%0A%0A%23sneakers%20%23shoes
  &access_token={PAGE_ACCESS_TOKEN}

POST https://graph.facebook.com/v19.0/{ig-user-id}/media_publish
  ?creation_id={container-id}
  &access_token={PAGE_ACCESS_TOKEN}

For carousel publishing (multiple product photos) — child containers are created first for each image, then parent container of type CAROUSEL.

What's Needed from Client

  • Instagram Business or Creator account
  • Connected Facebook Page
  • Meta app with rights instagram_basic, instagram_content_publish, pages_read_engagement
  • Long-lived access token (valid 60 days, auto-refresh needed)

Token auto-refresh is implemented via scheduled job — 7 days before expiration token is exchanged for new one via /oauth/access_token?grant_type=fb_exchange_token.

Generating Post Caption

Caption template assembled from product fields:

def build_caption(product):
    lines = [
        f"✨ {product['name']}",
        "",
        product['short_description'][:200] if product['short_description'] else "",
        "",
        f"💰 Price: {product['price']} {product['currency']}",
    ]
    if product.get('sale_price'):
        lines.append(f"🔥 Sale Price: {product['sale_price']} {product['currency']}")
    lines += ["", " ".join(f"#{tag}" for tag in product['tags'][:10])]
    return "\n".join(line for line in lines if line is not None)

Caption length — up to 2200 characters, hashtags — up to 30. Exceeded limit handled by description truncation, not hashtags.

Publishing Triggers

Trigger Mechanism
New product in "published" status Webhook / Observer on Product model
Price change by X% price_changed_at field + cron comparison
Scheduled posting instagram_scheduled_at field in product
Manual run from admin Button → API endpoint → task in queue

Deduplication and Limits

Graph API allows up to 25 publications per day per account (carousel counts as 1). Bot maintains instagram_posts table with fields product_id, ig_media_id, published_at. Before posting checks:

  • wasn't product published in last N days
  • daily limit not exceeded
  • image available at URL (HEAD request with 5s timeout)

Implementation Timeline

Basic bot with single photo publishing — 5–7 business days. Carousel, caption templating, admin panel, API retry logic — additional 3–5 days.