Overview:

This Tines story will setup a Tines Webhook action as a receiver for JSON content/data coming from an external HTTP request. This is a great option if you want/need to get access to JSON (or other) data in Tines that is currently being used outside of Tines. You will also have the ability to manipulate and process this data in tines and then send it out via HTTP requests, or emails to other services or end users.

This is a simple 1 action setup that will allow you to receive data into Tines via HTTP Requests and/or Webhook payloads. Once in Tines you will then be able to use the full suite of Tines actions/tools to use/manipulate the data as you want.

This story uses the assistance of 3rd party tool ReqBin to make the simulated HTTP request payload sent to Tines. This is not the only way to send HTTP data/requests into Tines, but used as a low/no code simple/visual example of how to use the Tines webhook urls to receive data.

Some concepts you will need to be familiar with to create this story:

  • HTTP Requests
    • Headers
    • Payload content 
    • API Endpoints
      • POST
  • JSON formatting as well as interacting with JSON content
  • Webhooks
  • Minor string content formatting (optional for preference readability)

Guide:

[Intro]

Welcome back to tines with Tyler. In this video, I’m going to show you how to quickly receive 3rd party information into your tines story via webhook payloads so that you can begin to automate interactions or responses with that data. This is great if you are wanting to interact with data triggered from other services and/or want to perform an action based on data received. Keep in mind the other service must provide the data you want via HTTP webhook payloads for this method to work.

[Main]

The first thing you want to do is open up your tines story. Once opened, drag the Webhook action onto your storyboard.


If you click on the webhook action you will be able to see the URL and other options. The path and secret is built into the URL so you won’t usually need to use this information, but some services may require you specify in order to send data to the webook URL.


In this particular case, I am only concerned about receiving POST requests, so I am just going to select post as the only allowed verbs
Now that we have that setup, I am going to copy the Webhook URL and take it over to to Reqbin, where I will be simulating a service sending a POST request to the webhook url. In a real example, you will just be setting up the webhook url as your service’s webhook payload URL entry.

Here on Reqbin, I’ll change the type to POST, and past the URL in.


Now, I will simulate a dummy payload in JSON by changing the body type to JSON. tines is capable of receiving these others but I personally prefer working with JSON types, which is also very common for APIs to use as well.
In the JSON body, I am going to create a few JSON key value pairs to simulate the data payload. To do that I need to format the payload as a JSON object using curly braces, and each key value pair using double quotes for names/values separated by a colon.


To indicate multiple key value pairs, they are separated by commas
Now that I have my simulated payload, I will click send and wait to see the status response.
Now that it has specified an ok status, we can go back to tines to check how the payload was received.


click the webhook action and open up the events tab
here on the events tab we can see what data was just received via that action, in this case the dummy payload from reqbin.


You can also see other data that was included by the service, such as request headers, as well as what tines responded with once the payload was received.
An easy way to capture this data into further tines actions is to simply hover over the key/value and click the copy icon.
Pasting this copied reference into another tines action field where the action is linked will correctly reference this data field. The part to remember with this, is that it is linked to the specific name for the key you just copied, so if other data comes in that doesn’t specify that key, this will return a null value.

With that in mind, we can put an Event Transform Action to “Parse” the webhook data into convenient fields.

Running the story now, you can see what the even transform action will produce. Although this step is technically optional, I prefer to use it as it sets a standardize reference point for the relevant information I want from the incoming payload data. 

As the path fields are key specific, I recommend only sending data to a specific tines webhook action that you are expecting to have the same key/value fields each time, so as to avoid errors in obtaining data between different sources to the same tines webhook.

[End]
And this is how you can get 3rd party HTTP data in tines, so that you can process and manipulate it in any way you want as well as have the capability to then send that modified data out to another service either by HTTP Request (i.e. to another API service), or email. If you’re interested in creating more projects or wanting to learn how to automate more cool things in tines, be sure to like, subscribe and check out the socials to stay up to date on the latest projects!

About The Author

Tyler

Tyler is a professional Tines automation specialist with a knack for problem-solving and troubleshooting. He has leveraged the Tines platform in non-traditional ways to streamline workplace tasks and also create unique interactive tools.

Leave a Comment