Zapier Integration
PingDock works with Zapier via Code by Zapier or Webhooks by Zapier.
Code by Zapier
- In Zapier, add a
Codeaction. - Choose
Pythonas code language. - Prepare
Input Datafrom previous steps. - Insert code
python
import requests
url = 'https://api.pingdock.io/ping'
json_data = {
'dock_id': '<Dock ID>',
'secret_key': '<Secret Key>',
'msg': f'{inputData["<You input data name>"]}'}
response = requests.post(url, json=json_data)
return { 'result': response.status_code }- Headers: Content-Type: application/json
- Body:
json
{
"dock_id": "",
"secret_key": "",
"msg": "PingDock message from Zapier!"
}Webhooks by Zapier
- In Zapier, add a
Webhookaction. - Enter
URL:
https://api.pingdock.io/ping- Select
Payload TypeasJSON. - In
Dataadd the following key-value pairs:
dock_id: <Dock ID>
secret_key: <Secret Key>
msg: <Your message or variable from previous steps>