Overview:

This Tines story will show how to setup a Tines HTTP Request action to send data out from your Tines story to another service/destination… In this case, to a Discord text channel that you have access to create/manage and edit Discord webhooks for.

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

  • JSON formatting as well as interacting with JSON content
  • Webhook basic settings
  • Discord webhook setup/settings
  • Minor string content formatting (optional for preference readability)

Guide:

[Intro]

Welcome to Tines with Tyler. In this video, I’m going to show you how quickly send your Tines story data/payloads to another service, in this case, a Discord text channel. I use this option as a great way to get free mobile notifications (the Discord text channel I can set as public/private to myself, as well as control notifications individually) of events happening in my Tines story. Although you can control channel view privacy settings, I would still advise to use caution sending any potentially sensitive information this way. Note that this guide was created separately from the video, so names, setup, and content may be different from the video.

[Main]

Alright, so here I am in my Tines story. I’m going to drag the HTTP Request action to the storyboard. The action will already be setup with default URL and payload options.

We will need to change some of the default settings here, but first you will want to setup a Discord Webhook to receive this action payload.

To do that, go to your Discord server and text channel that you have permissions to manage and create a new webhook integration. In my case, I have set one up with a default recognizable name (actually re-used for a different Tines story), a profile icon, and specified I wanted this webhook to deliver its payloads to the general text channel in the server.

Now copy the Webhook URL from the Discord webhook and go back to Tines to paste this URL into the HTTP Request action URL. As we are sending a POST request to the Discord Webhook, we will leave it as POST.

The payload will also need to be changed to whatever it is you will be wanting to send out. In a normal situation, you would just include previous event action outputs from the Tines story, but in my case, it will just be a dummy payload to simulate.

Before adding the payload, there is important information to pay attention to, and that is the Discord API reference requirements for their Webhooks:

The most important part that is relevant for just getting text content into a Discord Webhook message is the requirement of 1 of 4 JSON parameters (content, file, embeds, poll). As we are just wanting to send a text payload, content parameter will be fine. For Discord, the entire message payload will be contained in the “content” field. I also (optionally) compute and format the current time via a Tines formula and convert it to my local time zone. This can be seen by the Tines value highlighted in purple after the “Sent: ” text in my own payload.

Now you can run the action. On a successful run, you should see a valid Tines event and see a 200 level status code returned from Discord

You should have also received a new message in that text channel, with your Tines payload

I will also now include a simulated previous action to show how a normal Tines story would process this.

Setup a new Event Transform Action in message mode, and cut the content payload from the HTTP request action into the message field in the Event Transform action

Next is one of the most important steps, which is to put a throttle limit on events triggering the HTTP action to Discord Webhook. You can find the specific rate limits in Discord’s documentation (and whatever other service you use should have defined rate limits), by setting a Tines Event Transform action in Throttle mode. I set almost all of my throttles to 10-12 runs allowed per minute. That limit is usually within the service’s limits, as well as doesn’t end up delaying event processing for most of my purposes. You also have to account for any other services using each endpoint at the same time (i.e. if you have multiple Tines stories sending to the same output). By not respecting the service’s rate limits, you could potentially get restricted from using their services!

Link the action to the HTTP Request action, and change the HTTP Request action content field to reference the full message from the event transform

Now if you run the Event Transform action (as if a Tines story was processing events prior to the HTTP Request action to send to Discord Webhook), you can see that once the Event Transform action runs, it will send the output to the throttle action (and process according to the throttle limit), and then send to the HTTP Request action, which will then process as the POST request to Discord Webhook. You should now see the message show up in Discord as before…

[End]

You are now able to send your Tines events to Discord via Discord Webhooks!

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 my other posts!

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