Facebook Deep Link: Triggering a Flow via an External Messenger Link

A Facebook Referral trigger lets RapidPro.app start a flow automatically when someone opens your Messenger page/bot through a Facebook deep link, which is ideal for welcome/onboarding and campaign entry points, and can optionally use a Referrer ID to route different links to different flows while still allowing channel and group restrictions.

Create a Facebook referral trigger in a few steps

If you just need the essentials, follow this:

  1. Confirm a Facebook Messenger channel (page) is connected and enabled
  2. Go to Triggers and click + New Trigger
  3. Select Start a flow when Facebook refers a contact
  4. Choose the Facebook channel, select the flow, and set a Referrer ID if you want link-based routing
  5. Save, then test by clicking the deep link and confirming the flow starts

You’re done. Your Messenger deep links can now route contacts into the right flow automatically.

Step-by-Step Process

1
Understand what the Facebook referral trigger is for

Facebook Messenger deep links help people discover your chatbot. When someone opens your Page/bot via a deep link,
RapidPro.app can use a Facebook Referral trigger to start a flow automatically (welcome, onboarding, campaign flow, and more).

💡
Tip: This is perfect for campaigns—use referrals to start different flows depending on where the user came from (poster, website, ad, partner, etc.).

2
Create a new trigger

  1. Go to the Triggers tab.
  2. Click + New Trigger.

[CAPTURE: Triggers page showing the “+ New Trigger” button.]

3
Select the Facebook referral trigger type

  1. Scroll down and select Start a flow when Facebook refers a contact.

[CAPTURE: New Trigger options list with “Start a flow when Facebook refers a contact” highlighted.]

4
Configure channel, flow, and routing options

Choose the Facebook channel

  1. Select the Facebook Messenger channel (your Page) from the dropdown.

[CAPTURE: Channel dropdown showing a Facebook Page selected.]

⚙️
Note: This trigger requires a Messenger channel. If you don’t have a Facebook Messenger channel connected, you won’t see this trigger type.

Choose the flow to start

  1. Select the flow contacts should enter when they arrive via the referral link.

[CAPTURE: Flow dropdown showing a selected “Get Started” or onboarding flow.]

Optional: Use Referrer ID to route by link

If you want different flows for different links, use Referrer ID to match a link’s parameter to the correct trigger.

  1. When creating your Facebook deep link, add a parameter (a word/label).
  2. In RapidPro.app, enter that same value in the Referrer ID field.
  3. RapidPro.app matches the referral to the trigger using that value.

[CAPTURE: Trigger configuration showing the “Referrer ID” field filled.]

💡
Tip: Keep Referrer IDs simple—use short labels like poster, website, clinic, ad1 to reduce mistakes.

Optional: Include / exclude groups

You can restrict who can enter the flow by including only specific groups and/or excluding specific groups.

[CAPTURE: Group include/exclude selectors.]

⚠️
Warning: Group filters can block new users. If you include a group, brand-new contacts may not qualify unless something else adds them to that group first.

5
Save and test the deep link

  1. Click New Trigger to save.
  2. Test your Facebook deep link and confirm the flow starts as expected.

[CAPTURE: Active triggers list showing the Facebook referral trigger.]

Common Issues & Quick Fixes

Problem: I don’t see the Facebook referral trigger type.

Fix: Confirm a Facebook Messenger channel is connected and enabled in your workspace—this trigger type only appears when a Messenger channel is available.

Problem: The flow doesn’t start after clicking the deep link.

Fix: Confirm the trigger is active/enabled, verify you selected the correct Facebook channel (Page), and if you use a Referrer ID, ensure the deep link parameter matches the Referrer ID exactly.

Problem: The wrong flow starts for a link.

Fix: Check for overlapping referral triggers and use unique Referrer IDs per campaign to avoid collisions.