DEV Community

Med Marrouchi
Med Marrouchi

Posted on

Automating LinkedIn Posts from Telegram with Hexabot

In this article, I want to share a practical Hexabot demo: publishing a LinkedIn post directly from Telegram.

The idea is simple:

  1. You send a message to a Telegram bot.
  2. Hexabot receives it.
  3. An AI workflow prepares the LinkedIn post.
  4. The content is published to LinkedIn automatically.

This is a small example, but it demonstrates something important: AI workflows do not have to live only inside dashboards or internal tools. They can start from a conversation, connect to external services, use AI, and trigger real business actions.

What we are building

This example connects three main pieces:

  1. Telegram as the input channel
  2. Hexabot as the AI workflow automation engine
  3. LinkedIn as the publishing destination

The workflow starts when a user sends a message to a Telegram bot. Hexabot receives the message through the Telegram channel extension, processes it through a workflow, generates or formats the LinkedIn post using an AI model, then publishes it using the LinkedIn API.

You can find the full example here:

https://github.com/hexabot-ai/linkedin-post-from-telegram-example

Why this example matters

A lot of AI demos stop at generating text.

But in real operations, generating text is rarely the final step.

Usually, you need to:

  • receive input from a user or a system
  • understand the request
  • transform it into structured content
  • call an external API
  • track what happened
  • and keep the process reusable

That is where workflow automation becomes useful.

In this example, Telegram is not just a chat interface. It becomes the entry point for an automation process. LinkedIn is not just a manual publishing destination. It becomes an action executed by the workflow.

Hexabot sits in the middle as the orchestration layer.

How the workflow works

At a high level, the flow looks like this:

Telegram message
      ↓
Hexabot Telegram channel
      ↓
AI workflow
      ↓
LinkedIn publisher action
      ↓
LinkedIn post
Enter fullscreen mode Exit fullscreen mode

A user sends a prompt such as:

Write me a LinkedIn post about this first test post that I sent from Telegram to my Hexabot LinkedIn integration.
Enter fullscreen mode Exit fullscreen mode

Hexabot receives the message, runs the imported workflow, uses the configured AI model to prepare the content, then publishes the final post to LinkedIn.

Main setup steps

The repository includes a detailed README, but here is the overall process.

1. Create a Hexabot project

First, install the Hexabot CLI and create a new project:

npm install -g @hexabot-ai/cli
hexabot create hexabot-linkedin-bot
cd hexabot-linkedin-bot
Enter fullscreen mode Exit fullscreen mode

Then start the project locally:

hexabot dev
Enter fullscreen mode Exit fullscreen mode

The admin interface will be available at:

http://localhost:3000
Enter fullscreen mode Exit fullscreen mode

2. Create a Telegram bot

To receive messages from Telegram, you need to create a bot using @BotFather.

In Telegram:

/start
/newbot
Enter fullscreen mode Exit fullscreen mode

After choosing a name and username, Telegram gives you a bot token. This token will later be configured inside Hexabot as a credential.

3. Install the Telegram channel extension

The example uses the Hexabot Telegram channel extension:

npm install hexabot-channel-telegram
Enter fullscreen mode Exit fullscreen mode

This extension allows Hexabot to receive messages from Telegram and use them as workflow inputs.

4. Expose your local API

Telegram needs a public webhook URL to send messages to your local Hexabot instance.

For local development, you can use a tunneling service such as:

ngrok
pinggy
Enter fullscreen mode Exit fullscreen mode

Once your local API is exposed, update your .env file:

API_ORIGIN=https://your-public-url.example.com/api
Enter fullscreen mode Exit fullscreen mode

5. Configure the Telegram source in Hexabot

Inside the Hexabot admin panel, go to the sources settings page:

http://localhost:3000/settings/sources
Enter fullscreen mode Exit fullscreen mode

From there, configure the Telegram source:

  • enable the source
  • select the default workflow
  • add the Telegram bot token credential
  • add a webhook secret credential
  • enable automatic webhook setup if needed

This allows Telegram messages to be routed into the correct Hexabot workflow.

6. Configure LinkedIn access

To publish to LinkedIn, you need a LinkedIn developer application and an access token with the required permissions.

The README walks through the process of:

  • creating a LinkedIn app
  • enabling the required LinkedIn products
  • generating an OAuth access token
  • retrieving the LinkedIn sub identifier
  • using that identifier as the author reference for publishing

You will need two important values:

LinkedIn access token
LinkedIn member identifier
Enter fullscreen mode Exit fullscreen mode

These values are used by the LinkedIn publisher step in the workflow.

7. Import the workflow

The repository includes a ready-made workflow file:

linkedin-post-form-telegram.yml
Enter fullscreen mode Exit fullscreen mode

Import it from the Hexabot workflow editor:

http://localhost:3000/workflow-editor/
Enter fullscreen mode Exit fullscreen mode

After importing it, configure:

  • the AI model provider
  • the model name
  • the AI API key credential
  • the LinkedIn access token
  • the default LinkedIn author identifier

Once saved, the workflow is ready to run.

What makes Hexabot useful here

This example is not only about publishing to LinkedIn.

It shows how Hexabot can be used as an AI automation layer where workflows can:

  • start from a conversation
  • connect to channels like Telegram
  • use AI models
  • call external APIs
  • execute real actions
  • stay self-hostable and extensible

For developers, this is especially useful because Hexabot workflows can be extended with custom actions, channels, and integrations.

That means you are not limited to Telegram and LinkedIn.

The same pattern could be adapted for:

  • posting to other social platforms
  • creating CRM notes
  • sending internal notifications
  • generating support replies
  • preparing marketing content
  • triggering approval workflows
  • building internal AI assistants

Final thoughts

This Telegram-to-LinkedIn example is intentionally simple, but it shows the power of connecting conversations with real automation.

Instead of opening multiple tools, copying text, formatting content, and publishing manually, you can start the whole process from a Telegram message and let Hexabot orchestrate the workflow.

You can explore the full example here:

https://github.com/hexabot-ai/linkedin-post-from-telegram-example

And if you find Hexabot useful, consider giving the main repository a star on GitHub:


 Star the Hexabot Github Repository ⭐

Top comments (0)