Best answer

Send data from Zapier to PHP

  • 19 July 2022
  • 2 replies
  • 771 views

Dear Community,

 

I want to receive data in Zapier from Facebook Lead Forms (Premium App). This is working fine so far.

Now I want Zapier to send these data to my PHP Webserver - so there should be a PHP-Script on my webserver listening for Zapiers data-messages.

Could you please give me a hint, or maybe even a working example, on how to do this?

I was able to find many community topics the other way around, by sending data from PHP to Zapier. But not in the direct I want: Zapier to PHP.

 

Thank you in advance,

Gerhard

icon

Best answer by GetUWired 19 July 2022, 15:04

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

2 replies

Userlevel 7
Badge +12

Hi @gerhard.reisinger 

First, you will need to set up your PHP script to handle the request from Zapier.. meaning you will have to host your script somewhere and configure it to handle incoming POST requests. You should read up on creating a basic PHP based API. Once you’ve configured your php script to handle a POST request you can send data using Webhooks by Zapier

 

<?php
if (isset($_POST['api_key']))
{
//Handle the authenticated request
}
else
{
//return an error
}
?>

 

Hi @gerhard.reisinger 

First, you will need to set up your PHP script to handle the request from Zapier.. meaning you will have to host your script somewhere and configure it to handle incoming POST requests. You should read up on creating a basic PHP based API. Once you’ve configured your php script to handle a POST request you can send data using Webhooks by Zapier

 

<?php
if (isset($_POST['api_key']))
{
//Handle the authenticated request
}
else
{
//return an error
}
?>

 

Thank You GetUWired! Your post gave me the final hint on how to do this!