Webhooks with GET requests: Difference between revisions
From Planfix
No edit summary |
No edit summary |
||
(22 intermediate revisions by the same user not shown) | |||
Line 5: | Line 5: | ||
|description=Webhooks with GET requests | |description=Webhooks with GET requests | ||
}} | }} | ||
In order to understand how webhooks with GET requests work, let's put together a link that will create new tasks in Planfix. | In order to understand how [[Incoming webhooks|webhooks]] with GET requests work, let's put together a link that will create new tasks in Planfix. | ||
Sample webhook: | Sample webhook: | ||
<nowiki>https://</nowiki>/your_account.planfix.ru/<span style="color:red;">webhook/get/create_task</span>?<span style="color:green;">project</span>=project&<span style="color:green;">name</span>=taskname | <nowiki>https://</nowiki>/your_account.planfix.ru/<span style="color:red;">webhook/get/create_task</span>?<span style="color:green;">project</span>=project&<span style="color:green;">name</span>=taskname | ||
*The first step is to select the type of request that will be used in the link. Let's specify a GET request: | *The first step is to select the type of request that will be used in the link. Let's specify a GET request: | ||
https://s.pfx.so/pf/ | https://s.pfx.so/pf/OL/FXXjR4.png | ||
Line 24: | Line 25: | ||
*We specify the name of the person to whom the action will be attributed in Planfix after the webhook has been triggered: | *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/0y/UxBrDw.png | |||
*We select the type of operation and configure it. When this is all complete and the webhook is triggered, Planfix will create a task using the template selected, name the project based on the project parameter in the link, and name the task based on the name parameter in the link. Then the following assignee will be added to the task: | |||
https://s.pfx.so/pf/6s/zciFyE.png | |||
*Next we can add additional operations as needed: | |||
https://s.pfx.so/pf/o7/MmTOHu.png | |||
*In the last step, we specify what response we want to receive from the webhook: JSON, transition to Planfix, or transition to your site: | |||
https://s.pfx.so/pf/gd/Rmup3D.png | |||
Now this webhook can be used to quickly and easily create new tasks in the desired project, straight from the browser address bar: | |||
*Copy the link and paste it in the address bar: | |||
<nowiki>https://</nowiki>your_account.planfix.ru/webhook/get/create_task?<span style="color:green;">project</span>=<span style="color:red;">specify</span>&<span style="color:green;">name</span>=<span style="color:red;">specify</span> | |||
*Then insert the desired values and follow the link: | |||
<nowiki>https://</nowiki>your_account.planfix.ru/webhook/get/create_task?<span style="color:green;">project</span>=<span style="color:red;">SEO</span>&<span style="color:green;">name</span>=<span style="color:red;">onboarding</span> | |||
*This creates a new Planfix task: | |||
https://s.pfx.so/pf/Lw/EsW6io.png | |||
== Important == | |||
[[Variables in task templates|Variables]] can and should be used to automate how values are added to parameters in webhook links. | |||
== Go To == | |||
*[[Incoming webhooks]] | |||
*[[Feature Description]] |
Latest revision as of 12:38, 15 September 2022
In order to understand how webhooks with GET requests work, let's put together a link that will create new tasks in Planfix.
Sample webhook:
https:///your_account.planfix.ru/webhook/get/create_task?project=project&name=taskname
- The first step is to select the type of request that will be used in the link. Let's specify a GET request:
- Webhook links contain a unique code, but we can replace it as needed with something more informative:
- In the next step, we add parameters to the webhook. These parameters will store the values that are sent to Planfix. In the example, we're sending the project and task names:
- We specify the name of the person to whom the action will be attributed in Planfix after the webhook has been triggered:
- We select the type of operation and configure it. When this is all complete and the webhook is triggered, Planfix will create a task using the template selected, name the project based on the project parameter in the link, and name the task based on the name parameter in the link. Then the following assignee will be added to the task:
- Next we can add additional operations as needed:
- In the last step, we specify what response we want to receive from the webhook: JSON, transition to Planfix, or transition to your site:
Now this webhook can be used to quickly and easily create new tasks in the desired project, straight from the browser address bar:
- Copy the link and paste it in the address bar:
https://your_account.planfix.ru/webhook/get/create_task?project=specify&name=specify
- Then insert the desired values and follow the link:
https://your_account.planfix.ru/webhook/get/create_task?project=SEO&name=onboarding
- This creates a new Planfix task:
Important
Variables can and should be used to automate how values are added to parameters in webhook links.