ENDEBook a demo
← Back to all tasks

Multi-application workflows

Help me export the first image from the doc file attached in the most recent email in Notes folder, and set this image as the new desktop background.

Result
Solved
Points
1 / 1
Steps
12
Duration
7 min 2 s

Evaluation criteria

  • Checks that the saved image looks the same as the expected image.
View the task definition in the OSWorld repository

Final response

Done! I exported the first image (image1.png) from the attached doc file in the most recent email in the Notes folder and set it as the desktop background. The image is saved at /tmp/docx_extract/word/media/image1.png and the background has been updated.

Trajectory

  1. Step 10:01

    I need to find the most recent email in the Notes folder, which has a doc file attached. Let me first click on the Notes folder to see its contents. I'll draft a plan first.

    • Plan created
      1. Open Notes folder and identify the most recent email with a doc attachment
      2. Save/extract the attached doc file to disk
      3. Export the first image from the doc file
      4. Set the exported image as the desktop background
  2. Step 20:14

    The plan is drafted with 4 subgoals. I need to commit it to unlock execution tools, then start working on opening the Notes folder to find the most recent email with a doc attachment.

    • Plan confirmed4 subgoals
  3. Step 30:27

    I need to start with subgoal 1: open the Notes folder in Thunderbird to find the most recent email with a doc attachment. I can see 'Notes' in the left sidebar under the Deleted section.

    • Clickthe Notes folder in the left sidebar under Deleted
  4. Step 40:59

    I need to click on the most recent email 'Document Attached' to see its attachment.

    • Clickthe 'Document Attached' email from XLang HK in the message list
  5. Step 51:28

    I need to save the attachment to disk. I'll click the 'Save' button at the bottom right of the attachment bar to save it to the Downloads folder (or default location).

    • Subgoal completedIdentified the most recent email in Notes folder: 'Document Attached' from XLang HK (8/3/2024) with attachment attached_file.docx (1.6 MB).
    • Clickthe Save button at the bottom right next to the attachment
  6. Step 62:06

    I need to save the file to a known location. I'll click on 'Downloads' in the left sidebar to navigate there, then click Save to save the file.

    • Clickthe Downloads folder in the left sidebar of the save dialog
  7. Step 72:29

    Now I need to click the Save button to save attached_file.docx to ~/Downloads/

    • Clickthe green Save button in the top right of the dialog
  8. Step 83:01

    Now I need to extract the first image from the .docx file. A .docx file is a ZIP archive containing images in word/media/. I'll use the shell to verify the file exists and extract the first image.

    • Shell commandls ~/Downloads/attached_file.docx && unzip -l ~/Downloads/attached_file.docx | grep 'word/media/' | head -20
  9. Step 93:20

    The file is saved to disk. Now I need to extract the first image (image1.png) from the docx and set it as the desktop background. I'll use unzip to extract it, then gsettings to set it as wallpaper.

    • Subgoal completedFile saved to ~/Downloads/attached_file.docx. Contains images: image1.png (1.5MB), image2.png, image3.png, image4.png.
    • Shell commandcd ~/Downloads && unzip -o attached_file.docx word/media/image1.png -d /tmp/docx_extract && ls -la /tmp/docx_extract/word/media/image1.png
  10. Step 103:51

    The first image is extracted. Now I need to mark sg-3 as done and set the image as desktop background using gsettings.

    • Subgoal completedFirst image (image1.png, 1.5MB) extracted from the docx to /tmp/docx_extract/word/media/image1.png.
    • Shell commandgsettings set org.gnome.desktop.background picture-uri 'file:///tmp/docx_extract/word/media/image1.png' && gsettings set org.gnome.desktop.background picture-uri-dark 'file:///tmp/docx_extract/word/media/image1.png'
  11. Step 114:27

    The gsettings command ran successfully (exit 0). I need to verify the background was actually set by reading the value back, then mark the final subgoal as done.

    • Shell commandgsettings get org.gnome.desktop.background picture-uri
  12. Step 124:49

    All 4 subgoals are complete: (1) identified the most recent email in Notes, (2) saved the docx attachment, (3) extracted the first image (image1.png), (4) set it as desktop background — confirmed by gsettings read-back. Time to finish.

    • Subgoal completedDesktop background set to image1.png via gsettings, confirmed by read-back showing 'file:///tmp/docx_extract/word/media/image1.png'.
    • Reported as completed