# How to change the trigger of a Flow from one messaging channel to another

If you’ve built a conversational Flow in Flows for a channel like **WhatsApp**, and now want to reuse it on **Telegram** or **Facebook Messenger**, you may have noticed that the UI requires you to **recreate the entire flow from scratch** just to switch the channel trigger.

This can be time-consuming, especially for long, complex flows. However, there is a workaround method: **editing the Flow’s exported JSON** to change the trigger only, while keeping the full conversation logic intact.

### **Understanding the Flow Structure** <a href="#q8jffqcmd16k" id="q8jffqcmd16k"></a>

A Flow’s JSON is divided into two main parts:

1. **Trigger** — defines the channel and event that starts the Flow.<br>
2. **Definition** — contains all the steps and logic of the conversation.<br>

The "*trigger*" section continues until right before the "*definition*" key. Everything from "definition" onwards is the Flow logic and steps, which you want to preserve. Also, note that something that’s referenced from the trigger on the rest of the flow will have also have to be replaced like which may vary for each trigger type\
“*{{trigger.payload.conversation.conversationId}}*”

### **Step-by-Step Instructions** <a href="#xkgqfg7bl5uc" id="xkgqfg7bl5uc"></a>

#### **1. Export Your Original Flow (e.g., WhatsApp)** <a href="#c4ll0ljzigab" id="c4ll0ljzigab"></a>

Here’s an actual example of a Flow built for **WhatsApp**:

```
{
"name": "WA test flow",
"trigger": {
"type": "conversation",
"data": {
"channelIDs": [
"3734dfb6-09f0-4ae2-bd03-fe872ec16766"
],
"channelId": "3734dfb6-09f0-4ae2-bd03-fe872ec16766",
"connectorTemplateSlug": "whatsapp:1",
"event": "created",
"participantTypes": [
"contact"
]
},
"metadata": {
"sourceId": "3734dfb6-09f0-4ae2-bd03-fe872ec16766",
"hookId": "107b6827-5b9b-493c-8217-a9330ba88f13",
"sources": [
{
"sourceId": "3734dfb6-09f0-4ae2-bd03-fe872ec16766",
"hookId": "107b6827-5b9b-493c-8217-a9330ba88f13"
}
],
"testingSourceId": "00000000-0000-0000-0000-000000000000",
"additionResources": null
}
},
"definition": {
"startAt": "createConversationMessage_X0EZ",
"steps": {
"createConversationMessage_X0EZ": {
"type": "mrn:v1:conversations:endpoints:createConversationMessage/textMessage:1.0.0",
"parameters": {
"payload": {
"conversation": {
"conversationId": "{{trigger.payload.conversation.conversationId}}"
},
"participantId": "{{run.flowId}}",
"participantType": "flow"
},
"request": {
"workspaceId": "{{run.workspaceId}}"
}
},
"next": "terminate_uwtz"
},
"terminate_uwtz": {
"type": "terminate",
"parameters": {
"code": "",
"fail": false,
"reason": ""
}
}
}
}
}
```

#### **2. Create a Dummy Flow for the Target Channel (e.g., Facebook Messenger)** <a href="#axtvwez7p6w1" id="axtvwez7p6w1"></a>

Create a new Flow in the UI, but **only set the trigger** for the desired channel (Telegram, FB, etc.), and export it.

Here’s an example of a **Facebook Messenger trigger**:

```
"trigger": {
"type": "conversation",
"data": {
"channelIDs": [
"cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf"
],
"channelId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"connectorTemplateSlug": "facebook:1",
"event": "created"
},
"metadata": {
"sourceId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"hookId": "40265662-e8c7-44ed-bf10-000e58ea4ddd",
"sources": [
{
"sourceId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"hookId": "40265662-e8c7-44ed-bf10-000e58ea4ddd"
}
],
"testingSourceId": "00000000-0000-0000-0000-000000000000",
"additionResources": null
}
}
```

#### **3. Replace the Trigger in Your Original Flow** <a href="#ehenl8jehue5" id="ehenl8jehue5"></a>

In your exported WhatsApp Flow:

* Locate the entire "trigger" block (from "trigger": { to the closing }, just before "definition").<br>
* Replace it with the "trigger" block from the dummy Facebook/Telegram Flow.<br>

Be sure to preserve the rest of the JSON—**everything from "definition" onward stays the same. And, don't forget to look for trigger references and replace those as well.**

#### **Final Output: WhatsApp Flow with Facebook Trigger** <a href="#wchxl9ckfv39" id="wchxl9ckfv39"></a>

```
{
"name": "WA converted as FB triggered Flow",
"trigger": {
"type": "conversation",
"data": {
"channelIDs": [
"cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf"
],
"channelId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"connectorTemplateSlug": "facebook:1",
"event": "created"
},
"metadata": {
"sourceId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"hookId": "40265662-e8c7-44ed-bf10-000e58ea4ddd",
"sources": [
{
"sourceId": "cf8dbb8e-a6ab-4ecf-8c22-d2ec60b97adf",
"hookId": "40265662-e8c7-44ed-bf10-000e58ea4ddd"
}
],
"testingSourceId": "00000000-0000-0000-0000-000000000000",
"additionResources": null
}
},
"definition": {
"startAt": "createConversationMessage_X0EZ",
"steps": {
"createConversationMessage_X0EZ": {
"type": "mrn:v1:conversations:endpoints:createConversationMessage/textMessage:1.0.0",
"parameters": {
"payload": {
"conversation": {
"conversationId": "{{trigger.payload.conversation.conversationId}}"
},
"participantId": "{{run.flowId}}",
"participantType": "flow"
},
"request": {
"workspaceId": "{{run.workspaceId}}"
}
},
"next": "terminate_uwtz"
},
"terminate_uwtz": {
"type": "terminate",
"parameters": {
"code": "",
"fail": false,
"reason": ""
}
}
}
}
}
```

#### **4. Import the JSON** <a href="#ehenl8jehue5" id="ehenl8jehue5"></a>

Now import the JSON that you got by following the previous step into Flows.&#x20;

### **Notes** <a href="#id-245fnvv54x4g" id="id-245fnvv54x4g"></a>

* This method works for **conversation-based channels** like WhatsApp, Facebook Messenger, and Telegram.<br>
* It **does not work for email** triggers, which have a different structure.<br>
* Make sure your workspace is configured with the destination channel before importing the modified Flow.<br>
* Be careful to match channelId and connectorTemplateSlug correctly.<br>

### **Result** <a href="#id-5ai0r1mys2un" id="id-5ai0r1mys2un"></a>

You’ve now successfully changed the messaging channel trigger for your Flow **without rebuilding it manually**. This saves hours when managing multi-channel conversational experiences!
