I'm trying to get Zapier working and sending a webhook request to Odoo to create a new lead/opportunity when Zapier fetches it from Facebook Ads.
I don't use Zapier's pre-built automation because it has some data gaps that I can't send like Campaign, Source, and Notes. I would like to use Webhooks for a more complete experience.
I admit I'm not a Webhook/API expert and I took a look at the documentation (here) but I can't get it to work so I need help with this.
The only thing I get working well is an authentication request via ".../web/session/authenticate" url with these params:
{
"jsonrpc": "2.0", "params": {
"db": "db_name",
"login": "login",
"password": "psw"
}
}
but I don't know how to continue and what parameters to use to create a new lead.
You should start reviewing the documentation around external api
https://www.odoo.com/documentation/16.0/developer/reference/external_api.html#create-records
After that to know what fields you need to pass to the
crm.leadcreate you could inspect the installed modules extensions tocrm.leadmodel using the technicals menu to show the model fields and match the data you have in Zappier with the fields on thecrm.leadmodel