ChatGPT Built a Working Exportable Macro that Imported to Keyboard Maestro Without Errors

After a lot of trial and error, I finally got from ChatGPT (v5) a fully working, exportable Keyboard Maestro macro that I can import into my library without edits.

I wanted to automate a workflow for generating a customized AI prompt to summarize Zoom meeting transcripts and this could be used for any Keyboard Maestro macros feeding Prompts into ChatGPT.

Early attempts failed because ChatGPT didn’t replicate Keyboard Maestro’s exact internal schema for actions like Prompt For User Input, Set Variable to Text, and others. The macro files wouldn’t import.

The fix was simple but important: I exported small reference macros from my own Keyboard Maestro setup (that ChatGPT asked for which was new) that contained the specific actions I needed (e.g., prompt fields, clipboard actions, URL opens, app activation, command keystrokes). By sharing those with ChatGPT, it was able to read the structure and generate a .kmmacros file that:

  • Prompts for meeting date and the transcript (a Zoom Summary in my case that I wanted edited)
  • Assembles the full AI prompt text and my supplied text
  • Copies the prompt to the clipboard
  • Opens ChatGPT desktop app, pastes, and submits automatically
  • It gave option for going the ChatGPT website route and I prefer the desktop app

The final file imported cleanly and works perfectly — zero manual edits required.

Tip: If you’re using ChatGPT to build macros, always provide it with small example exports of the actions you want. That way, the generated macros match Keyboard Maestro’s format exactly and import without errors.

Here the ChatGPT generated macro I was able to import. The pauses needed adjusting and the pause until action was my 2 cents.

A simple macro with limited actions and a step forward in getting ChatGPT to work with Keyboard Maestro.

Keyboard Maestro Export

3 Likes

What do you mean by "export/import"?

Did it generate a .kmmacros file for you? If so... WOW.

Thanks for asking for clarification. Yes, I prompted ChatGPT for a Keyboard Maestro macro that would edit a Zoom summary in a particular way. At the end of the session with ChatGPT, it exported the Keyboard Maestro macro that I double-clicked and it imported and ran in Keyboard Maestro without errors.

Here is the file that is actually three macros of which I've only tested one:
Senior_Zoom_Summary_FULL.kmmacros (16.4 KB)

Below is the session with ChatGPT if you want to see the process of getting this to work. It got really interesting about halfway down when it said:

"If you’d still prefer an importable file, export any simple macro from your setup and send me the resulting .kmmacros (it contains the exact schema KM expects). I’ll mirror that structure precisely and rebuild the three macros for you."

From that point on, It felt like exploring new territory. I was skeptical and excited at the same time and why I wanted to share it here. I haven’t tried anything further and it'll be interesting to see how far this might go with more complex macros actions and variables.

I had previous spent a bunch of time trying to get ChatGPT to write and export a KM macro that I could import into Keyboard Maestro and failed. It was exciting to see it finally work. Yea, WOW!

1 Like

24 posts were split to a new topic: ChatGPT Musings

This sounds very important to me as my experience when people email me for support because their AI generated macros don't import is that the XML is completely broken (which, of course, is not something I can support!).

Taking existing XML and carefully editing the various parameters is something that can be done reasonably safely as long as you take in to account XML quoting for special characters (or avoid special characters). Generating a valid XML from scratch is much more difficult.

Always remember, LLM answers are always an answer to the question "What would a response to this look like?". Nothing more, nothing less. They are not answering the question "What is the answer to this question?" instead they are simply answering, "What would a reponse to this question look like?"

Rule for use of LLMs - you must be able to state one of these:

  • It does not matter if the answer is wrong.
  • I can verify if the answer is correct.

If you cannot state one or other of those statements, then you are on shaky ground using an LLM to get answers.

9 Likes

Thank you for providing essential boundaries I omitted in my hasty excitement. The simplicity of this is brilliant and argues another fundamental rule I now obviously failed to follow:

  • Think long and deeply before publishing.
1 Like

Don't think too long or too hard - it is quicker to learn with more people involved.

8 Likes