A Telex integration that monitors sensitive keywords from the learnbread-community-channel in Telex, and sends the summary to the learnbread-admin-channel on the Telex platform (telex.im) every 1 hour, for now the interval is every 1 minutes (because of the number of multiple chat dropping in the learnbread-community-channel).
Author: ThankGod Cyril Uche
GitHub Repository: telex-integration
- Project Overview
- Technologies Used
- Installation Guide
- API Documentation
- Running the Application
- Contributing
- License
- Other Links
- Screenshots
This project is for HNG Backend Track
- Email: The email address used to register for the HNG12 Slack workspace.
- Current Datetime: The current UTC date and time in ISO 8601 format.
- GitHub URL: The URL of the project's codebase on GitHub.
The endpoint is publicly accessible and designed to provide basic information in a clean, JSON format.
- Backend Framework: Laravel 11.x
- PHP: Version 8.1 or higher
- Composer: Dependency Management
- Database: None required for this project (No database interaction in this task)
- API Response Format: JSON
- Deployment: Can be hosted on any platform (Heroku, DigitalOcean, etc.)
To get started, clone this repository to your local machine using Git:
git clone https://github.com/telexintegrations/learnbread-telex-channel-monitoring.git
Once you have cloned this project, and inside the project directory, run the following Composer command to install all required dependencies:
composer install
This will create the vendor folder and install all Laravel dependencies.
Laravel uses an environment file to manage configuration settings. Copy the
.env.example
file to create a new .env file:
cp .env.example .env
Open the .env file in a text editor and configure the necessary environment variables (if needed).
Generate the Laravel application key using the Artisan command:
php artisan key:generate
This will set the APP_KEY in your .env file.
Run the migrations to create the database tables:
php artisan migrate
Make sure to configure your .env file with the appropriate settings for your environment.
- URL:
http://127.0.0.1:8000/api/json-data
- Method:
GET
- Headers:
Content-Type: application/json
{
"data": {
"date": {
"created_at": "2025-02-21",
"updated_at": "2025-02-22"
},
"descriptions": {
"app_name": "Learnbread Telex Channel Monitoring",
"app_description": "A Telex integration that monitors sensitive keywords from the learnbread channel, and sends the summary to the learnbread-admin-channel on the Telex platform (telex.im) every 1 hour.",
"app_logo": "https://learnbread.com/learnbread-primary-logo-removebg.png",
"app_url": "https://Learnbread.com",
"background_color": "#fff"
},
"is_active": true,
"integration_type": "interval",
"integration_category": "Monitoring & Logging",
"key_features": [
"Interval history",
"Diet",
""
],
"author": "ThankGod Cyril Uche on LinkedIn",
"settings": [
{
"label": "interval",
"type": "text",
"required": true,
"default": "* * * * *"
}
],
"tick_url": "app_base_url/api/telex/get-summary",
"target_url": "app_base_url/api/telex/get-message-from-channel"
}
}
- URL:
http://127.0.0.1:8000/api/telex/get-summary
- Method:
POST
- Headers:
Content-Type: application/json
- Body:
{
"channel_id": "telex_will_send_the_channel_id",
"return_url": "telex_will_also_send_the_retun_url",
"settings": [
{
"default": "* * * * *",
"label": "interval",
"required": true,
"type": "text"
}
]
}
{
"message": "Daily summary of messages containing the specified keywords. and other keys telex is expecting"
}
- URL:
http://127.0.0.1:8000/api/telex/get-message-from-channel
- Method:
POST
- Headers:
Content-Type: application/json
- Body:
{
"channel_id": "telex_will_send_the_channel_id",
"message": "Telex will also send the message here",
"settings": [
{
"default": "* * * * *",
"label": "interval",
"required": true,
"type": "text"
}
]
}
{
"message": "Data received and processed"
}
To run the Laravel application locally, use:
php artisan serve
Then, navigate to http://127.0.0.1:8000/api/info
in your browser or use a tool like Postman or curl to test the API:
curl http://127.0.0.1:8000/api/info
This should return the JSON response with your email, the current date and time, and the GitHub repository URL.
If you would like to contribute to this project, feel free to fork the repository, make your changes, and submit a pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature-name
) - Make your changes and commit them (
git commit -m 'Add new feature'
) - Push to your forked repository (
git push origin feature-name
) - Open a pull request on GitHub
This project is open-source and available under the MIT License. Feel free to drop me an email if you need to discuss further: thankgoduchecyril@gmail.com