Webhooks with POST requests: Difference between revisions

From Planfix
Jump to: navigation, search
No edit summary
No edit summary
Line 21: Line 21:


*In the webhook parameters, add field names from the feedback form:
*In the webhook parameters, add field names from the feedback form:
https://s.pfx.so/pf/Yl/fQaD0m.png
*We specify the name of the person to whom the action will be attributed in Planfix after the webhook has been triggered:
https://s.pfx.so/pf/u5/pozSoU.png
*We select the type of operation and configure it. Ultimately, Planfix will create a new contact using the specified template, add a Name from the name parameter in the link and a Phone Number from the phone parameter in the link, and then notify the required employee about the new contact:

Revision as of 14:11, 15 September 2022

In order to understand how webhooks work with POST requests, let's look at a simple example of creating a contact in Planfix for a person who has filled out a feedback form on your site.

Sample webhook with a POST request:

https://ваш_аккаунт.planfix.ru/webhook/POST/create_contact


Let's set up the webhook that will create contacts:

  • Specify POST request as the type:

ujhzDv.png


  • Webhook links contain a unique code, but we can replace it as needed with something more informative:

T2bvZX.png


  • In the webhook parameters, add field names from the feedback form:

fQaD0m.png


  • We specify the name of the person to whom the action will be attributed in Planfix after the webhook has been triggered:

pozSoU.png


  • We select the type of operation and configure it. Ultimately, Planfix will create a new contact using the specified template, add a Name from the name parameter in the link and a Phone Number from the phone parameter in the link, and then notify the required employee about the new contact: