Webhooks features

Webhooks are a mechanism for automatically sending HTTP requests to the address of another service when certain events occur. In the case of FLOWIN, these events are new messages within the configured automatic forwarding.

Thus, the functionality of webhooks allows you to integrate with external systems such as social networks, exchanges, CRM. This in turn makes it possible to implement the following scenarios:

  • Lead generation from telegrams with automatic addition of leads to CRM.
  • Broadcasting trading signals from telegrams to the stock exchange (auto-follow).
  • Automatic forwarding of messages from telegrams to other social networks.

Setting up a webhook

Before creating a webhook, make sure you already have forwarding configured.

To add a webhook, follow these steps:

 
webhook add
  1. Go to the page Webhooks (via the menu).
  2. Click Add.
 
webhook
  1. Specify the URL to which HTTP requests will be sent.
  2. Define the required HTTP request body format in JSON format. If necessary, you can use special tags to insert meta information from the message, as well as extract information from the text of the message using regular expressions using the <regexp></regexp> tag.
  3. If necessary, set your additional HTTP request headers.
 
webhook select forward
  1. In the list of your forwards that appears, select forwards within which, with each new message, an HTTP request will be sent to the specified URL with information about the message.
  2. Click OK.
 
webhook menu

After successful creation, the webhook will appear in the list. Now, with each new message forwarded, an HTTP request will be sent to the specified URL with the specified information about the message.

If necessary, by clicking on the gear you can:

  • Change webhook settings.
  • Select other forwardings for the webhook.
  • Duplicate the webhook for later modification.
  • Remove webhook.

Using Meta Information

To add meta information to the HTTP request body, use special tags in the request body:

  • Message date: <message-date>
  • Message time: <message-time>
  • Message ID: <message-id>
  • Message link: <message-link>
  • Album ID: <message-group-id>
  • Chat ID: <chat-id>
  • Chat name: <chat-name>
  • Chat nickname: <chat-username>
  • Author ID: <author-id>
  • Author name: <author-name>
  • Author's nickname: <author-username>
  • Old content: <content>
  • Search by message text using regular expressions: <regexp>[0-9]{3,6}</regexp>