All guides
Automation14 min read

Guide · Integration guide

How to automate iBuat.Link with n8n (8 ready-made workflows)

Import a ready-made n8n workflow, connect it to iBuat.Link with a webhook or an API key, and let new chats, closings, reports, product links and broken pages take care of themselves.

Product walkthrough

Webhooks

Links, QR codes & Sales Router

CRM lead sync

https://crm.example.com/hooks/ibuat

Enabled
sales_assignment.createdsales_closing.recordedAll Sales Teams

Delivery log

CRM lead syncSUCCEEDED
CRM lead syncRETRYING

Delivery runs separately from link redirects.

Think of n8n as a robot assistant that follows rules: when something happens, then do this. iBuat.Link gives the robot two things. Webhooks are the bell: iBuat.Link rings it when a chat goes to an agent, a sale is recorded, a link passes a click milestone, a page stops working or your plan is nearly full. The API is the office where the robot gets work done: creating links and QR codes, setting an agent to Away, reading reports and recording closings. This guide sets up the 8 ready-made templates, using Bu Sari’s hijab shop and her CS admins Rina, Dewi and Ayu as the example. You need iBuat.Link Pro or higher and n8n, either n8n Cloud or n8n on your own server. iBuat.Link never reads or sends WhatsApp messages, so every alert and reminder goes to you or your team on Telegram or by email.

  1. 1

    Step 1

    Create an API key in Developer (if the template needs one)

    Four templates call the iBuat.Link API: Agent day off → Away, Monday report by email, New products → links + QR and Dead page → backup link. The other four only listen to webhooks and need no key. In the dashboard sidebar, open Developer and create a key. Choose Read only for the Monday report, which only reads numbers. Choose Read & write for the other three, because they change an agent’s status, create links or point a link somewhere else. iBuat.Link asks for your account password before it makes the key. Copy the key and keep it somewhere safe.

  2. 2

    Step 2

    Add the key to n8n as a Header Auth credential

    In n8n, create a new credential of the type Header Auth and name it iBuat.Link API key, the name the templates look for. Set Name to Authorization and Value to the word Bearer, a space, and your key: Bearer YOUR_API_KEY. Every HTTP Request node in the templates uses this credential, so you set it up once.

  3. 3

    Step 3

    Download a template and import it into n8n

    In iBuat.Link, open Integrations. On the Automate with n8n card, click Show all 8 templates, then Download template on the one you want. You get a .json file such as 01-new-lead-alert.json. In n8n, open a new workflow, click the … menu and choose Import from File. The workflow appears with a yellow Setup (read me) note that lists what to fill in, in English and Indonesian.

    See what each automation does for a shop
  4. 4

    Step 4

    Connect your other accounts and fill in the blanks

    Most templates also use a tool you already have: Telegram, Google Sheets, Gmail or Google Calendar. Connect those accounts in n8n with their own credentials, then replace the placeholders in the nodes: YOUR_TELEGRAM_CHAT_ID in the Telegram nodes, REPLACE_WITH_YOUR_SHEET_ID in the Google Sheets nodes (paste your sheet’s address), YOUR_TEAM_ID and YOUR_TEAM_CALENDAR_ID in the day-off template, and your email address in the Gmail node. In nodes that call iBuat.Link, pick the iBuat.Link API key credential if n8n hasn’t selected it for you.

  5. 5

    Step 5

    Point an iBuat.Link webhook at the workflow

    Templates that react to events start with a Webhook node. Open it and copy its Production URL, not the Test URL. In iBuat.Link, open Integrations and click Add webhook, or click + Webhook on the template’s card, which fills in the name and ticks the right events for you. Paste the address into HTTPS URL, check the boxes under Events to send, and click Save webhook. iBuat.Link then shows the signing secret once. Copy it, go back to n8n, open the “Sign the request” node right after the webhook and paste the secret into Secret, in place of PASTE_YOUR_SIGNING_SECRET. The next node, “Check the signature”, stops every request that wasn’t signed with that secret, so the workflow only runs for real iBuat.Link events.

    How webhook signatures and retries work
  6. 6

    Step 6

    Activate the workflow and send a test

    Activate (publish) the workflow in n8n. Its Production URL only listens while the workflow is active. Back in iBuat.Link, click Send test on the webhook’s row. Every template that starts from a webhook answers a test with a “✅ iBuat.Link test received” message in Telegram, and the chat and closing templates also add a TEST row to the sheet, which you can delete. A test never changes your links. Send test is signed too, so it only gets through once the secret is in “Sign the request”. In iBuat.Link, Logs shows SUCCEEDED once n8n received it. No ✅ message? Open Executions in n8n. A run that stopped at “Check the signature” with “Not a valid iBuat.Link request” means the Secret is missing or wrong, and nothing else ran. Scheduled templates have no webhook: run them once by hand from the n8n editor to check the result, then leave them active.

1. New chat → alert + sheet

Every chat Sales Router sends to an agent becomes a row in your sheet and a Telegram message, so Bu Sari sees at a glance who got which chat and from which campaign. The message reads like this: New chat for CS Jakarta: Rina (campaign Promo Ramadan, link /promo-ramadan, Ref IB-7F3A09C2D1). When no agent was available, it names the fallback number instead.

  • File: 01-new-lead-alert.json. Event: Chat sent to an agent.
  • You need: the webhook, Google Sheets and a Telegram bot.
  • API key: none.
  • Edit: the signing secret in “Sign the request”, the sheet address in “Add a row to the sheet” (a Leads tab with the columns Time, Team, Agent, Campaign, Link, Ref) and your chat id in “Tell me on Telegram”.

2. Agent day off → Away

Every day at 06:00 the workflow reads today’s events in a Google Calendar. An event titled Off: Dewi, Libur: Dewi or Cuti: Dewi sets Dewi to Away, so no chat waits for someone who isn’t working, and every other active agent is set to Available. The name after the colon must match the agent’s name in iBuat.Link; upper or lower case doesn’t matter.

  • File: 02-agent-shift-from-calendar.json. Trigger: a schedule, every morning at 06:00 in the time zone set in n8n.
  • You need: Google Calendar and the API. No webhook.
  • API key: Read & write.
  • Edit: YOUR_TEAM_ID in “Get the team’s agents” (open the team under Sales Teams; the id is in the address bar) and YOUR_TEAM_CALENDAR_ID in “Today’s calendar events”.
  • Good to know: it resets everyone else to Available every morning, including an agent you set to Away or Off shift by hand the day before.

3. Monday report by email

Every Monday at 07:00 you get an email with your 5 links with the most clicks, each with its clicks from the last 7 days, plus the closings of the last 7 days: how many, and their value per currency.

  • File: 03-weekly-report.json. Trigger: a schedule, Mondays at 07:00.
  • You need: Gmail and the API. No webhook.
  • API key: Read only is enough.
  • Edit: your address in “Email me the report”. Want a friendlier summary? Put an OpenAI or Gemini node between “Write the report” and the email.

4. New products → links + QR

Every 15 minutes the workflow reads the Products tab of a Google Sheet. Each row with a Product URL but no Short link gets a short link and a QR code, made with the bulk API (one request for the links and one for the QR codes, up to 100 rows per run), and both are written back next to the product.

  • File: 04-products-to-links.json. Trigger: a schedule, every 15 minutes.
  • You need: Google Sheets and the API. No webhook.
  • API key: Read & write.
  • Edit: the sheet address in “Read the product sheet” and “Write links back”. The tab needs the columns Product, Product URL, Short link, QR image.
  • Good to know: every link and QR code it creates counts toward your plan, the same as one you make by hand.

5. Closing → thank-you + review

When a sale is recorded, the workflow adds it to the Sales tab of your sheet and sends a Telegram message such as “🎉 Rina closed 250,000 IDR (Promo Ramadan, Ref IB-7F3A09C2D1)”. Three days later a second message reminds you or the team to ask the buyer how it went and for a review. The workflow doesn’t message the buyer, because iBuat.Link can’t send WhatsApp messages; the agent does that from their own WhatsApp.

  • File: 05-closing-follow-up.json. Event: Closing recorded.
  • You need: the webhook, Google Sheets and a Telegram bot.
  • API key: none.
  • Edit: the signing secret in “Sign the request”, the sheet address in “Log the sale” (a Sales tab with the columns Time, Team, Agent, Value, Currency, Campaign, Ref) and the chat id in both Telegram nodes. Use your team’s group if the agents should see it.
  • Good to know: the event fires again when a closing’s value changes, so a corrected sale shows up as a second row with the new value.

6. Click milestone → team chat

When a link or QR code passes 100, 1,000, 10,000, 100,000 or 1,000,000 clicks, your team’s Telegram group gets a message such as “🎉 Link “Promo Ramadan” just passed 1,000 clicks!”. Each milestone fires once per link or QR code, and bot clicks don’t count.

  • File: 06-click-milestone-cheer.json. Event: Click milestone reached.
  • You need: the webhook and a Telegram bot added to your team’s group.
  • API key: none.
  • Edit: the signing secret in “Sign the request” and the group’s chat id in “Post in the team chat”.

7. Dead page → backup link

When a link’s page stops working, for example a Shopee listing that now answers “not found”, the workflow points the link (or QR code) to a backup page through the API and tells you on Telegram what broke. The backup can be a different page per link slug, or one default for everything else, such as your shop’s WhatsApp.

  • File: 07-dead-destination-backup.json. Event: Destination stopped working.
  • You need: the webhook, the API and a Telegram bot.
  • API key: Read & write.
  • Edit: the signing secret in “Sign the request”, BACKUPS (a backup address per link slug) and DEFAULT_BACKUP in the “Pick the backup page” node, and your chat id in both Telegram nodes.
  • Only want a message? Change SWITCH_LINKS = true to false at the top of “Pick the backup page”. Then nothing is switched, and you can also tick Destination working again to hear when the page is back.
  • Good to know: after the switch, iBuat.Link watches the backup page. Fix the original page, then set the link back by hand.

8. Plan limit near → heads-up

When your short links, QR codes, Bio Pages, campaigns, Sales Teams or tracked clicks this month reach 80% of your plan, and again at 100%, you get a Telegram message before a launch gets stuck. Only the things your plan actually limits can fire. On Pro that means 1,000 short links, 500 QR codes, 25 Bio Pages, 50 campaigns and 10 Sales Teams; tracked clicks are unlimited on Pro and up, so they never fire there.

  • File: 08-quota-warning.json. Events: Plan limit almost reached and Plan limit reached.
  • You need: the webhook and a Telegram bot, or swap the Telegram node for email.
  • API key: none.
  • Edit: the signing secret in “Sign the request” and your chat id in “Tell me”.
  • Good to know: each event fires once as usage climbs, and again only after usage went back down first, for example after you delete links, a new month starts for tracked clicks, or you upgrade.

Events and what they send

Each webhook gets only the events you tick under Events to send, and you can change them later with Edit events. Every delivery is an HTTPS POST with a JSON body whose event field names the event, plus the headers x-ibuat-event, x-ibuat-event-id (use it to skip duplicates), x-ibuat-timestamp and x-ibuat-signature. In n8n, the Webhook node puts the JSON under body, which is why the templates read $json.body, after “Check the signature” has checked x-ibuat-signature. If you pick a Sales Team on the webhook, that filter applies to Sales Router events only; link and account events always come through. The API reference has an example for every event.

  • Sales Router · Chat sent to an agent (sales_assignment.created): a visitor was routed to an agent or the fallback number, with the team, agent, link, campaign and Ref.
  • Sales Router · Closing recorded (sales_closing.recorded): a chat was marked as a sale by you, the agent or the API, or its value changed. Saving the same value again doesn’t send it twice.
  • Links & QR codes · Click milestone reached (click_milestone.reached): 100, 1,000, 10,000, 100,000 or 1,000,000 human clicks, once per link or QR code per milestone.
  • Links & QR codes · Destination stopped working (link.destination_down): the page failed two checks in a row, by the rules further down.
  • Links & QR codes · Destination working again (link.destination_recovered): a page that was down answers normally again.
  • Account · Plan limit almost reached (usage.limit_approaching): 80% of a plan limit.
  • Account · Plan limit reached (usage.limit_reached): 100% of a plan limit.
  • Orders · Order created (order.created), Order status changed (order.status_changed) and Order payment changed (order.payment_changed): an order was added, moved, or its payment changed.

JSON body: sales_closing.recorded

{
  "event": "sales_closing.recorded",
  "occurredAt": "2026-10-12T05:40:00.000Z",
  "closing": {
    "value": 250000,
    "currency": "IDR",
    "closedAt": "2026-10-12T05:40:00.000Z",
    "closedBy": "agent"
  },
  "routedVisitId": "e1f2a3b4-c5d6-4e7f-8a9b-0c1d2e3f4a5b",
  "referenceToken": "IB-7F3A09C2D1",
  "team": {
    "id": "5e6f7a8b-9c0d-4e1f-8a2b-3c4d5e6f7a8b",
    "name": "CS Jakarta"
  },
  "agent": {
    "id": "a8b9c0d1-e2f3-4a5b-9c6d-7e8f9a0b1c2d",
    "name": "Rina"
  },
  "link": {
    "id": "3f6c2a1e-8b4d-4c7a-9e21-5d0f7b8a9c10",
    "slug": "promo-ramadan"
  },
  "campaign": {
    "id": "c2d4e6f8-1a3b-4c5d-9e7f-0a1b2c3d4e5f",
    "name": "Promo Ramadan"
  },
  "assignedAt": "2026-10-12T03:15:00.000Z"
}

Record closings automatically with the Ref code

iBuat.Link and n8n never read WhatsApp chats, so a closing gets recorded in one of two ways. The first is by hand: the agent or you click Mark sale and enter the Sale value, and the Closing recorded event lets n8n do the rest. The second works if you already send invoices or payment links from another system, such as Midtrans, Xendit, a QRIS invoice, a POS, a CRM or an order form. Every Sales Router chat starts with a line like Ref: IB-7F3A09C2D1, tied to the agent, link and campaign. The agent copies that Ref into the invoice or payment note. When the buyer pays, that system tells n8n, n8n sends the request below, and the sale is recorded for Rina and the Promo Ramadan campaign.

  • Use a Read & write key. currency is optional; if you send it, it must match the team’s closing currency.
  • A chat that already has a closing is refused unless you add "replace": true to change its value.
  • An unknown Ref returns 404, so make sure the whole code was copied.
  • A closing recorded this way also sends the Closing recorded event, with closedBy set to api.
  • This only works when your business has such a system and the Ref gets copied into it. Otherwise closings stay manual, with Mark sale.

Request

POST https://ibuat.link/api/v1/closings
Authorization: Bearer YOUR_API_KEY
Content-Type: application/json

{
  "referenceToken": "IB-7F3A09C2D1",
  "value": 250000
}

Plans and limits

Webhooks and the API come with Pro and higher plans. n8n is a separate tool: n8n Cloud is a paid service, and running n8n yourself is free but needs a server.

  • Webhook endpoints: 5 on Pro, 15 on Business and Agency.
  • API requests per hour: 600 on Pro, 2,000 on Business and Agency. Webhook deliveries don’t count toward this limit.
  • Bulk requests for links and QR codes take up to 100 items each.
  • Telegram, Google Sheets, Gmail and Google Calendar run on your own accounts, connected in n8n.
  • Failed deliveries are retried for about 3 hours, then the workspace owner gets an email. Webhooks are sent in the background, so your short links keep redirecting even when n8n is down.
  • Webhook URLs must be public HTTPS addresses. n8n’s Production URL works; localhost doesn’t.
  • Make and Zapier can use the same webhooks and API, but the ready-made templates are for n8n.

How the destination check decides a page is down

iBuat.Link checks destinations about every 30 minutes, but only for workspaces with a webhook that has a destination event ticked, and only for links and QR codes whose destination is a web page (the Website or Marketplace destination types). It is careful on purpose, so you aren’t bothered by false alarms. A site gets a few checks from your workspace at a time, so if many of your links point to the same marketplace, they are checked in turns and each one less often.

  • A page counts as down only after two checks in a row find “not found” (HTTP 404 or 410), a site that can’t be reached (the domain doesn’t exist or refuses the connection), or a broken HTTPS certificate.
  • Pages that block bots, ask for a login, are slow or time out, or answer with a server error (401, 403, 429 or 5xx) don’t count.
  • Each run checks at most 5 pages per website, so many links on the same marketplace are checked a few at a time.
  • Destination working again fires when a page that was down answers normally again.
  • A page that shows “product not available” with a normal 200 answer looks fine to the checker, so it can’t catch that case.

Now try it yourself

Let the routine work run itself

Webhooks and the API come with Pro and higher plans. Pick a plan, import a template, and your first workflow can be running today.