My Automation doesn't continue after "Match Pattern"

I’m trying to create this automation but for some reason it isn’t going past the “Match Pattern”
What i’m trying to it does is:

  1. Look out for emails which have “Clean Reports in the title” there will be emails that come in that have the subject “John Smith has completed End of Clean Report”
  2. Get the report attachment PDF
  3. Get the name from the subject to know which cleaner the report belongs too
  4. Search in the “Clean Reports” folder in the google drive and see if there is a folder within there of the same name. eg. Clean Reports > John Smith
  5. Then through the router… If it doesn’t exist, create the folder and upload the PDF
  6. If it does exist upload the PDF in the persons folder.

(I understand the end bit could be incorrect also but I’ve not managed to get it past “search for Files/Folders” to test and tweak the end

If i remember correctly, as I’ve tried quite a few things, one of the debug messages mentioned the query, but I’m not sure what else I could add to the query

I also tried ChatGPT for help but unfortunately it’s not worked

One of the things it did ask me to try was:

It looks like the issue is that the $1 variable is not being recognized as the captured value from the Match Pattern module.
To ensure that the $1 variable is passed correctly, please make sure that the “Bundle Name” in the “Match Pattern” module is set to “Collection”. Then in the “Search for Files/Folders” module, set the “Query” parameter to 11. ${Collection[0]}.
This will pass the captured value from the “Match Pattern” module as the query parameter for the “Search for Files/Folders” module.

I couldn’t try it though because I couldn’t find where “Bundle Name” was.

Does anyone have any idea what I’m doing wrong?

First of all, for the title, “doesn’t continue after Match Pattern” is due to the setting in Text Parser,

Continue the execution of the route even if the module finds no matches

You need to check Yes, if you want to continue to next step if there is no result in Text Parser.

Moving ahead with the main issue, The regex you are passing is not correct, by which I mean the regex looks good the only thing not needed there is, \ \.

Use this Regular Expression,

^(.*?) completed End of Report

You can check the result here.

In The Text Parser, you can enable Case Sensitive to No and also enable Global match to Yes.


1 Like

Your amazing. Thank you Runcorn!
I had tested that regex101 (as ChatGPT) told me about it, and it came out fine, it didn’t have the / in though which i didn’t notice

as I had used this:

But Thank you, it has now passed the Match Pattern module… i would have never ever spotted or thought it was that.

I’m sorry to be a pain and ask another question, do you happen to know what i’m doing wrong here, as it’s getting stuck a the “Search Files/Folders” Module

it’s the query but I’ve tried all of them and ChatGPT is saying 11. $1 should work

Since your fix the “i” and “Fallback Match” now showup, they weren’t there before

I will delete the module and just try again with each one separately incase, if that doesn’t work would you have any idea why the query is saying invalid?

It might be due to mapping issue, try right clicking the text parse and run this module only and see if you are getting result in the module.


Hi Runcorn, Thank you for the fast reply, apologies i couldn’t reply back, i’ve only just been able to get back to it

I ended up getting it all working until the router, and i’ve just now managed to fix the end so it’s all working perfectly, Thank you again for your help. I wouldn’t have been able to get it completed without your kind help.

1 Like