Concatenating Text Variables

  • Updated

Zingtree has built a handy webhook you can use to combine several text (string) variables into a single variable. You just need to add a new Webhook and install it into the node where you want the operation to take place. Here's how to set it up:

Step 1: Add the Webhook to your Organization

  1. Go to Account, My Apps.
  2. Click on Add Webhook.
  3. Give the Webhook a name (like "string catenator"), and enter this for the webhook URL:
    https://zingtree.com/apps/webhook/lib/stringcat.php

 The end result looks like this:

 

Step 2: Call the webhook from your tree

Here's an example of creating a variable named url by catenating a variable called domain with some text:

  1. Open your tree, and edit the node where you want the operation to take place.
  2. Under the Apps / Webhooks section, click Add App / Webhook.
  3. Pick the Webhook you added previously (String Catenator, for example).
  4. In the Message Data area, enter something like this:
    &result=url&string1=#domain#&string2=/faq.php


    The result= part names the new variable (url). The string1=, string2= are other variables or text used to make the final variable. #domain# inserts the value of a variable named domain.

  5. Save the changes to the node.


Your edits should look something like this:

 

Now just use #‌url# anywhere you want to show the new variable.

Note: You can include up to 5 strings to make one catenated string. The string parameters may need to be URL Encoded.

Was this article helpful?

0 out of 1 found this helpful

Have more questions? Submit a request