How to post custom fields with webhook in automation?

Hi programmers & automators!

Please, can I get some help on this one. This is my situation:

  1. myweb.com collects leads for clientweb.com
  2. I would like to POST regular fields and custom fields to handover the lead data from myweb.com to clientweb.com/lead.php in an automation.
  3. I thought I could use a webhook in an automation, but I really can’t find on the interwebs how to make it work. I thought a webhook with https://clientweb.com/lead.php?name=%FULLNAME%&custom=%CUSTOMFIELD1% would do the trick, but it doesn’t work.

What am I missing here? What do you suggest?
Probably I don’t get the concept of webhooks :-S

Thanks for your help!

Hey InternetVideoLearnin,

I’m not completely sure what you are trying to accomplish, but I think that you might want to take a look at Zapier.

Zapier will allow you to send leads from one ActiveCampaign account to another quite easily, and allow you to map fields however you would like, including adding your own fields during the process.

Check it out and let me know if that will help you accomplish what you are trying to accomplish, if not I’m happy to keep helping!

1 Like

Thanks for your reply. Zapier could be an option, but I prefer to keep it out because I want to understand this myself and it can’t be that hard.

Just to add, I’m not trying to get AC data from one account to another, but from my AC -> client lead.php -> client database.

So basically my question is: how do I pick up the data in PHP from an AC webhook?

Ahhh, I see.

You are right then the easiest place to start sending lead data out of AC is with a webhook.

I would start by inspecting the data that AC sends when a webhook is triggered using a free service like http://requestb.in/ or https://ngrok.com/ (requestb.in is way easier to get started).

You can add a webhook from the manage webhooks screen of the settings → developers tab.

Your custom PHP script (clientweb.com/lead.php) will need to be able to accept this http POST request, and process the data (save to a DB) on your end. If you need help getting started with accepting POST requests I would recommend downloading Postman (https://www.getpostman.com/) for practice sending, and reading up on the web.

This might be a good place to start on w3schools - http://www.w3schools.com/php/php_forms.asp

Good luck!

3 Likes

You are a hero! Thanks so much!

1 Like