Overview
This webhook allows you to provide a formula as if using a Google sheets spreadsheet and receive back the calculated result. You may specify optional formatting for the cell. The formula must be provided in the "formula" parameter, and should be written in the same way as you would write it in a cell in Google Sheets. You can also specify optional formatting parameters, "format" and "pattern", which will be used in the Google Sheets API as the "numberFormat.type" and "numberFormat.pattern" respectively.
Requirements
- Kapturall Actions API Key
Request parameters
Parameter | Type | Required | Description |
---|---|---|---|
formula | string | yes | The formula to be applied to the cell. |
format | string | no | The format to be applied to the cell. |
pattern | string | no | The pattern to be applied to the cell. |
Response Parameters
Parameter | Type | Description |
---|---|---|
formula | string | The formula that was applied to the cell. |
format | string | The format that was applied to the cell. |
pattern | string | The pattern that was applied to the cell. |
numberFormat | object | An object containing the "type" and "pattern" of the formatting applied to the cell. |
ref | string | The reference of the cell that was modified. |
result | string | The result of the formula applied to the cell, with any applied formatting. |
raw_result | string | The raw result of the formula applied to the cell. |
Installation
Go to the Admin area.
Click Webhooks.
Click New Webhook.
Enter the url & JSON with formula
The JSON should include at minimum the attribute formula
Parameter | Type | Required | Description |
---|---|---|---|
formula | string | yes | The formula to be applied to the cell. |
format | string | no | The format to be applied to the cell. |
pattern | string | no | The pattern to be applied to the cell. |
{
"formula": "3/5",
"format": "percent",
"pattern": "0.000%"
}
Set Authorization Header
You will need to pass your Kapturall API Key in the header to authorize the call
Click EDIT next to Custom Headers
Click + Add then enter x-api-key as the header and your Kapturall API key as the value. Then click Save
Set Response Mapping to return the formula value to a specific field
Click EDIT next to Response Mappings
Click + Add and enter any of the given response parameters as the Response Attribute. Then select the Marketo field you would like the value stored in. Once you have set all of the mappings you want, click Save
Response Parameters
Parameter | Type | Description |
---|---|---|
formula | string | The formula that was applied to the cell. |
format | string | The format that was applied to the cell. |
pattern | string | The pattern that was applied to the cell. |
numberFormat | object | An object containing the "type" and "pattern" of the formatting applied to the cell. |
ref | string | The reference of the cell that was modified. |
result | string | The result of the formula applied to the cell, with any applied formatting. |
raw_result | string | The raw result of the formula applied to the cell. |
Usage
Once configured, you should see the action available to add to smart campaigns under
Add the Call Webhook flow action to smart campaign
Then select the webhook you have created from the dropdown
For more information on using webhooks in smart campaigns, checkout the Marketo documentation
Writing Formulas
This webhook uses Google's Sheets API to calculate the formula results. Please refer to the Google Sheets function list when writing formulas.