# Macro based on changes?

**URL:** <https://forums.distill.io/t/macro-based-on-changes/3076>\
**Category:** Help and Support\
**Tags:** macros\
**Created:** [February 21, 2024, 4:37pm UTC](https://forums.distill.io/t/macro-based-on-changes/3076 "2024-02-21T16:37:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![caisamuels](https://forums.distill.io/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@caisamuels](https://forums.distill.io/u/caisamuels)\
**Post date:** [February 21, 2024, 4:37pm UTC](https://forums.distill.io/t/macro-based-on-changes/3076/1 "2024-02-21T16:37:21Z")

</div>

I was wondering if it is possible to run a macro specifically on a new element added. I have a page that has a grid of elements and I’d like the macro to click on any new elements that appear within the grid. Is this possible and if not could this be added?

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [February 22, 2024, 5:01am UTC](https://forums.distill.io/t/macro-based-on-changes/3076/2 "2024-02-22T05:01:22Z")

</div>

A macro has access to two sources of information: steps in the macro and page’s elements. Depending on use case, it may or may not be sufficient to find the new elements in a list. Can you share more details about the kind of list being monitored and how things get added to or removed from the list? Thanks!

---

<div class="post-metadata">

**Author:** ![caisamuels](https://forums.distill.io/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@caisamuels](https://forums.distill.io/u/caisamuels)\
**Post date:** [February 22, 2024, 11:36am UTC](https://forums.distill.io/t/macro-based-on-changes/3076/3 "2024-02-22T11:36:41Z")

</div>

It is a grid of products similar to Amazon where items get added and removed at random intervals. Ideally, I want a macro that will click on any new item as soon as it appears. Any new items can appear anywhere in the grid so it cannot be predetermined.

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [February 22, 2024, 4:04pm UTC](https://forums.distill.io/t/macro-based-on-changes/3076/4 "2024-02-22T16:04:38Z")

</div>

Can you share the link? Is the new item added at an arbitrary position or at the top (or bottom)?

---

<div class="post-metadata">

**Author:** ![caisamuels](https://forums.distill.io/letter_avatar_proxy/v4/letter/c/db5fbb/32.png) [@caisamuels](https://forums.distill.io/u/caisamuels)\
**Post date:** [February 22, 2024, 4:18pm UTC](https://forums.distill.io/t/macro-based-on-changes/3076/5 "2024-02-22T16:18:10Z")

</div>

Unfortunately I cannot share a link as the website is password protected, but yes, it is added at an arbitrary position.

---

<div class="post-metadata">

**Author:** ![ajitk](https://forums.distill.io/letter_avatar_proxy/v4/letter/a/ec9cab/32.png) [@ajitk](https://forums.distill.io/u/ajitk)\
**Post date:** [February 23, 2024, 7:38am UTC](https://forums.distill.io/t/macro-based-on-changes/3076/6 "2024-02-23T07:38:36Z")

</div>

Can you share a screenshot to give an idea of what it looks?

The key challenge is finding the new item in the list. Is there a way to sort the list too by clicking a button? It is easy if the list could be ordered so that the new item is either at the top or the bottom of the list.

If the list can’t be sorted, only solution I can think of is by making change history’s data available to the macro and using that to find the element to click. This is something we plan to support in the near future.

---

<div class="post-metadata">

**Author:** ![kwatson2](https://forums.distill.io/letter_avatar_proxy/v4/letter/k/e9bcb4/32.png) [@kwatson2](https://forums.distill.io/u/kwatson2)\
**Post date:** [December 11, 2025, 3:12am UTC](https://forums.distill.io/t/macro-based-on-changes/3076/7 "2025-12-11T03:12:52Z")

</div>

Is it possible to feed the change history data to the macro and use that to find an element to click now?

---

<div class="post-metadata">

**Author:** ![srijith](https://forums.distill.io/letter_avatar_proxy/v4/letter/s/c77e96/32.png) [@srijith](https://forums.distill.io/u/srijith)\
**Post date:** [December 11, 2025, 6:49am UTC](https://forums.distill.io/t/macro-based-on-changes/3076/8 "2025-12-11T06:49:49Z")

</div>

@kwatson2 Thanks for the thoughtful suggestion! While this isn’t currently possible — macros can’t yet access change history to identify and act on newly added elements — it’s a use case we’ve considered and may support in a future update. We’ll share more as it develops, and appreciate your interest in pushing the boundaries of what Distill can do.
