Error in Mail Triggering the process


I am testing the standard email trigger automation(GitHub - robocorp/robot-email-decoder: Decodes email attachments to work item files when used as the first step in email triggered process). I am using this process alone, not connected to any other task/process.
It is triggering the process and fetching the data correctly from mail but getting an error “Error: Could not resolve what task to run. Select one using --task option.”
I have removed the work-items-in folder from the devdata folder and also added a step what task to run but still facing the same error.
Here attached some files for reference.

Thanks in advance for the support.

Hi @Sree,

I tried replicating your scenario but I couldn’t obtain the error you have, so let’s see what’s different on your side compared to how I’ve done it:

  1. Took the latest code from Portal robot (GitHub repo) on my machine. (git clone or simply download of robot structure)
  2. From VSCode with Robocorp extension installed, I ran Cmd/Ctrl+Shift+P → “Upload Robot” and selected the bot name (robot-email-decoder) then the Workspace and destination robot on the Control Room side.
  3. In Control Room I created a new Process and selected as Step 1 from the robot above the following task: Decode Parsed Email To Work Item.
    a. Then enabled e-mail triggering for the Process.

  4. Went to my GMail and sent an e-mail like the following (subject, body and an attachment image):
  5. The Process got triggered automatically with the following Work Item passed to the Step 1 configured above:

    a. And the Process finished successfully with the following expected log:

This is the robot logic that was executed for the Step above:

Decode Parsed Email To Work Item
    # With "Parse email" Control Room configuration option enabled.
    ${email_parsed} =    Get Work Item Variable    email
    Log Dictionary    ${email_parsed}
    Log To Console    ${email_parsed}[body]

    # E-mail attachments are already available as Work Item files.
    @{files} =    List Work Item Files
    Log List    ${files}

Hopefully, you can use this recipe on getting your flow fixed (at least try mimicking exactly the steps above, then do your customizations and see what broke the flow), otherwise please provide to us more info like following:

  1. What’s your robot.yaml file? Have you changed it?
  2. Are you using our default Cloud Container in CR as an environment or a custom one with WFA running on?
  3. Can you send to us the full content of console.log file? Look for Run artifacts in your Step Run:

Hi Cosmin, Thanks for the clear instructions. Now, able to run the process (Email Trigger) alone. I have downloaded the latest version of the Robot file from the link shared above and tried. Can you please share any templates/samples that having/using Email trigger process to run the Actual process (or) Any guidance/support doc for connecting Email Trigger process to any other processes. Let’s say we have any pdf/input file in mail (Triggering mail) which can be used as input/work items for Actual process.

1 Like

There are plenty of resources on our Portal, just type in words relevant to your search and read the examples.

On top of that, we strongly recommend reading carefully our Documentation. Here are some resources related to your key words:

Enjoy reading & learning!

Thanks for the information.