We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Engine Works

Under the hood of Alteryx: tips, tricks and how-tos.
aiahwieder
9 - Comet

This article is part of the Alteryx Obscura Blog series. Alteryx Obscura is the Inspire session dedicated to all things non-analytics, highlighting what the software “can” do rather than what it’s “supposed” to do. 

 

In between bouts of uncontrollable sobbing at the sound of a baby crying (IYKYK), I had the tremendous honor this past May of presenting the second-most mom-coded Obscura project to ever grace the Inspire breakout stage: Plan to Alteryx!

 

Microsoft Copilot has generously suggested that my deck “delved into various aspects of leveraging Alteryx for data-driven decision-making and enhancing business processes,” and I suppose that is accurate insofar as I take the business of making dinner for my family very seriously. I use an immensely helpful tool called Plan to Eat, which combines recipes, grocery lists, and menu plans that everyone can access—but these efficiencies were not enough for me, a Type A Superparent prone to hyperfocus. I needed more.

 

The Central Problem

 

It’s easy to get stuck in a dinner rut, especially when you’re trying to integrate complex factors into an on-the-fly decision that somehow must be made 13 minutes before you meant to start cooking. But what if you had a robust dataset that enabled you to delegate that choice to a machine? At its core, there are three main considerations:

 

  1. What’s in the fridge? Is it expiring? Has it already expired? Ew, time to chuck that one . . .
  2. What won’t they eat? Why does this kid want chickpeas and shrimp but refuse to eat mashed potatoes? Can I sneak something green into this sauce? Okay, so if I can’t use that ingredient, what are my remaining options?
  3. Are we all bored of it? Am I bored of cooking it? Can I even stand to look at it anymore?

 

Happily, Plan to Eat can quantify, organize, and filter for all these criteria... but only manually, one meal at a time.

 

Source: GIPHY

 

The Grocery Store

 

I had already invested countless hours in tagging, rating, and categorizing my dinner recipes, so the metadata was strong and standardized. Sadly, it turns out that there is no magic download button to pull the complete details from Plan to Eat into, say, a tidy little CSV. How disappointing! I would have to scrape the site using my login credentials.

 

Surely, I thought, I can use Python for this. But it turns out I am Too Extremely Novice at Python for this, even though I am aware that data scraping is an incredibly basic use case, and so I bravely proceeded to hope that another user had met with and conquered a similar challenge.

 

Happily for me, the gracious and talented @AkimasaKajitani had precisely the tool I needed! I added in a few bells and whistles of my own, since the volume of data I was trying to retrieve hit some limits on server timeouts:

 

  1. Iterator to batch retrieval jobs

    image001.png

     

  2. Nested iterative macro to limit server timeouts

    image003.png

     

    image005.png

     

If this looks “too simple” to solve the server timeouts entirely, you are correct; however, using this method, I was able to scrape the source code for about 200 recipes (previous timeouts were capping this number around . . . 5?), and this proved a sufficient volume of data to proceed with the next step!

 

The Mise en Place

 

Now it was time to prepare and blend what I had scraped—set the data mis en place, if you will. In addition to the recipes themselves, I did a manual scrape to pull a table that gave me some added data points, which I parsed in the main app:

 

  1. data_rating: After I make a meal, the family votes on how many stars to award it (out of a possible 5, although some dishes have been so popular there have been requests to rate them “ONE ZILLION”).
  2. planned: Plan to Eat logs every time I put a recipe on my menu schedule!
  3. recipe_title and recipe_photo: Recipe name and URL of the image associated with the recipe; self-explanatory.
  4. taxonomy_tags: Self-assigned tags that characterize the recipe as a soup, a stew, a cake, vegan, vegetarian, etc.
  5. meatless: Boolean that determines whether a recipe can be used on a designated “meatless” day, like Meatless Monday.

 

image007.png

 

Then, I pulled together a list of the ingredients in the recipes I had scraped and did some manual categorization by key attributes:

 

image009.png

 

Blending these two tables with my recipe database yields a parsed, scored, and flagged table that’s ready for selection—let’s cook!

 

image011.png

 

Just Add Heat

 

Once everything is chopped and simmering in the pot, it’s time to take it easy and let Plan to Alteryx make the tough choices. Because no recipe ever turns out the same way twice, a random integer helps prevent the workflow from producing identical results even when the criteria remain unchanged on consecutive runs.

 

image013.png

 

Sprinkling in a few Interface tools turned this standard workflow into an app that allows the user to input those three criteria that I named up at the top:

 

image015.png

 

Plating and Serving

 

But you can’t just dump a bunch of spaghetti on the table, right? The last secret step is a little more Download tool and a lot of Reporting to produce a menu worthy of the ‘gram:

 

image017.png

 

Back to the Test Kitchen

 

The version of Plan to Alteryx that I presented at Inspire 2025 was the one I could cook up in time for the conference, but no recipe is safe from tinkering! What will be in the next version? Here’s a wish list:

 

  1. Improved scraping: I refuse to be defeated by Python.
  2. Solving for repeats: There are still instances where the same recipe pops up in an extended menu plan, and we can’t have that, can we?
  3. Dynamic metadata analysis: Automate all the things!
  4. Exportable grocery lists: Either a full push to Instacart (!) or just a printable list you can take to the store.

 

Tips & Tricks to Take Home

 

I love to build analytic apps to delight end users with the simplicity and ease that Alteryx can provide. But testing them is often labor-intensive and slow, especially when debugging must be done in a separate workflow window! To streamline the update of test variables, I like to use Workflow Constants:

 

image019.png

 

By entering values in the Workflow tab of the Configuration panel, I can call these variables in many places on the canvas. This allows me to use the standard workflow Run functionality to test the impact on my analytic app! Prior to developing Plan to Alteryx, I’d used them in Formula, Input Data, and Output Data tools to create dynamic file paths:

 

image021.png

 

image023.png

 

In these implementations, the Interface tools don’t even require Action tools to connect! For Plan to Alteryx, however, I had to get a little more creative and include an Update Value to get it working on:

 

  1. Text Input

     

    image025.png

     

    image027.png

     

    image029.png

     

    image031.png

     

  2. Generate Rows

 

image033.png

 

image035.png

 

Once I got this set up, I was able to test dozens of inputs with a mere Control-R! If you’d like to try out the more basic use cases, I have a sample workflow below that can illustrate this in more detail.

 

Conclusion

 

Even exploring the edges of what has been done, the Alteryx Community comes through over and over with reusable solutions to pieces of just about any problem. Also, I can automate some pretty wild stuff, but at the end of the day, there’s no substitute for time spent at the table as a family! Here’s some steak:

 

image037.png

Comments
Kenda
16 - Nebula
16 - Nebula

Love this! I'll have to check out that app👍

BS_THE_ANALYST
15 - Aurora
15 - Aurora

@aiahwieder this is inspiring. I love this concept!

 

I was just checking your App Interface out (which is amazing). I'm curious if this part is dynamic & if yes, how did you facilitate that 😏. If not, could it be 😉?

BS_THE_ANALYST_1-1755176933595.png

 

For your next steps, 

  1. Improved scraping: I refuse to be defeated by Python.
  2. Solving for repeats: There are still instances where the same recipe pops up in an extended menu plan, and we can’t have that, can we?
  3. Dynamic metadata analysis: Automate all the things!
  4. Exportable grocery lists: Either a full push to Instacart (!) or just a printable list you can take to the store.

 

I think I could certainly lend a hand with the improved scraping. I'm curious if you checked if there's an API? You could email the team directly and see if that's available. There's a github here, interestingly: https://github.com/ros1995/plan-eat . If not, browser automation can be achieved with things like Selenium (or Playwright if you're fancy & I think playwright is better). @DataNath wrote a linkedIN post about scraping with playwright. Could be worth digging that out 🤔. If you want to know more about scraping in general, I'd look at this channel: https://www.youtube.com/@JohnWatsonRooney it taught me a bunch on how to uncover things like hidden APIs + he's showing the latest/greatest methods😏👀

 

For the exportable grocery lists, I think an LLM would be a great idea for this scenario. Integrate an API call to OpenAI? I even think there's agents nowadays that allow you to add things to the basket etc. I was reading @cgoodman3's LinkedIN post on a Chatgpt Agent with adding things to a basket (thanks for that Chris 👍).

 

Thanks for sharing, @aiahwieder ! 🔥

 

 

aiahwieder
9 - Comet

@BS_THE_ANALYST Thank you so much! I would definitely love to collaborate. Here are at least partial answers to your questions!

 

That part of the interface is what I would call semi-dynamic, and making it more dynamic falls under Enhancement #3. Here's how it currently works:

 

The static and manual piece is that ingredient table you see in "The Mis en Place"; it feeds into this little container, which generates the checkboxes and drop-downs for the ingredients: 

aiahwieder_0-1755178317260.png

 

So if I could develop a way (probably using an LLM, I guess? or perhaps just More Python) to groom the ingredients directly from the recipe data, then yes, absolutely, this could be fully automated and dynamic!

 

Would love some help with the scraping; I tried both Selenium and BeautifulSoup, and it's still not clear to me whether the block was my skill level or some kind of security-related impediment imposed by the admin settings on my work computer. 🤔 There is no API, that was my first thought as well and I reached out to the developers to see what might be possible, but it's a very small family-run service and frankly they keep pouring more features into the mobile app so I'd say their priorities are in order!

aiahwieder
9 - Comet

@Kenda Plan to Eat was such a game-changer! I'm not exaggerating when I say it might have kept us alive during the most restrictive periods of the pandemic in 2020.

Garrett_Stoker
8 - Asteroid

Love this. If you want a good stress test, my wife has allergies to gluten, dairy, soy, rice, and corn. I'll help with the Python if you need it!

aiahwieder
9 - Comet

@Garrett_Stoker . . . you're hired!!! 😏

AkimasaKajitani
17 - Castor
17 - Castor

Hi @aiahwieder ,

 

I'm glad my blog post was helpful. If you need to log in a web page, Python is certainly the best option, but I wrote that blog for users who still want to do it with Alteryx. That said, it's a pretty technique, so if you're fluent in Python, Python might be easier... However, the Python tool is heavy, so I prefer the light-weight Download tool.

 

By the way, the screenshots above are mouthwatering. This recipe site is very interesting😆

Hub119
11 - Bolide
11 - Bolide

Great stuff @aiahwieder!  If you bundled the recipe selection portion of your app into an iterative macro (iterating the list of selected menu items) you could use that to then join against your overall available recipe list (based on selected criteria) and just use your left/right output (depending upon how you set up) to pull in only recipes that have not already been placed on the menu.  That should solve your repeats problem.  The only problem you could potentially then run into is if your generated calendar is for more days than you have available recipes that meet your selection constraints... so may want to build in an error check for that or an interface selection to allow for repeats if/when this occurs.

Pilsner
13 - Pulsar

What a great idea @aiahwieder, solving a problem we all have, by using Alteryx! I apprechiate the reminder about workflow constants a lot too. I don't utilise them nearly enough yet they offer so much flexibility.

aiahwieder
9 - Comet

@AkimasaKajitani Dinner at my house whenever you find yourself in New York City! I agree, Python is vastly the superior solution, but you saved me from missing the presentation deadline!

aiahwieder
9 - Comet

@Hub119 . . . so you're saying the answer is ALWAYS iterative macros? @clmc9601 will be pleased!

 

I'll give this a try, though, because my previous attempts were upsettingly clunky, and there could even be a "reset" state where the list repopulates and the whole thing starts again . . .

lwolfie
11 - Bolide

I so need this in my life!  So many considerations to take into account!