DEV Community

Cover image for n8n: The noob is on the loose
Anna Villarreal
Anna Villarreal

Posted on

n8n: The noob is on the loose

n8n and Bright Challenge: Unstoppable Workflow

This is a submission for the AI Agents Challenge powered by n8n and Bright Data

What I Built

My journey consisted of several ideas. But here is the most creative one:

Digital art of the people. This takes random comments from videos on TikTok and YouTube, combines them into a string to be used as a prompt for image generation, it then outputs the created image with an inspiring quote. Meant to serve as a source of inspiring community-based digital art.

Demo

"Art of the People" workflow - This is a long story.

I tried posting to Facebook, and making a discord bot to output the images. I was generating some pretty cool stuff from random comments.

amazing image 1

and more samples as evidence...

amazing image 2

Facebook involved privacy issues due to my settings, and I was having trouble saving binary data and retrieving it properly for future use. Keep reading, this is nothing.

n8n Workflow

Art of the People Gist

Technical Implementation

Brightdata Node: Used twice to grab comments from TikTok and Twitter
Database: Postgres
Prompt for AI to generate Image:


Create an image using the following expression:

{{ $json.combinedString }}

Be creative, use bright colors and patterns and geometry. Opt for a mixture of inspiring, spiritual, and cyberpunk themes.

Send all of the image data to the next node for processing. Only ONE image is to be generated from the expression.

Enter fullscreen mode Exit fullscreen mode

Bright Data Verified Node

I used the Brightdata node to pull in comments from a TikTok and YouTube. I then extracted a comment from each source, and combined it into a string. This unique string was then used as the prompt for image generation. The idea here is that the voices(comments) of the people across various platforms can be unified to generate a digital representation of peoples interpretation of a song or artist. I created an online community art project.

Journey

This was a monumental learning journey for me. I started and scrapped several ideas. Some things worked, others did not. I am a beginner, so I will share my adventure.

Mostly-working situation, where I was trying to upload my inspiring posts to Facebook:

So close...

I ran into permission issues because of privacy settings that I refuse to change. I tried a discord bot, and succeed to post random quotes from my database. The image that was supposed to go along with the quotes, well, turns out the binary data didn't save correctly. I had a bunch of useless data in my database. Something happened during saving to postgres where it cut the binary file, and only saved the first 6 to 8 characters or so. Very strange, but at least I discovered it instead of bumping into walls repeatedly.

At one point, I was having a great time. Then suddenly, I had accidentally sent 24,000+ Gemini API requests. I can tell you from my experience, your wallet will be sad.

API Request Fail

I learned about quotas and managing API requests REALLY fast after that. I quickly ran out of the ability to use Gemini/OpenAI because of this, which added to the drama of not being able to complete my project in a timely manner.

Friendly reminders:

Friendly reminders

I researched other ways of using AI for free, but because of a self-induced time constraint, I was in a deadlock. XD I'll be finishing this project up in due time. I have plans to run AI locally so I don't accidently run up a $1300 API bill. This is a steep price for a student!

I tried using my already generated images that I had saved to push an inspiring quote to discord. I was met with further troubles.

Semi-Success

A few additional things I learned/firsts for me during this process:

  • Setting up n8n as a self-hosted version on my VPS. Configuring all of that, doing reverse-proxy and stuff, all new territory. That process alone was long. I configured it to be accessible on my VPS from anywhere. That was pretty cool!
  • Learning the n8n software and the nodes available, and how to make them interact with one another in meaningful ways.
  • I started to investigate handling binary images so that I could save them to my database and recall them later. (Disaster...)
  • I learned at one point how to use a webhook with a discord bot to send messages to my server.
  • I also created a custom csv that I imported to my database so I could have my very own quotes on hand.

Some of my other projects I tried were:

  1. Automated marketing for my Shopify store.
  2. An event scraper, to run a a schedule and add new events to the database for my app govend, that helps connect vendors to events.

I was able to actually get this particular workflow to work for me, although it does not include Brightdata. It does however provide me a data backbone for my app, and notify users when events are added! Yay!

working workflow

If you want to see the app where it's helped me out at, you can visit GoVend - an app I am working on. Notice how google maps isn't working since I destroyed my entire account with too many api requests. Btw, Here is more hard evidence just for fun:

Too Many requests

  1. Lastly, (or should I say firstly?) I used an agent to chat with my database to make changes. That is both an interesting a scary power. LOL

I learned ALOTTTTTTTTTTT!

Top comments (0)