-
Zingtree has built a variety of webhooks you can add to your trees - at no cost. These perform a variety of handy functions:
Date Webhooks
date_plus
calculate a date in the future given a starting date and number of daysin: date, days
return variable: date_plusExample:
https://webhooks.zingtree.com/zingtree/v1/date_plus?days=30&date=2021-01-01
date_reformat
reformats a date to a new format
in: date, format, var
return variable: The variable named in the var parameterExample:
https://zingtree.com/apps/webhook/filters/date-reformat.php?var=new_date&format=F+j,+Y&date=2019-10-22
Note: Date Formats can be found here.
date_difference
calculate the number of days between dates
in: date1, date2, var
return variable: the variable name in the var parameterdate_plus_business_days
Add days BUSINESS days to a date, and return the variable as new_date. This ignores weekends and holidays
in: date, days
return variable: new_date
https://zingtree.com/apps/webhook/filters/date_plus_business_days.php?days=3&date=2019-08-23days_from_today
Determine the number of days from today for a given date
in: date
return variable: days_from_todayExample:
https://zingtree.com/apps/webhook/filters/days_from_today.php?date=#date#&date_format=m/d/Y
date to age
given a birthdate, returns the age of a person born on that date
in: date, result
return variable: The variable named in result.
https://zingtree.com/apps/webhook/lib/date-to-age.php?result=age&date=1970-03-01
More informationOther Utility Webhooks
inspector
returns data send into the webhook. Useful for debugging or learning more about how webhooks work.return variables: whatever was passed into the webhook
Example:
https://zingtree.com/apps/webhook/lib/inspector.php
multiline-split
Adds line breaks to multi-line text variables
in: the current session - specify as #session#
return variables: All variables in the current session, adding line breaks.
Example:
https://zingtree.com/apps/webhook/lib/multiline-split.php?session=#session#
random
webhook to return a random number - used for verification. Specify the number of digits (4 is default)
in: digits
return variable: random_number
Example:
https://zingtree.com/apps/webhook/lib/random.php?digits=6More
-
Zingtree has built a variety of webhooks you can add to your trees - at no cost. These perform a variety of handy functions.
Zingtree is able to send and receive data from other applications using the Zingtree Webhook app. You can send data to a URL, and receive JSON formatted data back as Zingtree variables.
Here's an overview of the process:
1. Add a webhook to your organization's apps.
- Go to Account, My Apps, and click the Webhook app.
- Enter the URL where you will be sending and receiving data.
- The URL can contain Zingtree data entry variables, like #name#, #email# etc.
- If you want Zingtree to receive data, the URL must return data in a JSON format.
2. Include a call to the webhook in a node. When the node is visited, the call is executed.- Go to Overview, and click Edit for the Node you want to make the call.
- Click the Apps/Webhooks tab.
- Click Add App/Webhook.
- Under Call App or Webhook, pick the Webhook app you installed previously.
- You can include an optional Message, which gets sent to the URL as a variable in a JSON data block.
Webhooks Library
Date Webhooksdate_plus
calculate a date in the future given a starting date and number of daysin: date, days
return variable: date_plusExample:
https://webhooks.zingtree.com/zingtree/v1/date_plus?days=30&date=2021-01-01
date_reformat
reformats a date to a new format
in: date, format, var
return variable: The variable named in the var parameterExample:
https://zingtree.com/apps/webhook/filters/date-reformat.php?var=new_date&format=F+j,+Y&date=2019-10-22
Note: Date Formats can be found here.
date_difference
calculate the number of days between dates
in: date1, date2, var
return variable: the variable name in the var parameterdate_plus_business_days
Add days BUSINESS days to a date, and return the variable as new_date. This ignores weekends and holidays
in: date, days
return variable: new_date
https://zingtree.com/apps/webhook/filters/date_plus_business_days.php?days=3&date=2019-08-23days_from_today
Determine the number of days from today for a given date
in: date
return variable: days_from_todayExample:
https://zingtree.com/apps/webhook/filters/days_from_today.php?date=#date#&date_format=m/d/Y
date to age
given a birthdate, returns the age of a person born on that date
in: date, result
return variable: The variable named in result.
https://zingtree.com/apps/webhook/lib/date-to-age.php?result=age&date=1970-03-01
More informationOther Utility Webhooks
inspector
returns data send into the webhook. Useful for debugging or learning more about how webhooks work.return variables: whatever was passed into the webhook
Example:
https://zingtree.com/apps/webhook/lib/inspector.php
multiline-split
Adds line breaks to multi-line text variables
in: the current session - specify as #session#
return variables: All variables in the current session, adding line breaks.
Example:
https://zingtree.com/apps/webhook/lib/multiline-split.php?session=#session#
random
webhook to return a random number - used for verification. Specify the number of digits (4 is default)
in: digits
return variable: random_number
Example:
https://zingtree.com/apps/webhook/lib/random.php?digits=6More
-
Throughout 2022 Zingtree will be upgrading customers to our new faster and more modern user experience! Here's how to tell which experience your Zingtree Authors are currently using.
Log in to your Zingtree Author account and navigate to My Trees. How does your current My Trees page look?
Zingtree Classic
New User Experience
Webhooks: Library
- Updated