I have Suite CRM 8 and am wanting to integrate Facebook Leads into suite CRM, I saw this discussed in another post suggesting Zapier as a good option to integrate Facebook Leads with Suite CRM: Integration with Facebook Leads - #3 by FuriousGeorge
I understand I’ll have to make a custom entry point for this to work with Zapier, if this has been done already is there a code snippet somewhere or example I can get to get this started? I did read the article on Entry Points for Suite CRM but the example is very basic.
Thanks, I did try make.com but they seem to only support Suite CRM 7. It wouldn’t let me connect and was throwing an error, but that was to be expected since I’m using Suite CRM 8. I already have a Zapier account so it would be convenient if I could find a way to do it with Zapier.
To integrate Facebook Leads into SuiteCRM 8 using Zapier, you will need to create a custom entry point in SuiteCRM to accept data from Zapier. Here’s a step-by-step guide to help you get started, including a basic example of the code needed for the custom entry point.
Step-by-Step Guide:
1. Create a Custom Entry Point in SuiteCRM:
First, you need to create a custom entry point in SuiteCRM where Zapier can send data.
Example Code for Custom Entry Point:
Create a PHP file in the custom/Extension/application/Ext/EntryPointRegistry/ directory, for example, FacebookLeads.php.
Create the entry point file in the custom/ directory, for example, FacebookLeads.php.
php
Copy code
// custom/FacebookLeads.php
<?php
// Load necessary SugarCRM files
require_once 'include/entryPoint.php';
// Check for incoming data
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Get the raw POST data
$input = file_get_contents("php://input");
// Decode the JSON data
$data = json_decode($input, true);
// Assuming you are receiving lead data from Facebook
$lead_name = $data['lead_name'];
$lead_email = $data['lead_email'];
// Load the Lead module and create a new Lead
$lead = BeanFactory::newBean('Leads');
$lead->name = $lead_name;
$lead->email1 = $lead_email;
$lead->save();
// Respond to the request
echo json_encode(['status' => 'success']);
} else {
// If not a POST request, respond with an error
echo json_encode(['status' => 'error', 'message' => 'Invalid request method']);
}
2. Set Up Zapier:
Create a new Zap in Zapier.
Choose Facebook Lead Ads as the trigger app and select the appropriate trigger event (e.g., “New Lead”).
Connect your Facebook account and choose the Facebook Page and form you want to use.
3. Configure the Webhook in Zapier:
Add an action step in your Zap to “Webhook by Zapier”.
Choose “POST” as the action event.
Set up the webhook to point to the custom entry point you created in SuiteCRM. For example:
Test the Zap to ensure that leads from Facebook are correctly sent to SuiteCRM and that new leads are created as expected.
Summary:
By creating a custom entry point in SuiteCRM and using Zapier to send Facebook Leads data, you can automate the process of adding new leads from Facebook into SuiteCRM. The provided code snippet is a basic example to get you started, and you may need to adjust it to fit your specific requirements and data structure.
Hi PGR, i too am wanting to integrate v8 with make. Do you know where the legacy edit would need to be made as i have limited knowledge, but some pho skills. I think this would be really useful to everyone as make.com is, as you say ‘free’, but also exceptionally good and we have used it widely with numerous v7 instances. It would be a real benefit to the community to know how to workaround this
Sorry, but I don’t use this, and I don’t have the time to go and explore it.
You can try setting up the make.com connector, and see what it’s trying to do, which web requests it is sending and what are the errors it generates. Then we can take it from there (hoping it’s simple, although I am not 100% sure it will be).
Hi,
In order to integrate Facebook leads via Xapier into SuiteCRM we need to create a custom entry point in the SuiteCRM where Xapier can send it’s data. Please follow the step by step guide below for the integration:
Navigate to custom/Extension/application/Ext/EntryPointRegistry/.
Create a new PHP file, for example, FacebookLeadsEntryPoint.php