Facebook Leads from MULTIPLE FORMS to Odoo

We have multiple Leads Ads Forms connected to our company page.
We want to fetch leads from all the forms to our Odoo CRM.
We were able to do that when we connected just one form. It was all working fine. But, the moment with connected our other forms, it started following problems.

  1. Whenever the flow triggers, it copies those leads also which are already fetched in Odoo CRM - in a way creating duplicate.
    What we want is, only the new leads should be copied which are not already fetched to Odoo CRM.

  2. Problems with the mapping of fields and values. We see email id in field of city, name in field of phone etc. It is all messed up even after correct mapping.

Here is a scenario we have designed.

Your help is greatly appreciated.

From what I see, your scenario runs into two key issues:


1. All flows are triggered at once - leads get duplicated

Your FB Page [TFI] trigger is currently connected to multiple lead form branches (FMD, FA, DB). Since there’s no filtering after the trigger, all flows execute in parallel every time a lead is submitted - regardless of which form it came from.

This leads to:

  • Duplicate leads being sent to Odoo
  • Every branch trying to process the same lead

Solution:
Add a filter in each branch that checks the form ID.

Example filter condition:

{{8.body.form_id = "123456789"}}

This ensures only the relevant flow continues, depending on which form the lead came from.


2. Incorrect field mapping - data ends up in wrong fields

Each Facebook Lead Form can have different field structures. If you copy-paste the same SetVariables node across flows without adjusting paths, you’ll get mismatched data:

  • Email in the city field
  • Name in the phone field
  • And other mapping issues in Odoo

Solution:
Do not reuse the same SetVariables node across flows.
Even if the logic seems similar, the incoming structure (body) from each form may differ.

Instead:

  • Create a dedicated SetVariables node for each form

  • Manually map the correct paths like:

    name = {{6.body.full_name}}  
    email = {{6.body.email}}  
    phone = {{6.body.phone_number}}
    
  • Adjust the node number (6) and field names to match each form’s response

Thanks Raian, for suggesting the solution. This is truly helpful.

Related to the 1st point, can you please provide a steps to add a filter to each branch?

Related to the 2ns point, Yes, we have created a dedicated ‘SetVariable’ node for each branch. Please find the screenshots.

  1. Need help setting up route filters? Check out the filter documentation →

  2. You don’t need to use the SetVariable node in this case. It sets a value for a “keyname” only within the scenario’s runtime scope. If multiple SetVar nodes use the same keyname, the values may overwrite each other in an unpredictable order.
    Instead, use the Helper Widget to pass data directly into your Odoo nodes. It’s simpler, more reliable, and avoids conflicts. Learn more about the Helper Widget →

Thanks Oleg,

We have set the filter for all three, directly from the connecting line. Will it work?
Or do we need to add JavaScript?

Point 2: We referred to the Helper Widget document but couldn’t get it clearly. It majorly talks about SetVar nodes. Since we are new to this, we could not follow it quickly.

Would you mind helping us for this specific requirement? How should we use the Helper Widget to pass data directly in Odoo node?

Hi @Oleg and @Raian,

We have got a work around. We think we have successfully configured the filtering rule for each connecter.

Point 2: After reading Oleg’s message, we applied a common sense. For this, we have added a Prefix to the respective “keyname”. For an example, we have differentiated them for the field ‘Contact Name’ as:
Name for FMD = FMD_Contact_Name
Name for FA = FA_Contact_Name
Name for DB = DB_Contact_Name

We hope this will work without creating conflicts.

Would you suggest any other work around?

** :exploding_head: IT IS NOT WORKING**
We tried this solution but unfortunately it didn’t work. When we triggered test leads, it got the same problem as earlier. Mis-mapped fields.

REQUEST TO LATENODE TEAM
Can you please help designing a flow for just Two forms? Rest we can do by ourselves. Another request :pray:: Please do not redirect to any documents as we are not able to follow them as a step-by-step guide.

We think it will work now without any problem.

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.