Telegram AI Content Creator Bot manual
Set up and use the included Telegram bot to request Italian social-content drafts through OpenAI.
Who it is for: It is for people who can open a terminal, install Python dependencies, and handle API keys. You can use it to prepare social drafts for manual review before publication.
Setup time: First setup: approximately 30-60 minutes, excluding any account-creation time.
What it does
- Starts a Telegram bot through polling when BOT_TOKEN and OPENAI_KEY are configured.
- With /post, requests an Italian post for linkedin, instagram, twitter, or tiktok from the topic you enter.
- For /post, applies platform-specific instructions, including requested limits of 3000, 2200, 280, and 300 characters respectively.
- With /thread, requests a seven-tweet Italian Twitter/X thread and sends the resulting text up to its first 4000 characters.
- With /hashtag, requests up to 30 Instagram hashtags for a topic and prefixes received lines with #.
- With /calendar, requests a seven-day editorial plan in Markdown table format for a niche.
- At startup, displays a welcome message with commands and a button keyboard for platforms, thread, and calendar.
What it does not do
- It does not publish directly to social media, schedule posts, or connect social accounts.
- It does not generate images, save drafts in a database, or provide performance analytics.
- It does not implement /caption, even though the welcome message displays it.
- It does not implement any action for the buttons displayed in /start; use the registered slash commands instead.
- It does not offer a command to choose the tone: /post uses the code's default professional tone.
- It does not review or approve generated content and does not guarantee that text is accurate, original, or compliant.
Requirements
- Package archive: You need the purchased ZIP file and permission to extract it into a writable folder.
- Python 3 and a terminal: You need Python 3 and terminal access to create a virtual environment, install requirements.txt, and keep the program running. The package does not state a specific Python version.
- Telegram account and Telegram bot: You must create a bot through @BotFather and keep its BOT_TOKEN.
- OpenAI account and API key: You need an OPENAI_KEY that can be used with the model named in the code. Provider usage may be paid; check the provider's pricing, limits, and terms.
- Internet connection: It is required while the bot polls Telegram and forwards generation requests to OpenAI.
- Two secret credentials: BOT_TOKEN and OPENAI_KEY are required. Do not put them in public files, repositories, screenshots, or chat messages.
Step-by-step setup
- Download and extract the package. Download your ZIP and extract it into a local folder. After extraction, check that telegram-content-creator-bot.py, requirements.txt, README.md, README.en.md, and USER-GUIDE.en.md are present.
- Open the extracted folder in a terminal. Open a terminal and move into the folder containing the Python file and requirements.txt. The commands below are for a bash-compatible terminal; use your environment's equivalents on other systems.
- Create the Telegram bot. In Telegram, use the standard @BotFather process to create a bot. Copy the assigned token and treat it like a password: it will be the value of BOT_TOKEN.
- Create or retrieve the OpenAI key. Follow OpenAI's standard process to create an API key and store it securely. The program reads it as OPENAI_KEY and uses the gpt-4o-mini model.
- Create the .env file manually. The README refers to .env.example, but that file is not included in the archive. Create a file named .env yourself in the extracted folder and enter exactly the two variables below, replacing only the angle-bracketed values. The program loads python-dotenv when available.
- Create a Python virtual environment. In the project folder, create an isolated environment so these libraries are not mixed with other Python installations. Activate it before installing or running the bot.
- Install the delivered dependencies. With the virtual environment active, install the libraries listed in requirements.txt. The file requires python-telegram-bot, openai, and python-dotenv.
- Start the program. Run the Python file from the same folder that contains .env. If either variable is missing or starts with YOUR_, the program ends with a configuration error rather than starting the bot. Its terminal startup message appears before polling begins and, by itself, does not confirm that the keys are valid.
- Send the first command to the bot. Leave the terminal open, open the chat with the bot you created in Telegram, and send /start. For a first request, use one of the four supported platform names and a topic. If the bot responds, copy its text and review it before any public use.
Daily use
Start the process first
Each session requires telegram-content-creator-bot.py to remain running with its dependencies and credentials available. If you close the terminal or stop the process, the bot cannot answer until you start it again.
Create a post with /post
Use /post followed by linkedin, instagram, twitter, or tiktok and then the topic. For example: /post instagram tips for choosing a reusable water bottle. Put useful context in the topic itself because there are no separate fields for audience, objective, or tone.
Request a thread with /thread
Use /thread followed by the topic. The code asks for seven numbered Italian tweets and sends the joined result; if the text exceeds 4000 characters, the bot sends only the opening part.
Request hashtags with /hashtag
Use /hashtag followed by the topic. The bot asks the model for Instagram hashtags and returns at most 30 items, each prefixed with #. Check relevance, language, and platform rules before using them.
Request a plan with /calendar
Use /calendar followed by your niche. The code asks for a seven-day Markdown table with platform, content type, topic, suggested time, and hook. Treat times as generated suggestions, not as verified data for your audience.
Use only the commands that are actually handled
Do not rely on /caption or on the buttons displayed after /start: this version does not register a handler for /caption or button presses. Use /post, /thread, /hashtag, and /calendar instead.
Practical cases
Instagram draft for a small shop
A small shop wants to prepare a draft for a recycled-notebook collection launch without connecting its Instagram account to the program.
- Start the configured bot and open its Telegram chat.
- Send /post instagram launch of a recycled notebook collection.
- Read the received draft and check product details, availability, and environmental claims.
- Adapt the text and hashtags to the brand voice and publish manually through the chosen social platform.
You get an Italian social-text draft for review, with no automatic publication.
LinkedIn starting point for a consultant
A consultant wants a starting point for discussing work organisation on their LinkedIn profile.
- Open the bot while the Python process is running.
- Send /post linkedin how to organise priorities in a small team.
- Check that examples, data, and statements match your experience and audience.
- Rewrite the draft with genuinely verifiable cases and add any required references.
You get a starting text using the structure requested by the LinkedIn prompt, ready for personalisation and validation.
Informational thread for a trainer
A trainer wants to prepare a short sequence about budget-planning mistakes.
- Send /thread common mistakes in personal budget planning.
- Read the numbered tweets received and take particular care when checking financial statements.
- Remove or correct advice that does not suit your context and do not present the text as personalised financial advice.
- If the Telegram message is cut off, keep the part received and prepare the rest manually.
You get an Italian thread draft to check and adapt, not reliable or personalised financial guidance.
Initial editorial plan for a local restaurant
A local vegetarian restaurant wants to collect ideas for a week without expecting automatic scheduling or analytics.
- Send /calendar local vegetarian restaurant.
- Review the proposed table for platforms, content types, topics, times, and hooks.
- Check menus, availability, opening hours, and advertising rules before using each idea.
- Transfer approved ideas manually into your working calendar or publishing tool.
You get a structured set of ideas for seven days, to schedule and publish through external tools.
Tips
- Phrase the topic concretely, including the product, audience, problem, or angle directly in the command text.
- For /post, use only lowercase linkedin, instagram, twitter, or tiktok; a different name internally uses LinkedIn settings but keeps the typed name in the reply label.
- Expect Italian content: both the program prompts and bot interface are predominantly Italian.
- Treat every result as a draft. Verify facts, sources, rights, quotations, trademarks, promotions, and claims before publishing.
- Keep a local copy of approved drafts: the delivered code does not save history, calendars, or content in a database.
- Do not place personal data, confidential information, card numbers, or passwords in the topic. Assess lawful basis, privacy notices, and provider processing if you handle personal data.
- Store BOT_TOKEN and OPENAI_KEY in a secrets manager or a local file excluded from version control; regenerate them with the provider if you think they were exposed.
- Check Telegram and OpenAI terms, limits, and costs before continued use; the package does not state third-party prices.
- Test a short request before using complex topics and edit the result yourself rather than assuming the model followed every instruction.
Troubleshooting
The program ends immediately with ERRORE DI CONFIGURAZIONE.
In the credentials-free test, the program reported BOT_TOKEN and OPENAI_KEY as not configured. Its check also blocks values beginning with YOUR_. Create or correct the .env file in the project folder with both variables, or export them into the environment before startup. Do not leave placeholder values.
I cannot find .env.example.
README.md and README.en.md mention it, but the file is not present in the delivered archive. Create a .env file yourself with one BOT_TOKEN line and one OPENAI_KEY line, using the exact names shown in this manual.
Python says a module such as telegram, openai, or dotenv is missing.
Dependencies were not installed in the Python interpreter used to start the bot, or the virtual environment is not active. Activate .venv and repeat python -m pip install -r requirements.txt. Then start the program with python from that same environment.
The bot displays buttons but nothing happens when I press one.
The code creates the keyboard but does not register a CallbackQueryHandler to process button callbacks. Send the supported slash commands directly in chat: /post, /thread, /hashtag, or /calendar.
The /caption command does not respond as expected.
The /start message lists /caption, but no CommandHandler is registered for it in the delivered code. Do not use /caption in this version. For a caption, use /post instagram followed by a textual description of the topic.
The bot replies with a command usage message.
A required argument is absent, or /post does not have both a platform and a topic. Use /post linkedin topic, /thread topic, /hashtag topic, or /calendar niche. For /post, choose one of the four supported platforms.
After startup, the bot does not answer or a generation does not arrive.
Telegram polling and each generation depend on Internet connectivity, credentials, API access, and external-service availability. The code does not include a dedicated error-recovery flow for these requests. Check that the process is still running, that connectivity works, and that provider keys, limits, billing, and terms are valid. Review the technical error in the terminal without sharing secrets.
A received thread appears incomplete.
The code joins the tweets and sends only the first 4000 characters of the result. Request a narrower topic or prepare and complete the thread manually. Do not assume all seven parts were delivered if the message was truncated.
Limits to know
- The program is designed to request Italian content; the English guides document the package but do not translate the bot interface or prompts.
- Generation requires external services and an Internet connection. Provider availability, limits, terms, and costs are outside the package and may change.
- AI text can contain errors, inappropriate content, or unverified claims. Always review accuracy, rights, advertising disclosure, and platform rules before publication.
- Do not send personal or confidential data in commands without an appropriate lawful basis, adequate privacy notices, and an assessment of processing by the providers involved.
- The /post command does not validate an unknown platform name: generation then uses LinkedIn settings, while the reply heading retains the typed name.
- The code does not implement content moderation, approval, storage, publishing, scheduling, or analytics.
- README.md states unlimited personal and commercial use and prohibits resale of the file. Refer to applicable terms and, if needed, a qualified professional for legal decisions.
Frequently asked questions
Do I have to use a .env file?
No. The program reads BOT_TOKEN and OPENAI_KEY from the environment and also tries to load .env with python-dotenv. Since .env.example is not included, creating a local .env is the simplest route for many users.
Which platforms does /post accept?
Use linkedin, instagram, twitter, or tiktok. These are the four names in the code's PLATFORMS configuration.
Does the bot create English text?
Not as its configured behaviour. The program prompts request Italian content and its interface is predominantly Italian. The two files ending in .en.md are English documentation, not a translation of the software.
Can I choose the post tone in the command?
No. The internal function has a tone parameter, but the only registered /post command calls it with the default professional value; there is no user syntax to change it.
Why is /caption shown but not working?
It is listed in the welcome text, but no command handler for it is registered in the delivered version.
Do the /start buttons replace commands?
No. The buttons are displayed, but there is no callback handler to process presses. Use the supported slash commands.
Does the bot publish or schedule posts for me?
No. It returns text in Telegram chat; it contains no social-account connection, publishing function, or automatic calendar.