Dynamic Responses in Lead Automation Actions

1. Feature Overview

You can save the dynamic responses from webhooks or Lapps and use them to insert dynamic content through various automation actions. This article shows you how to first save a Lapps or Webhook response and then use that response in the following actions –

  • Update Lead
  • Create Activity
  • Update Activity
  • Pass to another webhook
  • Pass to another Lapp

You can also use dynamic responses in the emails you send your leads. For more information on this, see Dynamic Content in your Emails.

 

2. Saving a Lapps or Webhook Responses

You can save responses from Lapps and Webhooks in automations and then use these responses in various automation actions. Here’s how you save a response –

  1. Access an existing automation or create a new one by navigating to Marketing>Automation.
  2. Add a Custom automation action card and select either the Call Lapp or Webhook option.
  3. Toggle the Save Response option to Yes and choose whether you want to save the response as
    1. Plain text – Doesn’t allow you to separate out key-value pairs from the content.
    2. JSON data – Allows you to separate out key-value pairs.
  4. Click Save to add the action card to your automation.
  5. Once the automation card is saved, click the more icon () and then click View Dynamic Responses. All the dynamic responses and the places they’ve been referenced will show up here.

 

3. Update Lead

Business use cases for this feature will be available soon…

Once you’ve saved a webhook or Lapp response, you can use it in the Update Lead action to update a lead field –

  1. After creating a webhook or a Lapp and saving the response, under Lead Actions, select Update Lead.
  2. Select the Lead Field you want to update with dynamic content.
  3. In the Value field, type @ and scroll to the bottom of the list of auto-suggestions. You’ll find the dynamic responses you’ve saved under Mail Merge (Dynamic Responses).
  4. Click Save.

 

4. Add Activity

You can use the dynamic responses from webhooks and Lapps in the Create Activity action. For example, you can populate the Comment field of a Chat Conversation activity with the dynamic response saved from a webhook or a Lapp –

  1. After creating a webhook or a Lapp and saving the response, under Lead Actions, select Add Activity.
  2. Select an Activity Type then click the Add an additional field link.
  3. Select an Activity Field and the type to see the list of mail merge fields. You’ll find the dynamic responses you’ve saved under Mail Merge (Dynamic Responses).
  4. Click Save.

Add activity dynamic responses

 

5. Update Activity

Follow these steps to use a Lapp or webhook saved response to update an activity –

  1. After creating a webhook or a Lapp and saving the response, under Lead Actions, select Update Activity (the automation trigger must be an activity).
  2. Select the Activity Field you want to update with dynamic content.
  3. Click the Add Mail Merge checkbox.
  4. In the Value field, type @ and select the webhook or Lapp saved response.
  5. Click Save.

Update Activity

 

6. Pass to Another Webhook

You can pass the saved response from a Lapp or webhook as a query string to the subsequent webhook you create. The parameters you pass will be appended to the webhook URL –

  1. After creating a webhook or a Lapp and saving the response, under Custom, select Webhook.
  2. Enter the saved response after the webhook URL.
    For instance, enter requestbin.in?id=@{PostWebhook2_Response<<node>>,} , where requestbin.in? is the webhook URL and id=@{PostWebhook2_Response<<node>>,}is the dynamic response.
  3. Click Verify and then click Save.
Note: In the dynamic response id=@{PostWebhook2_Response<<node>>,}, <<node>> is a placeholder. You must replace <<node>> with the actual key as shown in the ‘Examples’ section (section 8) below.

Dynamic Content

 

7. Pass to Another Lapp

You can pass the response from a webhook or Lapp to another Lapp –

  1. After creating a webhook or a Lapp and saving the response, under Custom, select Call Lapp.
  2. Select the Lapp you want to call from the dropdown.
  3. Enter the dynamic response from the previous Lapp/webhook in the Query String field. For example, id=@{PostWebhook2_Response<<node>>,}
  4. Click Save.

Note:

  • You can save the response from this Lapp and then use it in further webhooks or Lapps you create.
  • In the dynamic response id=@{PostWebhook2_Response<<node>>,}, <<node>> is a placeholder. You must replace <<node>> with the actual key as shown in the ‘Examples’ section (section 8) below.

Call Lapps

 

8. Examples

Your saved response will look something like this –

@{PostWebhook13_Response<<MyDynamicNode>>,}

Note: The response names (PostWebhook2 here) will vary based the Id of the Lapps or webhook automation cards you create.

Here are some examples of how you can use <<MyDynamicNode>>

Example

If the JSON data being posted by your Lapp or Webhook looks like this –

{
“Key1”: [“Value1”, “Value2”, “Value3”],
“Key2”: {
“Key4”: “Value4”,
“Key5”: [“Value5”]
}
}

Then you can use pass <<MyDynamicNode>> as –

  • @{PostWebhook2_Response.Key1[0],} -> Value1
  • @{PostWebhook2_Response.Key2.Key4,} -> Value4
  • @{PostWebhook2_Response.Key2.Key5[0],} -> Value5

 

Example

If the JSON data being posted by your Lapp or Webhook looks like this –

[{
“Key”: “Value1”
}, {
“Key”: “Value2”
}]

Then you can use pass <<MyDynamicNode>> as –

@{PostWebhook2_Response[1].Key,} -> Value2

 

Example

Or you could just post all the data like this –

@{PostWebhook2_Response,}

 

9. Errors

If you delete a webhook or Lapp card whose saved response was being used in an email or if you turn the Save Response option Off, you’ll see the following error notification –

dynamic response missing

You can also locate the cause of the error by clicking the more icon () and then clicking View Dynamic Responses. You’ll be able to see which card is was deleted or had the saved response option turned off.

errors in dynamic responses

 

Any Questions?

Did you find this article helpful? Please let us know any feedback you may have in the comments section below. We’d love to help you out!

Was this Helpful?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments