Turn code screenshots into formatted code
The example runs three screenshots, Python, JavaScript and JSON, through one workflow, at 4 credits each: 1 to read and 3 to format.
Build the workflow
-
Make a workflow named “Format code” from scratch (Sort photos into folders).
-
For its empty step, choose AI → Format and set Format as to Code: Images → Format → Save.
-
To send results to Google Drive too, pick a folder in Save (Save workflow results to Google Drive).
Code keeps the indentation and drops file tabs and line numbers. Spelling fixed, the other choice, fixes clear misspellings in labels and notes.
Run it
Open Results and add the screenshots with Browse files. Each gives one result: its code, laid out.
Open a result: Code shows the formatted code, Original the text as read. Saved to, in its details, reads “Saving…” until the file reaches the Drive folder.
Drive receives the screenshot with a .txt file of the code.
What to check
The result's list of changes shows every place the code differs from the read, such as a missed quote. Check it against the screenshot.
Common mistakes
Expecting the code in the Library. Also save to → Library copies only images. Use Download, for a .txt file, or Google Drive.