Connectors / Service / Giphy

Giphy

Giphy

The largest GIF and Sticker library in the world.

Overview

Giphy is an online database and search engine that allows users to search for and share short looping videos with no sound, that resemble animated GIF files.

Authentication

When using the Giphy connector, the first thing you will need to do is go to your Tray.io account page, and select the workflow you wish to work on. Once in the workflow dashboard itself, search and drag the Giphy connector from the connectors panel (on the left hand side) onto your workflow.

With the new Giphy connector step highlighted, in the properties panel on the right, click on 'New Authentication' which is located under the 'Settings' heading.

This will result in a Tray.io authentication pop-up window. The first page will ask you to name your authentication appropriately, and state which type of authentication you wish to make ('Personal' or 'Organisational').

As you can see, the next page asks you for your 'Environment' and 'API Key'.

Your environment should be set according to your project needs.

To get your Giphy API key, you will need to be logged into your

Giphy SDK Account (note that this is NOT the main Giphy site). Go to the main page of the Giphy website and click the 'Get started button'.

This will take you to the main Giphy SDK Developers page, where you will need to press the "Create an app" button in the bottom left hand corner.

You will then be redirected to the dashboard, where you can copy your API key from. Thie needs to be inserted into the 'API key' field within the Tray.io authentication popup window from earlier.

Once you have clicked the 'Create authentication' button, go back to your authentication field (within the workflow dashboard properties panel from earlier), and select the recently added authentication from the dropdown options now available.

Your connector authentication setup should now be complete.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Example usage

TRAY POTENTIAL: Tray.io is extremely flexible. By design there is no fixed way of working with it - you can pull whatever data you need from other services and work with it using our core and helper connectors. This demo which follows shows only one possible way of working with Tray.io and the Giphy connector. Once you've finished working through this example please see our Introduction to working with data and jsonpaths page and Data Guide for more details.

Below is an example of a way in which you could potentially use the Giphy connector, to list all of the GIFS in your account one by one.

The steps will be as follows:

  1. Setup your trigger and list the trending Gifs available via your Giphy account.
  2. Add Loop collection step to iterate through each Gif found.
  3. Get the relevant data available for each Gif.

The final outcome should look like this:

Once you have clicked 'Create new workflow' on your main Tray.io dashboard (and named the new workflow), select the Manual trigger from the trigger options available:

After you have been redirected to the Tray.io workflow dashboard, from the connectors panel on the left, add a Giphy connector to your second step. Set the operation to 'List trending GIFs'.

The only mandatory field is 'Page' and it is pre-filled for you. All the other properties are there to help you filter through the results accordingly, should you need to. In this example, we have left them blank as there is no need.

Feel free to re-name your steps as you go along to make things clearer for yourself and other users.

When run, this workflow will now list all the GIFs available within your Giphy account.

2 - Add Loop Collection

The Loop Collection allows you to iterate through a list of results. In this example, we will use it to iterate through each user that was returned by the previous step.

Search for 'Loop collection' and drag it into your workflow as your next step. Set the operation to 'Loop List'.

You can specify the list you want to loop through by using the connector-snake and the 'List' input field.

JSONPATHS: For more information on what jsonpaths are and how to use jsonpaths with Tray.io, please see our Intro page and Data Guide for more details.
CONNECTOR-SNAKE: The simplest and easiest way to generate your jsonpaths is to use our feature called the Connector-snake. Please see the main page for more details.

Use the connector-snake to assign this field to the 'data' array, that is produced by the 'List trending GIFs' step. See below images for more details:

When run, the workflow will now iterate through each of the Gifs listed.

3 - Get Gif Data

Finally, drag another Giphy connector step INTO the Loop collection step itself, and select the operation 'Get GIF'.

Use the same connector-snake method for auto-generating the jsonpath for the 'Gif ID'. This time drag your mouse over the loop step previously and select id from within the value array. This is further exemplified once more within the images below:

Now when you run your workflow, you will have the necessary data available for each dashboard displayed within your Debug panel:

BEST PRACTICES: Whenever you do decide to create your own workflow, please make sure you take a look at our Managing data best practices guide.

All Operations

Latest version:

1.0