All posts

HOW I BUILT MY CUSTOM CHATGPT APP

How I used ChatGPT to help me create a custom app to help me automate my tasks in less than 24 hours πŸ™Œ

Unlocking the Developer Within: Harnessing AI Assistance to Create Custom Tools

Background While experimenting with ChatGPT for research, I found it difficult to manually copy and paste text from websites or PDFs into the platform while keeping a manageable prompt.

Although I know that direct uploads of PDFs and web pages will be available soon, I decided to create my own app to have greater control over its features.

Once I receive my API key, I will complete the app. This tool will connect directly to ChatGPT and allow me to run custom prompts using the inputs generated from PDFs or websites.

I will share an update on this progress soon. Below are the steps I took to develop the app.

β˜‘ Discussed the requirements: I wanted to build a custom app to scrape the contents of a URL (both web pages and PDFs) and convert the extracted text into a format that can be used as input for ChatGPT. β˜‘ Suggested a platform for testing: Chatgpt suggested using an online Jupyter Notebook (like Google Colab) for testing and development, as it's free and easy to set up. β˜‘ Developed the web page scraper: We started by creating a Python script to scrape the contents of a web page using the requests library and BeautifulSoup from the bs4 library. This script accepts a URL, fetches the HTML content, and extracts the text by parsing the HTML. β˜‘ Enhanced the scraper to support PDFs: We modified the script to support PDFs by incorporating the pdfplumber library. The script was updated to accept a URL or a file path, as well as an indication of whether the input is a PDF or not. The script then extracts the text from the PDF using pdfplumber and returns it as a string. βœ… Addressed issues with local file access: Due to the limitations of online Jupyter Notebooks, we faced some issues with accessing local files. I provided a solution using the google.colab library to upload local files to the notebook when running on Google Colab. βœ… Tested the scraper: We tested the scraper with various inputs, including web pages, PDFs from URLs, and local PDF files. We resolved any errors that arose during testing. βœ… Saved the code to GitHub: Chatgpt then guided me through the process of creating a new GitHub repository and pushing the code to the repository for safekeeping and easy access.

As a result, we successfully built a custom app that can scrape both web pages and PDFs from URLs or local files and output the extracted text to be used as input for ChatGPT. πŸ† #chatgpt #aimarketing #applicationdevelopment #sales&marketing tools

Sample Code

Custom Code

Want outbound that starts real conversations?

We design and run programs for technology partners and software companies.