Category: Technology

Posts that are tech related

  • Optimize Invoice Management with Google Sheets, Make.com, and Monday.com

    Optimize Invoice Management with Google Sheets, Make.com, and Monday.com

    Last week I went down a slight rabbit hole while trying to figure out if it’s possible to create an automated invoice generator using Monday.com with Google sheets. Which was surprisingly more difficult than I thought.

    Originally this whole tangent started with following my brother Gideon’s tutorial on how to create automated invoices using Monday.com, the primary function was the following:

    Make.com integration with Monday scenario

    When a button is pressed inside monday.com, the invoice generation process starts:

    • First, it pulls information on the invoice, including the Name of the invoice, invoice number, etc.
    • Second, it gets the customer info, such as Name, address, email, and phone number. (Which pulls from a separate list on Monday)
    • Next, it grabs the list of subitems; in this case, subitems on Monday will be the items ordered on the invoice and renaming all of the information into variable names, making it easier to pull from later.
    • It uses the “{{VARIABLE}}” tag, which registers inside of make.com. Then it creates a Google doc from a template I started at once. It uses Google Documents and downloads a copy as a pdf. Then it inserts it into monday.com onto a predetermined column.
    • Once all of that is done, it updates the status in monday.com to indicate it ran successfully, then deletes the original Google doc so as not to take up space inside your Google storage.

    This is all done within 10 seconds, excellent, and well organized. Most of it runs pretty well. The setup process is pretty self-explanatory when creating it and relatively efficient.

    invoice output
    invoice input template

    The only downside is that admittingly isn’t even that bad. If any items are not filled in, the slots will be blank. If you had two things and there were six slots, there would be four extra empty rows, which can be annoying but isn’t detrimental to the functionality of this invoice.

    A reason why you can’t have make.com automatically delete extra rows is because of the Google API for Google Documents. Currently, you cannot add HTML straight through Make. But a platform that you can edit easily through Make is Google sheets. Google sheets work on a row-by-row basis, as you can delete whatever row you want specifically. Since naturally, it isn’t in.pdf format.

    An issue with using Google sheets is the formatting. Naturally, Google sheets don’t have its file type, nor does it default to pdf when you export (although you can choose to export to pdf.) This wasn’t easy to figure out. For one, I got a download link to my spreadsheet, and when you went to it, it started a download. But two issues; Monday’s “upload a file” module did not support using links to insert files into their columns, the second issue is that the file was only downloadable to those who had permission to download it; I could set it as “public” manually but not automatically. So if Make tried downloading it, it would deny its request due to invalid authentication.

    It took a lot of time to Google and research different ways to save a file automatically. I ended up asking in the make.com forum. I then got a response a couple of hours later.

    You should use the “download file” module of the Google Drive application and toggle ON the advanced settings and select convert file to pdf. This way you can use your PDF downstream in your scenario without making your document public.

    In this case, I would need to use the “Google drive” module, which takes more work to set up when using personal accounts (as listed in the documentation.) But once it is set up, it works amazingly well. Very simple when uploading to monday.com from there.

    Next was figuring out how to delete the rows and how many to delete. This was a more straightforward task. I used two math modules, one with the following formula:

    The formula for the first math module

    This calculates what row to start deleting by using the number 11, the row at which the spreadsheet item list starts. “___IMTAGGLENGTH___” is a value that contains how many subitems there are (or, in this case, items for the invoice.) If there were two subitems, it would output the number “13” I then use this with a “delete a row” spreadsheets module, which deletes the row “13” (or whatever the math output is.)

    Next is another math module that uses 23 (the ending row number of the spreadsheet’s item list) and subtracts it from the previous math output. Using the last number example, this calculation would be 10, indicating to delete ten rows (there are 12 rows total in the spreadsheet)

    second math formula module

    and finally, the actual deleting module setup. Which consists of a “repeater” module that will repeat any action after as many times as you want, in this case, 10. Which I set to be the output of the second math module. After the repeat module is a “delete a row” module that deletes the row that the first math problem generates, it would delete row “13”, but since it is inside of a repeating function. It deletes rows 13 and 10 times. Since Google sheets work in a way when you delete row 13, the row after becomes row 13, thus when deleting row 13, 10 times. This I found to be the most efficient way, as there is no way to delete multiple rows in the “delete a row” module.

    Final module setup

    You can see the final result in the video below:

  • Spotting Fake Phishing Emails

    Spotting Fake Phishing Emails

    Yesterday I checked my Gmail spam folder, and I saw this email:

    Screenshot of the email header

    The contents of the email are a general threat of a typical phishing email with the following:

    It threatened to lock your various email accounts and asked for $950 sent to a BTC wallet. This is a pretty obvious scam in many ways, including that I have no actual email client setup, just a forwarding address. One interesting thing is that Gmail showed that it came from my email address.

    (in this case, [email protected]). I wanted to see if it’s easy enough to tell how it was spoofed. One way of doing this is viewing the original message, an unprocessed backend version of the email, including the email server logs, when Gmail receives it.

    Using that, you can check whether or not the email was spoofed, aka an email coming from an email address but making it look like it’s from your email. You can find out if it’s spoofed or not usually by checking this line in the original message; you can see mine here:

    Showing that the original IP does not certify the email because it isn’t allowed. I’m pretty sure Gmail checks for that line and sees if it’s a legitimate email, then throws it into spam if it gives a soft fail. And if you grab the IP location, its somewhere in India:

    IP details of email

    In general, you never want to click on any links or follow any instructions given by an email that looks suspicious; make sure you check the message by googling it first; I found many forum posts saying they got the same copy-paste email as I got, just a different email.

    And also, check that it’s not spoofed, as I mentioned before, or a lookalike email, for example:

    From: [email protected]

    faking the email with minor changes, it seems like it’s from [email protected].

    One more thing I found interesting is that in the original message, the email said it was from [email protected] but right after said: “Using Preegsr tmraipj” not sure what that means, and I can’t find any client called that; I’m guessing its a name, but it’s clumsy for someone to leave that in the “from” section.

    Informative posts I found while researching this:

    Explanation of each line on an email message

    How to check if an email is spoofed (in Gmail)

  • Tuning Acceleration on my 3D Printer

    Tuning Acceleration on my 3D Printer

    Yesterday I got my Printrbot Simple Metal plus running, I had gotten it previously running, but it had significant build issues, mainly with no ease of access of the motherboard, when I designed the adapter for the SKR 1.4 motherboard to fit into the old Printrbot motherboard slot, I had no way of accessing the SD card or the USB port without taking it out of the 3D printer. This time, I had a soldering iron, terminal crimps, extra wires, and most importantly, lots and lots of Zip Ties.

    Once built, I could get it up and running with Octoprint on my laptop server. Thanks to Paukstelis for the excellent Octoprint_deploy script, which makes it a breeze to set up multiple Octoprint instances, which shortened hours to only about 5 minutes of setup time.

    Then I PID tuned, which tunes the heater of the Bed and the Hotend, which tests to see how frequently the heater needs to start heating; for example, before a PID tune, the Bed would either heat over the mark with 63°, begin to cool down but then go below the mark by hitting 55°, then heating up too much. Back and forth, thus making an unstable temperature which can affect the print dramatically. By staying stable, you can see an example of before and after with the Octoprint temp graph:

    credit: u/copppypapper on Reddit.com

    Once PID was tuned, I test-printed a ghosting/ringing test cube model, which came back with this:

    test cube 1

    You can see the ringing from the “Y” letter by the bump around. And some lousy plastic trailing on the lines; I then decreased the acceleration, which is how fast it speeds up and slows down, which causes this foul ringing line around corners. And this was the second cube:

    Test Cube 2

    Unfortunately, I still had very similar results from the second cube after turning it down, there is a very slight difference, but the bump is still very much there. But after turning it down even more and slowing the print speeds. I got this result:

    test cube 3

    The third cube was a success. It had eliminated the ringing, with not even a bump before the letter. But at the cost of speed, which I can sacrifice for quality. There are also very inconsistent layer lines which you can see in the images,, which I am working to resolve to get a better, more consistent cube shape.

  • ChatGPT for Learning Programming?

    ChatGPT for Learning Programming?

    Recently I was curious and tested some simple questions with the new GPT 3.0 Assistant trained by OpenAI; I also tried to by using it with a small programming project using Python. Which is known as the most convenient language in many people’s eyes.

    The project used a simple 16×2 character display to display statistics about the server hosting the site you are reading this on, which is run locally on a Raspberry Pi. I wanted to see live status updates on my website from the comfort of my desk without logging into the Pi via SSH and pulling the data on the command line. So I found a starting point, a library made originally by The Raspberry Pi Guy with many simple demos on using the character display to display information.

    One problem is that I am not experienced in using Python and have only used it in minor tasks. So I was curious to see if I could use the AI model to help me create a python script. And I was surprised by the end result.

    First, I gripped a built-in script with the demos that I had downloaded to the Raspberry Pi, hooked up a 16×2 display I had lying around, and only had one minor bug before I could get the script properly running. The original python script was built for a different version of python and used a different version. It used:

    !/usr/bin/env python

    Instead of:

    !/usr/bin/env python3

    Which just states where the python library is located; in my case, mine was called Python3.

    Once I confirmed that the display worked, I started editing one of the files as a starting point for my script; the essential functions I wanted it to display are:

    • CPU temperature
    • Check if the correct system tasks are running
    • Ping the internet for a connection
    • Ping the website domain to see if the website is running

    I started with a demo script called netmonit.py, which pinged the local internet router and pinged google. Then displayed them on the screen one by one, this demo being the closest I chose it. Then I found a script on the raspberry pi forum, which grabbed the CPU temperature and stored it to a variable, (it also printed it out to the console, but I didn’t need that, so I deleted that part.) I then mashed those two together to produce a script that surprisingly worked. But it didn’t all work out of the box.

    This is where ChatGPT came in handy; the assistant was able

    1: Find errors, correct them, and give me back the corrected code

    2: It told me what I had done wrong and told me what to do to fix it.

    3: I could even remember what code I gave it before and use that information to help me in the following answer. (This only was useful for a minor part but was noticed)

    Here’s some example of what it fixed for me (please keep in mind I’m a novice in Python and programming, so these issues are primarily googlable:)

    I even used it to solve my errors for me:

    I am honestly amazed by some of the technology. Using the power of this AI and my knowledge of basic programming, I could build a script that did all of the tasks I had before listed and display them to my display. And this was the result, a working screen display for my desk:

    Conclusion:

    Some say this will replace humans in some jobs, and I can see why they say that. I don’t see it as something that can completely replace the position. This is far from perfect or even close. I even had issues with some of the code the AI gave me, like some of it is outdated or the code was mashed from different sources. I see it as AI will become a super helpful tool, especially in programming, but it will only be that for now. The AI works in the simplest sense, grabbing datasets from books and the internet. But I think ChatGPT says it best:

    To train me, OpenAI used a process called unsupervised learning, in which the AI system is not given explicit labels or examples to learn from, but is instead left to discover patterns and relationships in the data on its own. In my case, the data consisted of a large dataset of text from a wide range of sources, including books, articles, and websites.

    -ChatGPT, or “Assistant”

    I do not have access to any additional data or information beyond what was used to train me, and I do not have the ability to browse the web or access new information. I can only provide answers and generate text based on my training and the information that I have been provided.

    ChatGPT, or “Assistant”

    Learning, though, is where it excels, for most popular languages would benefit students in learning programming. A tool instead of a replacement in the programming space. This video by Joshua Morony really demonstrates how well it works and has an excellent summary, I would recommend watching it: