# Start an automation from a template

> Use one of BCL's 26 ready-made automation templates, or copy an automation between accounts with Export JSON and Import JSON.
>
> Source: https://docs.bcl.my/automation-templates/

You do not have to build an automation from a blank canvas. BCL has 26 ready-made templates, and you can copy any automation to another account as a JSON file.

## Use a template

The templates come with BCL and are the same in every account:

| Template | Trigger | What it does |
| --- | --- | --- |
| **Thank You Email on Payment** | Payment Successful | Emails the customer a thank-you with the order details. |
| **Thank-You Coupon** | Payment Successful | A week after a payment, emails the buyer a single-use code for their next order. See [Send each customer their own coupon](/automation-send-coupon/). |
| **Wabot Payment Notification** | Payment Successful | Sends the customer a WhatsApp through Wabot with the order number, amount and receipt link. |
| **WhatsApp Receipt via Wabot Pro** | Payment Successful | Sends an approved WhatsApp template from your official Wabot Pro number. See [Wabot Pro](/wabot-pro/). |
| **WhatsApp Receipt via Kapso** | Payment Successful | Saves each buyer who pays as a Kapso contact, then sends an approved WhatsApp template. See [Kapso](/kapso-whatsapp/). |
| **SMS Niaga Payment + Subscriber** | Payment Successful | Sends an SMS confirmation and adds the customer to an SMS Niaga group. |
| **VIP Customer Detection** | Payment Successful | Sends one email for payments over RM 500 and another for the rest. |
| **Drip Course Lessons** | Payment Successful | Gives the buyer access to a new lesson every few days after a payment, each with its access email. See [Unlock and revoke content](/automation-unlock-content/). |
| **Bonus Content for Big Orders** | Payment Successful | Orders of RM200 or more get a bonus. Smaller orders get a coupon for their next order. |
| **Google Sheets Transaction Log** | Payment Successful | Adds each successful payment as a row in Google Sheets. |
| **Record Sales in Bukku** | Payment Successful | Records each paid order as a sale in Bukku. See [Record your sales in Bukku](/bukku/). |
| **Email the Bukku Invoice** | Payment Successful | Records the paid order in Bukku, then emails the buyer their invoice number and link. |
| **Add Buyers to Brevo** | Payment Successful | Saves each buyer who pays as a Brevo contact and adds them to your Brevo list. See [Brevo](/brevo/). |
| **Start a Brevo Automation** | Payment Successful | Sends each paid order to Brevo as an `order_paid` event, so your Brevo automations can follow up. |
| **Google Sheets Update Status** | Status Changed | Updates the payment's row in Google Sheets when its status changes. |
| **Incomplete Payment Follow-up** | Status Changed | Sends one email for failed payments and another for cancelled ones. |
| **Abandoned Cart WhatsApp** | Status Changed | Waits one hour, then sends a WhatsApp reminder for failed or cancelled payments. |
| **Void Sale in Bukku** | Status Changed | When a successful payment later fails or is cancelled, voids its sale or invoice in Bukku. |
| **Webhook on Lead Submission** | New Lead Received | Sends each new lead to your own system by HTTP request. |
| **Lead Form SMS Notification** | New Lead Received | Sends you an SMS for each new lead. |
| **Event Registration Reminder** | Participant Created | Waits one day after registration, then sends a WhatsApp reminder through Wabot. |
| **WasapBot Event Reminder** | Participant Created | Waits one day after registration, then sends a reminder through Wasapbot. |
| **Certificate Wabot Notification** | Certificate Generated | Sends the certificate link through Wabot. |
| **Welcome New Affiliate** | New Affiliate Registered | Emails a welcome and adds the affiliate to a Mail Niaga list. |
| **Email Me From Another App** | Webhook Received | Emails you the details each time another app sends data to the automation's link. See [Start an automation from another app](/automation-webhook-received/). |
| **Add Contacts From Other Apps** | Webhook Received | Adds each person another app sends to your Bukku contacts. |

The newest templates have a **New** ribbon on their card.

To use one:

1. Go to **Automations** and click **Templates**.

   *(Screenshot: The Templates button on the Automations page)*

2. Each card shows the template's trigger and its steps. Click **Use template** on the one closest to what you need.

   *(Screenshot: The Automation Templates panel with Use template highlighted on Thank You Email on Payment)*

3. BCL creates the automation with the template name. The automation is off. BCL opens it on the **Edit Workflow** page. Click **Rename** to give it your own name.

   *(Screenshot: A new automation made from a template, with the Rename and Activate buttons highlighted)*

4. Click each node, then the gear button under it, to change the settings: the forms in the trigger, and the recipient and message in each action. Save each node.
5. Click **Update Automation**, then **Activate**.

The **Node Reference** tab in the same panel lists every trigger and node type with a short description:

*(Screenshot: The Node Reference tab listing the available triggers)*

## Copy an automation with Export JSON

Export JSON saves an automation's trigger and workflow as a file. Use it to copy an automation to another BCL account or to keep a backup:

1. On the **Automations** list, click ⋮ on the automation's row, then **Export JSON**. The file downloads to your computer. To copy it inside the same account, choose **Duplicate Automation** instead.

   *(Screenshot: The row menu of an automation with Export JSON highlighted)*

2. In the other account, go to **Automations** and click **Import JSON**.
3. Upload the file in **JSON File** (up to 5 MB), then click **Submit**.

   *(Screenshot: The Import Automation dialog with the JSON File field highlighted)*

The imported automation opens on the edit page, and it is off. Open its trigger and choose your forms again, because form choices point to forms in the old account.

The file is plain JSON. It needs a `name`, a `trigger_type` and a `workflow_json` with the nodes and the connections between them. It can have only one trigger node. This is a shortened export of a thank-you email automation:

```json
{
  "name": "Kopi Kampung - Thank You Email",
  "trigger_type": "transaction_success",
  "workflow_json": {
    "nodes": [
      { "id": "trigger-1", "type": "trigger", "label": "Payment Success", "x": 50, "y": 50,
        "data": { "trigger_type": "transaction_success", "trigger_conditions": [] } },
      { "id": "action-1", "type": "action", "label": "Send Thank You Email", "x": 400, "y": 50,
        "data": { "action_type": "send_email", "email_to": "{email}",
                  "email_subject": "Thank you for your order #{order_number}",
                  "email_body": "Hi {name},<br><br>We have received your payment of {amount}." } }
    ],
    "connections": [ { "from": "trigger-1", "to": "action-1" } ]
  },
  "is_active": false
}
```

## Tips

A template needs your changes before you use it:

- **Change the text of the messages to your own.** Several templates have sample messages in Malay or English. Customers notice a generic message.
- **Connect the service first.** Templates that use a WhatsApp provider, SMS Niaga, Mail Niaga or Google Sheets cannot send anything until you connect that service. Connect it from its card under **Platform Setup** → **Integrations**.
- **Keep an export before big changes.** Export JSON makes a backup of an automation that works.

## Common issues

### I used a template with WhatsApp, turned it on, but BCL did not send a WhatsApp. Why?

Each WhatsApp template sends through the provider named on its WhatsApp node, such as Send Wabot. Connect that provider first: go to Platform Setup → Integrations and click Connect on its card. Until then the WhatsApp node shows that the provider is not configured.

### Is there a template that sends a WhatsApp after a successful payment?

Yes: Wabot Payment Notification. It has the Payment Success trigger and a Send Wabot node with a sample message. See Send a WhatsApp after payment (/whatsapp-after-payment/).

### Can I copy an automation to another BCL account?

Yes. Click ⋮ on its row and choose Export JSON. In the other account, click Import JSON on the Automations page and upload the file.
