I am having some trouble with a scenario for an e-commerce store.
My Goal
My goal is to have a scenario that when triggered pulls from a database of prompts and chooses the next prompt on the list every time it runs. When it gets to the end of the list it should start again at the top (is this called autocycle?).
Once, a prompt is pulled from the database it then goes to the DALL-E 3 Module to generate an image. So, I want the scenario to create a different type of image based on the prompt from the database each time it is run.
To complete the scenario:
I use GPT-4 Vision to look at the image and give it a product name.
Then I resize the image using Mallabe module
Next is the router which sends the resized image and the product name to three different routes
Each route is a different apparel product shirt, shorts, and sneakers
Each route uses the product name and the resized image to write a product description, then uploads the image, product name, and product description to Printify
What I Have Tried
I am using the Data Store [get a record] module to get the prompt from the data store. The piece I am missing is how to get the scenario to move down the list of prompts each time it runs.
I have tried the iterator module, the Data Store [search record] module, and the increment function. I am not sure which modules to use or which order to use them in.
Please Help!
I have searched the forum to no avail, I think because I am not using the right search terms. So, I thought I’d ask for help.
Then, I think all you need to do is insert a “last used” date column into your data store, so that in the data store trigger module, you can filter results to get the oldest used (or unused) item.
Then, immediately after getting your data store result, you just have to set the “used” date for the current item to {{now}}
I got it so it updates the last used date for the prompt.
One problem I think I see is that it’s using the key value to call the record and that is hard coded. So, it’s going to pull in the same prompt and keep updating the timestamp unless that key value is a variable too? Does that sound right?
I was trying to set up a filter so that it would not give me the most current. But even there the key value is hard coded.
And how would this work when I have ten items or more in the database?
No, you map the searched item’s key into that Key field, so it will know which item/row to update.
Take a look at my screenshot again.
You don’t use a scenario filter for this. Doesn’t the Data Store “Search Records” module already have a filter option built-in? BUT, you don’t even need a filter – see below
You don’t tell it to “advance” – that’s the beauty of it.
1. If you have a new question in the future, please start a new thread. This makes it easier for others with the same problem to search for the answers to specific questions, and you are more likely to receive help since newer questions are monitored closely.
2. The Make Community guidelines encourages users to try to mark helpful replies as solutions to help keep the Community organized.
This marks the topic as solved, so that:
others can save time when catching up with the latest activity here, and
allows others to quickly jump to the solution if they come across the same problem
To do this, simply click the checkbox at the bottom of the post that answers your question:
3. Don’t forget to like and bookmark this topic so you can get back to it easily in future!