How to Create an Event-Based Trigger Flow in ControlHippo

Modified on Thu, 9 Oct at 4:55 AM

Step 1: Log in to ControlHippo

  • Open your ControlHippo account.

Step 2: Start a New Flow

  • On the left sidebar, click on "Work Flow Builder" to start creating a new flow.

  • Click the "Create Flow" button.

Step 3: Add the Trigger Node

  • From the left panel, drag and drop the Trigger node into the flow.

  • Under the Channel, choose the WhatsApp number or any other communication channel (e.g., 2nd Number Support).

  • In the Choose a Trigger, select Event Based Trigger.

Step 4: Configure the Event Trigger

  • Click on "Configure Event" to set the webhook.

  • You’ll see a Webhook URL. This URL is what your system will hit when you want to trigger the flow.

  • Replace {{:apikey}} with your actual API key.

Step 5: Add Actions

  • After setting the event trigger, you can now add actions like sending a message, asking questions, etc.

  • Drag "Send a Message" node and customize your message.

  • You can add dynamic content in your message using variables like {name} or {email}.

Step 6: Test Your Flow

  • Test your flow by making a test API call from an external system or tool (like Postman) to the Webhook URL.

  • Make sure to pass the necessary parameters like toNumber (recipient's phone number) and any optional variables.

Example of a test API call using cURL:

curl -X POST \ "https://your-domain.com/api/flow/activate/flow123/apikey456" \ -H "Content-Type: application/json" \ -d '{ "tonumber": "919876543210", "variables": { "customField": "value" } }'
  • If successful, your flow will be triggered and the action (like sending a message) will happen.


Basic Request Format for Flow Activation

Q: What should I include in the request body?

A: The minimum required field is:

{ "tonumber": "919876543210" // Phone number with country code }

You can also include additional variables if needed, like {name}, {email}, etc.


Supported Platforms

Q: Which platforms are supported for flow activation?

A: The Flow Activation API supports:

  • WhatsApp (Regular and WhatsApp Business API)

  • Telegram (Standard messaging)

  • Telegram Bot (Messaging via bot)

Q: How do I format phone numbers for different platforms?

A:

  • WhatsApp: Use the phone number without the "+" sign and include the country code (e.g., 919876543210).

  • Telegram: You can include the "+" in the phone number (e.g., +919876543210).

  • Telegram Bot: You need to use the Telegram chat ID instead of a phone number.


Common Issues and Solutions

Q: Why am I getting "Only event-based trigger flows can be activated via API"?

A: This happens if the flow you’re trying to trigger does not have an Event Trigger node.

Solution: Ensure your flow includes an Event Trigger node and that the trigger type is correctly set to "Event Base Trigger".


Q: Why am I getting "To number is not registered with us"?

A: This error occurs when:

  • You’re trying to send a message using the Telegram Bot platform.

  • The chat ID of the recipient is not registered in your system.

Solution: Ensure that the user has interacted with the bot before you attempt to send them a message.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article