<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: FranP-code</title>
    <description>The latest articles on DEV Community by FranP-code (@franpcode).</description>
    <link>https://dev.to/franpcode</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F553465%2Fa7867f8b-e99c-4652-bad0-e0c9e5af2929.jpg</url>
      <title>DEV Community: FranP-code</title>
      <link>https://dev.to/franpcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/franpcode"/>
    <language>en</language>
    <item>
      <title>ResearchFlow AI: Helping Students Navigate the Research Maze</title>
      <dc:creator>FranP-code</dc:creator>
      <pubDate>Thu, 17 Jul 2025 20:07:44 +0000</pubDate>
      <link>https://dev.to/franpcode/researchflow-ai-helping-students-navigate-the-research-maze-2a41</link>
      <guid>https://dev.to/franpcode/researchflow-ai-helping-students-navigate-the-research-maze-2a41</guid>
      <description>&lt;h1&gt;
  
  
  ResearchFlow AI: Helping Students Navigate the Research Maze
&lt;/h1&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/wlh"&gt;World's Largest Hackathon Writing Challenge&lt;/a&gt;: Beyond the Code.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Why We Built ResearchFlow AI
&lt;/h2&gt;

&lt;p&gt;Starting a research project is overwhelming.&lt;br&gt;
As students, we've all faced that paralyzing moment when you know you need to "pick a topic," but every path feels too broad, too narrow, or already explored.&lt;/p&gt;

&lt;p&gt;During the hackathon, our team decided to tackle exactly that: the &lt;strong&gt;initial, chaotic phase of academic research&lt;/strong&gt;. We built &lt;strong&gt;ResearchFlow AI&lt;/strong&gt;, an AI-powered assistant designed to help students move from "I’m interested in renewable energy" to "Here’s a focused research question, key papers, and a rough outline to get started."&lt;/p&gt;

&lt;p&gt;We knew we wouldn’t have time to build an entire academic writing platform, so we intentionally &lt;strong&gt;reduced the scope&lt;/strong&gt; to focus on the first steps—the ones that cause the most stress and often stop students before they start.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Problem We Addressed
&lt;/h2&gt;

&lt;p&gt;Most students face three huge problems at the start of a research project:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Choosing a Topic:&lt;/strong&gt; It’s hard to narrow down a broad interest into something specific, original, and researchable.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Finding a Gap:&lt;/strong&gt; Even if you pick a topic, identifying a genuine research gap is intimidating and time-consuming.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handling Information Overload:&lt;/strong&gt; There’s too much literature out there, and most tools don’t help students find or summarize what actually matters.&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  What We Built: The ResearchFlow AI MVP
&lt;/h2&gt;

&lt;h3&gt;
  
  
  ✨ &lt;strong&gt;Key Features&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;AI Research Gap Identifier &amp;amp; Topic Refiner&lt;/strong&gt;&lt;br&gt;
Input a broad idea, and the AI suggests narrower sub-topics and potential research gaps based on recent academic trends.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Curated Literature Collector &amp;amp; Summarizer&lt;/strong&gt;&lt;br&gt;
The AI fetches a small, highly relevant set of academic papers (5–10) and provides concise, 2–3 sentence summaries of each one. It highlights how each paper relates to your research gap.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Basic Outline Builder&lt;/strong&gt;&lt;br&gt;
Drag and drop papers or insights into a simple outline (e.g., Introduction, Lit Review Sections). The AI suggests section headings based on the collected literature.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  What We &lt;em&gt;Didn’t&lt;/em&gt; Build (On Purpose)
&lt;/h2&gt;

&lt;p&gt;To keep the hackathon scope realistic, we focused only on the &lt;strong&gt;core research pain points&lt;/strong&gt;.&lt;br&gt;
We skipped features like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Grammar/style assistance&lt;/li&gt;
&lt;li&gt;Full reference management&lt;/li&gt;
&lt;li&gt;Supervisor communication tools&lt;/li&gt;
&lt;li&gt;Stress or time management features&lt;/li&gt;
&lt;li&gt;Collaboration or co-writing tools&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We wanted to keep our prototype tight and impactful.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack Snapshot
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Frontend:&lt;/strong&gt; React, TailwindCSS, Shadcn-ui&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Backend:&lt;/strong&gt; Astro&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;APIs:&lt;/strong&gt; Perplexity&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Database:&lt;/strong&gt; Supabase's PostgreSQL&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  How We Measured Success
&lt;/h2&gt;

&lt;p&gt;During the hackathon, we kept asking:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Can a user go from a broad idea to a specific research question with AI assistance?&lt;/li&gt;
&lt;li&gt;Do the literature suggestions make sense and save time?&lt;/li&gt;
&lt;li&gt;Is the outline builder intuitive and useful?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Early tests said &lt;strong&gt;yes&lt;/strong&gt; to all three, and that’s what kept us motivated.&lt;/p&gt;




&lt;h2&gt;
  
  
  Reflections: Beyond the Code
&lt;/h2&gt;

&lt;p&gt;Hackathons aren’t just about shipping fast—they’re about collaboration, creative constraint, and community learning.&lt;/p&gt;

&lt;p&gt;Working on ResearchFlow AI reminded us of the power of focusing on &lt;strong&gt;student pain points&lt;/strong&gt; instead of just features. We hope this project sparks more conversations about using AI to make academic research &lt;strong&gt;less stressful and more accessible&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Shoutouts &amp;amp; Thanks
&lt;/h2&gt;

&lt;p&gt;Big thanks to the mentors, organizers, and fellow hackers who shared feedback and ideas during the event!&lt;/p&gt;

&lt;p&gt;If you're reading this and you're a student who’s ever felt stuck at the &lt;strong&gt;“Where do I even begin?”&lt;/strong&gt; phase of research—we see you.&lt;br&gt;
Hopefully, tools like ResearchFlow AI can help make that first step easier.&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>wlhchallenge</category>
      <category>community</category>
      <category>networking</category>
    </item>
    <item>
      <title>InboxNegotiator: Turning Debt Reminders into Payment Plans with AI and Postmark</title>
      <dc:creator>FranP-code</dc:creator>
      <pubDate>Mon, 09 Jun 2025 03:19:14 +0000</pubDate>
      <link>https://dev.to/franpcode/inboxnegotiator-turning-debt-reminders-into-payment-plans-with-ai-and-postmark-5d3d</link>
      <guid>https://dev.to/franpcode/inboxnegotiator-turning-debt-reminders-into-payment-plans-with-ai-and-postmark-5d3d</guid>
      <description>&lt;p&gt;This is a submission for the &lt;a href="https://dev.to/challenges/postmark"&gt;Postmark Challenge: Inbox Innovators&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;I built &lt;strong&gt;InboxNegotiator&lt;/strong&gt;, a serverless AI-powered engine that transforms stressful payment reminder emails into manageable, negotiated payment plans.&lt;/p&gt;

&lt;p&gt;The concept is simple:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; A user receives a payment reminder email from a creditor on the webhook defined on &lt;a href="https://postmarkapp.com/blog/an-introduction-to-inbound-email-parsing-what-it-is-and-how-you-can-do-it" rel="noopener noreferrer"&gt;Postmark inbound parsing&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt; It is being handled by AI to understand the asked debt and generate and generate a legally compliant negotiation response.&lt;/li&gt;
&lt;li&gt;The users handle the response to modify it and sent it to creditor.&lt;/li&gt;
&lt;li&gt; Everything is tracked on a sleek, real-time dashboard where the user can see the negotiation status, the proposed plan, and projected savings.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;It's designed to be a "fire-and-forget" solution to the tedious and often intimidating process of communicating with creditors, leveraging the power of automation and AI to advocate on the user's behalf.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Live App:&lt;/strong&gt; &lt;a href="https://inbox-negotiator.vercel.app" rel="noopener noreferrer"&gt;&lt;code&gt;https://inbox-negotiator.vercel.app&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to Test:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Create an account on the app.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;On onboarding, you will be asked for add an additional email. Go to your &lt;strong&gt;&lt;code&gt;Postmark server -&amp;gt; Default Inbound Stream&lt;/code&gt;&lt;/strong&gt; and copy your inbound email address. Put it in in the additional email input.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to your &lt;strong&gt;&lt;code&gt;Postmark server -&amp;gt; Default Inbound Stream&lt;/code&gt;&lt;/strong&gt; and introduce &lt;code&gt;https://inbox-negotiator.vercel.app/api/postmark&lt;/code&gt; on the Webhook input.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recieve a email asking for a debt. Here's a template for you :)&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Subject: Outstanding Utility Bill Payment Due
Body: Dear customer, you owe $1,250.50 to CreditPlus for your January utility bills. Please pay by 2025-06-15 to avoid penalties
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;&lt;p&gt;(Optional) Add your &lt;strong&gt;&lt;code&gt;Postmark Server Token&lt;/code&gt;&lt;/strong&gt; to be able to send a response directly from the app. (You will need to be authorized on Postmark to send emails with the receptor's email address and domain)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In around 30 seconds you will have an AI generated email to negotiate the terms of the debt. Modify it as you want and send it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Recieve response from creditor.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Templates:

&lt;ul&gt;
&lt;li&gt;Acceptance: &lt;code&gt;Body: Dear customer, we accept your offer.&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Rejection: &lt;code&gt;Body: Dear customer, you can't negotiate this debt.&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;You will get a summary of the performance of negotiation (changes on payment or changes on conditions of the debt).&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Screenshots&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The Real-Time Dashboard:&lt;/strong&gt; A clean overview of all active and settled negotiations, built with shadcn/ui.&lt;br&gt;
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe562no4hdxy5pdbgdf7s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe562no4hdxy5pdbgdf7s.png" alt="Real-Time Dashboard" width="800" height="491"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Timeline &amp;amp; AI Response:&lt;/strong&gt; The generated negotiation text and a timeline of events.&lt;br&gt;
    &lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fizdtn95qj78wqaj6vgny.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fizdtn95qj78wqaj6vgny.png" alt="Timeline &amp;amp; AI Response" width="528" height="1012"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code Repository
&lt;/h2&gt;

&lt;p&gt;The complete source code is available on GitHub. Explore the magic behind the curtain!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/FranP-code/inbox-negotiator" rel="noopener noreferrer"&gt;https://github.com/FranP-code/inbox-negotiator&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;This project is fully serverless, relying on a modern stack to create a seamless, event-driven workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tech Stack:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  &lt;strong&gt;Framework:&lt;/strong&gt; &lt;a href="https://astro.build/" rel="noopener noreferrer"&gt;Astro&lt;/a&gt; (using Astro endpoints for the full-stack API)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Email Processing:&lt;/strong&gt; &lt;a href="https://postmarkapp.com/" rel="noopener noreferrer"&gt;Postmark&lt;/a&gt; Inbound Webhooks&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;Database &amp;amp; Backend:&lt;/strong&gt; &lt;a href="https://supabase.com/" rel="noopener noreferrer"&gt;Supabase&lt;/a&gt; (PostgreSQL, Edge Functions for AI, Realtime)&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;UI:&lt;/strong&gt; &lt;a href="https://ui.shadcn.com/" rel="noopener noreferrer"&gt;shadcn/ui&lt;/a&gt; + &lt;a href="https://heroui.com/" rel="noopener noreferrer"&gt;HeroUI&lt;/a&gt; for a modern, responsive interface.&lt;/li&gt;
&lt;li&gt;  &lt;strong&gt;AI:&lt;/strong&gt; Gemini's API (called from a Supabase Edge Function)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course! Here is a concise and credible "Implementation Journey" section based on your final post. It highlights the key technical decisions and the flow of data through the system.&lt;/p&gt;




&lt;h3&gt;
  
  
  The Implementation Journey
&lt;/h3&gt;

&lt;p&gt;The entire architecture is an event-driven workflow designed for a fast, responsive user experience. Here's how it operates from start to finish:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Entry Point: Postmark Webhook&lt;/strong&gt;&lt;br&gt;
The process kicks off the moment an email lands at the user's unique Postmark inbound address. Postmark instantly parses the email and fires a webhook, sending a clean JSON payload to my Astro API route at &lt;code&gt;/api/postmark&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The API Handler: Astro &amp;amp; Supabase&lt;/strong&gt;&lt;br&gt;
This serverless Astro endpoint is the central receiver. It validates the incoming JSON, extracts key data—creditor, debt amount, and the email body—and inserts it into a &lt;code&gt;debts&lt;/code&gt; table in my Supabase database. This action is fast, ensuring Postmark gets a quick &lt;code&gt;200 OK&lt;/code&gt; response.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The AI Brain: Supabase Edge Function &amp;amp; Gemini&lt;/strong&gt;&lt;br&gt;
The new row in the &lt;code&gt;debts&lt;/code&gt; table automatically triggers a Supabase Edge Function via a database webhook. This asynchronous approach prevents blocking the API route. The Edge Function constructs a detailed, context-aware prompt using the debt information and calls the &lt;strong&gt;Gemini API&lt;/strong&gt; to generate a legally-aware, FDCPA-compliant negotiation draft.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;The Real-Time UI: Astro &amp;amp; Supabase Subscriptions&lt;/strong&gt;&lt;br&gt;
Once Gemini returns its response, the Edge Function updates the &lt;code&gt;debts&lt;/code&gt; record with the AI-generated text and changes its status. On the frontend, the Astro app uses the Supabase JS client to subscribe to real-time changes in the database. The moment the record is updated, the dashboard seamlessly displays the new AI draft, ready for the user to review, edit, and send.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Closing the Loop: Handling Responses&lt;/strong&gt;&lt;br&gt;
The process works in reverse, too. When a creditor replies, their email is also caught by the Postmark webhook. A separate function parses the response for keywords (like "accept," "agree," or "offer") to automatically update the negotiation's status and summarize the outcome for the user on their dashboard.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;My Experience with Postmark&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Postmark was the absolute cornerstone of this project. The &lt;strong&gt;Inbound Parsing&lt;/strong&gt; feature is a game-changer. It transformed the messy, unstructured world of email into a predictable, developer-friendly JSON payload.&lt;/p&gt;

&lt;p&gt;The setup was incredibly straightforward, and the webhook reliability meant I could build my entire application logic on the assumption that I'd receive clean, structured data every time. Without Postmark, this project would have been exponentially more complex.&lt;/p&gt;

&lt;p&gt;It's a truly powerful tool for any developer looking to build applications on top of email.&lt;/p&gt;

&lt;h3&gt;
  
  
  Last words
&lt;/h3&gt;

&lt;p&gt;Thank you for checking out my project!&lt;br&gt;
Made with ❤️ by &lt;a href="https://github.com/FranP-code" rel="noopener noreferrer"&gt;Francisco Pessano&lt;/a&gt; from 🇦🇷&lt;/p&gt;

</description>
      <category>devchallenge</category>
      <category>postmarkchallenge</category>
      <category>webdev</category>
      <category>api</category>
    </item>
    <item>
      <title>How I made Telegram to Notion Bot</title>
      <dc:creator>FranP-code</dc:creator>
      <pubDate>Mon, 09 May 2022 22:34:51 +0000</pubDate>
      <link>https://dev.to/franpcode/how-i-made-telegram-to-notion-bot-c2o</link>
      <guid>https://dev.to/franpcode/how-i-made-telegram-to-notion-bot-c2o</guid>
      <description>&lt;p&gt;Hello, good morning everyone, this is my first post on Dev.To&lt;/p&gt;

&lt;p&gt;I hope it will be useful to different developers to carry out projects related to Bots in Telegram as well as any project in general.&lt;/p&gt;

&lt;p&gt;I will try to make this post as complete as possible, any questions or suggestions do not hesitate to comment.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Select the Framework on which to work with Telegram
&lt;/h2&gt;

&lt;p&gt;For a long time I wanted to carry out this small project, around 6 months, and unfortunately I "married" the only framework I knew, Telegraf.&lt;/p&gt;

&lt;p&gt;Today, it is outdated and has problems with states, a way to assign variables to a specific user, useful to alter the behavior during the execution and use of the bot.&lt;/p&gt;

&lt;p&gt;For this reason, and thanks to a recommendation launched by the NPM package that unfortunately I don't know what it is, I discovered the wonderful Framework &lt;a href="https://grammy.dev/" rel="noopener noreferrer"&gt;grammY&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Important points to choose it
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Sessions work&lt;/strong&gt; thanks to the Sessions and Storing Data plugin&lt;/li&gt;
&lt;li&gt;It has a vast and great documentation.
Maybe it could be better organized, but it's just a detail.&lt;/li&gt;
&lt;li&gt;It is "backward compatible" with the code in Telegraf.
In a surprisingly easy way, I migrated my app from Telegraf to grammY. It is not the way demonstrated by them to write an app, but, it worked.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  2. Register the Bot on Telegram
&lt;/h2&gt;

&lt;p&gt;This is very simple, accessing the official account of &lt;a href="http://t.me/BotFather" rel="noopener noreferrer"&gt;@BotFather&lt;/a&gt; (from Telegram obviously), you can register a bot and customize it with your own commands.&lt;/p&gt;

&lt;p&gt;The most important ones, &lt;code&gt;/newbot&lt;/code&gt; to create one and &lt;code&gt;/mybots&lt;/code&gt; to manage them.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Make Bot Website
&lt;/h2&gt;

&lt;p&gt;It is necessary for the next steps to create a website &lt;strong&gt;with a defined backend&lt;/strong&gt;, that is, with Node.js, PHP or another backend language that allows queries from the server and not from the client.&lt;/p&gt;

&lt;p&gt;It was a huge frustration when I first tried this project and found out that a React site wasn't enough.&lt;/p&gt;

&lt;p&gt;This must have endpoints for the &lt;strong&gt;privacy policy&lt;/strong&gt; and the &lt;strong&gt;terms of use&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Register the public integration in Notion
&lt;/h2&gt;

&lt;p&gt;By accessing &lt;a href="https://www.notion.so/my-integrations" rel="noopener noreferrer"&gt;Notion's My Integrations&lt;/a&gt;, you can register an integration, initially private, and then make it public.&lt;/p&gt;

&lt;p&gt;The latter necessarily requires:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Redirect URIs&lt;/strong&gt;, link to where the user will be redirected after authorizing your integration with their pages or databases in Notion&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Company name&lt;/strong&gt;, or your name in case a company is not working behind&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Tagline&lt;/strong&gt;, small description&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Privacy policy&lt;/strong&gt;, link to the privacy policies that you previously defined&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Terms of use&lt;/strong&gt;, link to the terms of use that you previously defined&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Email support&lt;/strong&gt;, with an email to support the client of your integration&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  5. Write the operation of the different bot commands
&lt;/h2&gt;

&lt;p&gt;This is the most personal part of all, which will vary from project to project, defining the functionality of the bot.&lt;/p&gt;

&lt;p&gt;For this, first of all, I wrote a middleware to check if the bot was in development or production mode. With this, only the user with a certain ID could access the bot's functionalities.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight jsx"&gt;&lt;code&gt;&lt;span class="nx"&gt;bot&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;next&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;NODE_ENV&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;development&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;

    &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="nf"&gt;parseInt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;process&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;env&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;MY_USER_ID&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;ctx&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reply&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;⚠️ Sorry, this bot is on development for now... &lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s1"&gt;Stay alert &amp;gt;
        return
    }

    next()
})
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once this was done, I did the development command by command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Start&lt;/strong&gt;, where I welcome the bot&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;On message&lt;/strong&gt; in the case in which the bot is in development and the account that has accessed is not mine.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auth&lt;/strong&gt;, where a state is created saying if an auth code is expected from the user and a link is provided to go to a server to generate the auth code (details later).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Help&lt;/strong&gt;, where the &lt;a href="https://github.com/FranP-code/Telegram-to-Notion-Bot" rel="noopener noreferrer"&gt;Github repository&lt;/a&gt; of this bot is shown&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Roadmap&lt;/strong&gt;, to return the roadmap of my project&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Announcement&lt;/strong&gt;, to be able to make global announcements for each user that will interact with the project&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Additionally I made the necessary &lt;strong&gt;Middlewares&lt;/strong&gt; (functions that are executed before the bot functions) to check if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The user wanted to authorize the bot, therefore, intervene the message to verify and save his auth code&lt;/li&gt;
&lt;li&gt;The user wanted to make an announcement, adding some layers of security in the middle&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And some more features, such as detecting when the user taps on one of the buttons that are returned with the Notion databases, among others.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Send it to production
&lt;/h2&gt;

&lt;p&gt;Using the &lt;a href="https://railway.app/" rel="noopener noreferrer"&gt;railway&lt;/a&gt; service, I deployed it to production without much difficulty.&lt;/p&gt;

&lt;p&gt;It is noteworthy that every time the bot broke, which happened continuously, the service very quickly notified it by email.&lt;/p&gt;

&lt;p&gt;It has a &lt;em&gt;freemium&lt;/em&gt; model and has a limit of monthly CPU and RAM usage. From there, it is paid.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Publish the beta version
&lt;/h2&gt;

&lt;p&gt;I posted on the Notion subreddit the highlights of my project, initially posting the &lt;a href="https://www.reddit.com/r/Notion/comments/u24hu9/telegram_to_notion_bot/" rel="noopener noreferrer"&gt;bot with beta website&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Publish the final version
&lt;/h2&gt;

&lt;p&gt;Once the website has been “stunningly” developed, &lt;a href="https://www.reddit.com/r/Notion/comments/udabqw/some_updates_and_one_more_demo_of_my_last_project/" rel="noopener noreferrer"&gt;I have to update it on Reddit&lt;/a&gt; and publish it on &lt;a href="https://news.ycombinator.com/item?id=31216997" rel="noopener noreferrer"&gt;Hacker News&lt;/a&gt;, where I got the most traffic to the bot.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Design the roadmap
&lt;/h2&gt;

&lt;p&gt;Seeing user feedback on Reddit, I decided to make a roadmap to allow users to track planned features and their progress.&lt;/p&gt;

&lt;p&gt;It was advertised within the bot and is available as one of its commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Post it to Dev.to
&lt;/h2&gt;

&lt;p&gt;Once the vast majority of the work is finished, and I still have to develop additional features, I have to make a post to show it with the great &lt;a href="http://dev.to/"&gt;Dev.to&lt;/a&gt; community, a site I have frequently visited but where I had never interacted.&lt;/p&gt;

&lt;p&gt;I hope you liked this first post.&lt;/p&gt;

&lt;h1&gt;
  
  
  More information about the Bot
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Features&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Free&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Open source&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unlimited&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forever&lt;/strong&gt; (at least while I can afford the host of it)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://t.me/OpenTelegramToNotionBot" rel="noopener noreferrer"&gt;Here&lt;/a&gt;&lt;/strong&gt; is the link to the Bot itself&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://github.com/FranP-code/Open-Telegram-to-Notion-Bot" rel="noopener noreferrer"&gt;And here&lt;/a&gt;&lt;/strong&gt; is the link to the repository on Github&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FpJ10w9j%2FTelegram-To-Notion-Bot-Demo-Acelerated.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FpJ10w9j%2FTelegram-To-Notion-Bot-Demo-Acelerated.gif" alt="demo"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you very much and a hug! 🙌&lt;/p&gt;

</description>
      <category>telegram</category>
      <category>notion</category>
      <category>javascript</category>
      <category>node</category>
    </item>
  </channel>
</rss>
