Giphy: Gif Chat

Add a gif to a chat message based on text in the message

Chat is more social with gifs. This block lets users send each others gifs in a chat message based on the text it reads in the message with the Giphy API, just like Slack.


  1. Login or Register to Admin Portal

  2. Select Functions

  3. Select your desired App and Keyset

  4. Select "Explore Templates" and proceed with selected integration.


This Function adds a gif url to a message based on the text. It uses 3rd party Giphy API to get gif url matching input text. Keywords are extracted from text based on usage of /gif tag in message text. The /gif tag is removed from text before publishing.

To learn more about Giphy API and getting your production keys, visit


Input Channel: pubnub-gif-chat (configurable) A JSON object containing key "text", with the message needs to be published on input channel. If message contains /gif tag, then the next word will be used for finding a matching gif image. Multiple tags can exist in same message. For including gif urls based on phrases or sentences, enclose them using ( ) .



Output channel: pubnub-gif-chat (configurable) The modified message containing the list of gif urls is received on same channel.


Talk to an expert