Post new Nuvemshop and Tiendanube products to Instagram, TikTok and Facebook automatically
A Nuvemshop or Tiendanube app's product/created webhook can post each new product to Instagram, TikTok and Facebook through easyCoexistence: n8n or a short script fetches the product, converts its main photo to JPEG for Instagram and sends text, photo and link to easyCoexistence's posts API, which publishes through each network's official API, now or later. Claude posts products on request with Nuvemshop's own connector.
How long Nuvemshop waits for a 2XX answer to a webhook before retrying, up to 16 attempts within 48 hours.
The fields a Nuvemshop product webhook carries, with a timestamp and no product details, so the product is read with GET /products/{id}.
The header holding each webhook's HMAC-SHA256 signature, keyed with the app's client secret, not the store's access token.
The format Nuvemshop may serve product images in after optimization, with no API option to turn the conversion off.
The address Nuvemshop's Help Center gives for adding its own MCP connector to Claude as a custom connector.
The largest image a TikTok photo post takes, or 1920 × 1080, as JPG or WebP of up to 20 MB.
How does a new Nuvemshop product become a post?
Through an app, a webhook and one call per account. Nuvemshop's webhooks belong to an app, so create one with the read_products scope, install it in your store and register a webhook for product/created that points at your n8n workflow or server. The notice holds the store ID, the event and the product's ID, with no product details, so the workflow reads the product with GET /products/{id}, checks that it is visible and has a photo, and sends one request per account to easyCoexistence's posts API: a photo post for Instagram and TikTok, a link post for Facebook. easyCoexistence publishes each one through the network's official API, at once or at the publish_at you set.
How do you set up the Nuvemshop app and its webhook?
Once, from the Partners Portal and a terminal. Register as a Nuvemshop or Tiendanube partner, create an app under Apps with read_products, which also covers product images and variants, and install it in your store. The authorization code sent to your redirect URL lasts 5 minutes and is exchanged at https://www.tiendanube.com/apps/authorize/token for an access token and a user_id, the store's ID; the token does not expire until you get a new one for that app and store or the app is uninstalled. Then register the webhook with POST /webhooks. Each request carries Authorization: Bearer with the token and a User-Agent naming your app and a contact, or Nuvemshop answers 400.
curl -X POST "https://api.nuvemshop.com.br/2025-03/<STORE_ID>/webhooks" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "User-Agent: Product posts (you@example.com)" \
-H "Content-Type: application/json" \
-d '{ "event": "product/created", "url": "https://n8n.example.com/webhook/nuvemshop-products" }'What does the n8n workflow do with each product?
Answer, verify, read, convert and post. A Webhook node with Raw Body on and Respond set to Immediately answers inside Nuvemshop's 3 seconds. An Extract From File node turns the body into text, a Crypto node computes its Hmac with SHA256 and HEX, keyed with the app's client secret, and an If node lets the run continue only when the result equals the x-linkedstore-hmac-sha256 header.
An HTTP Request node then reads GET /products/{{ $json.id }} with the store's token. An If node continues when visibility is visible and images is not empty, and a Remove Duplicates node set to Remove Items Processed in Previous Executions drops a product already posted, since Nuvemshop can send the same notice twice. For Instagram, an HTTP Request node downloads the main image as a file, an Edit Image node resizes it with jpeg as its Format, and an HTTP Request node sends it as an n8n Binary File to POST /api/v1/media, which returns a media_id. One HTTP Request per account then calls POST /api/v1/channels/<account_id>/posts.
How does a script post products without n8n?
With a small web endpoint. The Python below checks the signature against the raw body with the app's client secret, answers 200 at once and does the rest in the background: it reads the product, skips one that is not visible or has no photo, and converts the main photo with Pillow to a JPEG of at most 1080 pixels a side, which both Instagram and TikTok accept. It uploads that file to POST /media, posts it to Instagram and TikTok, and makes a link post on Facebook. Each call carries an Idempotency-Key made from the product and the account, which easyCoexistence honors, and a set of posted IDs keeps a repeated notice from posting twice.
import hashlib, hmac, io, os, threading
import requests
from flask import Flask, request
from PIL import Image
NS = f"https://api.nuvemshop.com.br/2025-03/{os.environ['NS_STORE_ID']}"
NS_HEADERS = {"Authorization": f"Bearer {os.environ['NS_ACCESS_TOKEN']}",
"User-Agent": "Product posts (you@example.com)"}
EC = "https://easycoexistence.com/api/v1"
EC_AUTH = {"Authorization": f"Bearer {os.environ['EC_API_KEY']}"} # ec_live_...
IG, TT, FB = os.environ["IG_ACCOUNT"], os.environ["TT_ACCOUNT"], os.environ["FB_ACCOUNT"]
LANG = os.environ.get("STORE_LANG", "pt")
posted, lock = set(), threading.Lock() # a database in production
app = Flask(__name__)
@app.post("/nuvemshop/products")
def product_event():
body = request.get_data() # the raw body, before any parsing
sig = hmac.new(os.environ["NS_CLIENT_SECRET"].encode(), body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig, request.headers.get("x-linkedstore-hmac-sha256", "")):
return "", 401
threading.Thread(target=post_product, args=(request.get_json()["id"],)).start()
return "", 200 # inside Nuvemshop's 3 seconds
def jpeg_media_id(src):
img = Image.open(io.BytesIO(requests.get(src, timeout=30).content)).convert("RGB")
img.thumbnail((1080, 1080))
out = io.BytesIO()
img.save(out, "JPEG", quality=90)
r = requests.post(f"{EC}/media", data=out.getvalue(), timeout=60,
headers={**EC_AUTH, "Content-Type": "image/jpeg"})
r.raise_for_status()
return r.json()["media_id"]
def post_product(product_id):
p = requests.get(f"{NS}/products/{product_id}", headers=NS_HEADERS, timeout=30).json()
if p.get("visibility") != "visible" or not p.get("images"):
return
with lock:
if product_id in posted:
return
posted.add(product_id)
name, url = p["name"].get(LANG, ""), p["canonical_url"]
main = min(p["images"], key=lambda i: i["position"])["src"]
media = [{"media_id": jpeg_media_id(main), "type": "image"}]
for account, post in [
(IG, {"text": f"New in the shop: {name}. {url}", "media": media}),
(TT, {"text": f"New in the shop: {name}", "title": name[:90], "media": media}),
(FB, {"text": f"New in the shop: {name}", "link": {"url": url}}),
]:
requests.post(f"{EC}/channels/{account}/posts", json=post, timeout=60,
headers={**EC_AUTH, "Idempotency-Key": f"nuvemshop-{product_id}-{account}"})How do Claude and ChatGPT post products on request?
With Nuvemshop's own connector beside easyCoexistence's. Nuvemshop's Help Center describes an AI connector built on MCP that works with Claude, with ChatGPT through its connectors and with editors such as Cursor; in Claude it is added as a custom connector at https://admin-mcp.nuvemshop.com.br, and its read tools look up products, orders and customers. Ask, for example: "Post our five newest products to TikTok from tomorrow at 10am São Paulo time, one an hour, with a caption for each." The assistant reads the products, writes the captions and schedules each post with scheduled_at. It acts when asked and does not watch the store between chats, so products added overnight go out through the webhook.
What does each network accept in a product post?
Each network's rules, with easyCoexistence's own checks on top, apply when the post is sent or scheduled, so a product that cannot go out is refused straight away:
- Instagram: JPEG images only, so convert a WebP or PNG product photo first; several photos make a carousel. A post has no link field, so the product's address goes in the caption as text.
- TikTok: photo posts of 1 to 35 JPG or WebP images, each up to 1080 × 1920 or 1920 × 1080 pixels and 20 MB, a 90-character title, and 15 photo posts per account a day.
- Facebook: a link post to the product's
canonical_url, with the preview Facebook builds from the page's Open Graph tags, or one photo with the address in the text. - Media through easyCoexistence: an HTTPS link or a
media_idfrom POST /media, with images up to 30 MB, copied when a post is scheduled. - Captions: Nuvemshop's name and description are objects keyed by language, such as pt or es, and the description is HTML, so pick one language and strip the tags.
How to set it up
- Connect the store's accountsIn the easyCoexistence dashboard, connect the Instagram account, TikTok account and Facebook Page, note each account_id, and create a Partner API key under Profile, Developers.
- Create the Nuvemshop appIn the Partners Portal, create an app with read_products, install it in the store, and keep its access token, client secret and the store ID.
- Register the webhookCall POST /webhooks with product/created and your n8n Production URL or server address, then add a test product and check the posts.
Common mistakes
- Answering Nuvemshop after the posts go out. It waits 3 seconds for a 2XX and then retries, up to 16 times in 48 hours, so respond first and post afterwards.
- Sending Instagram the product photo as Nuvemshop serves it. Nuvemshop may deliver WebP whatever the address ends in, and Instagram publishes JPEG only, so check the file's Content-Type and convert it.
- Verifying the signature with the store's access token. Nuvemshop signs with the app's client secret, over the raw body, so compute the HMAC before the body is parsed.
- Posting a product the moment it is created. It can start hidden or without photos, so check visibility and images, listen to product/updated too, and post each product once.
easyCoexistence gives your store, and the AI agents that run it, reach to customers on Instagram, TikTok, Facebook and more channels, each through its official API: a posts API and media upload for n8n and your scripts, one MCP connector for Claude and ChatGPT beside Nuvemshop's own, and a queue that publishes up to 90 days ahead, with every connection monitored 24/7. US$ 9 to US$ 0.75 per connection per month, falling as you add connections, with the first 3 days free.
easyCoexistence is a multichannel API and MCP server that connects AI agents such as Claude and ChatGPT to WhatsApp, Instagram, TikTok, Facebook and more. On WhatsApp it uses Coexistence: the business keeps using its number in the WhatsApp Business app while the AI works through Meta's official API.
Frequently asked questions
Does it work with Tiendanube stores?
Yes. Nuvemshop and Tiendanube share one API: each tiendanube.com address in the docs has an identical one on nuvemshop.com.br, and the API answers on both api.tiendanube.com and api.nuvemshop.com.br.
Can it post a product again when it goes on sale?
Yes. Listen to product/updated as well and compare the variants' promotional_price with the one you last posted; the notice carries the product's ID, not its details, so read the product each time.
What does Nuvemshop's own Instagram and Facebook channel do?
It connects the store's catalog, Pixel and shop to Meta for selling on Instagram and Facebook, as Nuvemshop's Help Center describes, from Canais de venda in the admin. This flow publishes a feed post for each new product.
How much does easyCoexistence cost for posting Nuvemshop products?
US$ 9 to US$ 0.75 per connection per month, falling as you add connections, the same on each network. The posts API, media upload and the MCP connector are included, with the first 3 days free.
Keep reading
Connect your first channel in two minutes.
No platform reviews to wait for. Connect WhatsApp, Instagram, TikTok or another channel, then ask your AI to post, reply or report, and watch it work.
- 3 days free
- Cancel any time
- Official APIs only
- Monitored 24/7
Verified on