Macro triggered by wrong triggers? [SOLVED]

I have this macro that is set to be triggered when there are files in the following folders:

SCR-20250401-tstl

When I try to create a background from Todoist to a folder called "Inbox Global", which is not on the list of triggers, the macro gets triggered:

SCR-20250401-tswd

Any reason why this is happening? It doesn't make sense...

Just to double check: Is the path on the last trigger the path for "Inbox Global" or is there actually another folder called "_Inbox Global"?

It's _Inbox Global inside iCloud
The final destination folder is without _
~/My Files/Inbox Global

So, files added here:
~/Library/Mobile Documents/com~apple~CloudDocs/_Inbox Global

are moved here:
~/My Files/Inbox Global

as well as the other triggers.

Thanks for the clarification. Quite perplexing. What does the KM engine log say? It should show precisely which trigger triggered a given macro.

1 Like

In cases like this, I always create an action like this:

image

This will tell me what I need to know about why and how it triggered.

2 Likes

Thank you for the tip on checking the Engine.
It had this:

2025-04-02 01:02:46 Execute macro “Move files and folders to Inbox Global automatically” from trigger Anything is added to folder “~/Downloads” (ignoring partial or changing files)

I remember seeing the error today:

2025-04-02 01:01:57 Get File Attributed failed to get attributes for /Users/dannywyatt/Downloads/.com.todoist.mac.Todoist.eA6ZGP with error The file “.com.todoist.mac.Todoist.eA6ZGP” couldn’t be opened because there is no such file. in macro “Move files and folders to Inbox Global automatically” (while executing :warning: Get File Size to Variable “Local__sizeB”).

So I made hidden files visible, tried to export the file, just letting it open the Save window and I noticed that even though the window shows the Inbox Global folder, the .com.todoist.mac.Todoist is created inside Downloads, which is weird. It stays there for a while and then gets deleted without me doing anything.

What's weird is that I get this last error, even though I have this to ignore dot files:

image

(the comment action is just a link to a topic I wanted to save that's related to the macro, so ignore that action)

I could be wrong, but my guess would be that, since Todoist is just a web app in a wrapper, it's doing something silly such as downloading to your default downloads folder and then moving it to where you actually want.

Has this measure successfully ignored other dot files? If you're not sure, perhaps consider testing it because I think your %TriggerValue% won't be the actual file name but rather the path that was triggered (if even that, I'm not sure I've ever used the trigger value token before).

[edit] Ah, yes, per the Trigger Value wiki page:

Folder Trigger Path of the file that was added or removed.

1 Like

That was exactly what you said!

It wasn't ignoring dot files, so the dot file in Downloads would trigger the macro and the macro would do its thing by moving it from Downloads to Inbox Global. Now I changed it to this:

image

Now everything is working as expected.
Thank you so much! :raised_hands:

1 Like

This is a good action to save as a favorite.
It would actually show me that the action to ignore the dot file was not targeting the filename, but the path, just like @hemicyon mentioned.

Thanks!