Skip to main content

Hi,

I have triggered a bot trough email, but if I try to retrieve subject from the email that triggered the bot, the key is blank:

Can anyone help me how to correct this behaviour?

Thanks

@CorraCastel , try assigning the output to dictionary variable and after that try accessing it.

 

Hey @CorraCastel , were you able to find any solution of your problem?


Hi @Zaid Chougle ,

I have tried but in the trigger system it is not possible to use a dictionary variable. I can choose a record  variable but it does not recognise the key 'emailSubject' 


Hey @CorraCastel , 

Please check the link : Link.

AS you want to extract the subject of the emails you can use the loop, for each mail in a mailbox and the output of that loop is a dictionary variable and to extract the subject the key is “emailSubject”

For example: The dictionary variable you created is: email.

Then you can access the subject by: email{emailSubject}.

Let me know whether it worked or not. 


Hi @Zaid Chougle ,

I was hoping there was an alternative way considering that the trigger returns me the ability to use keys without loop.


@CorraCastel , Can you please share your exact scenario of what you are trying to automate.

So that we can make a efficient solution out of it.


Hi @Zaid Chougle ,

I am trying to trigger a process when I receive a certain e-mail.
When this happens my task launches a task via API which executes the process.
I wanted to avoid looping over the mails as it is already done in the task called by the API.

 


In my Control room :

Assigning to record variable and then passing the key: emailSubject

 

Hi @Zaid Chougle ,

thank you for your reply. Your answer is what I did in my Control Room:

  1. Define the Email trigger with Record variable
    1. Recover the key from Record variable
       

      Unfortunately, the task fails with error “Key 'emailSubject' not found in record.”


@CorraCastel , let me also test it from my end. Will update you


Hey @CorraCastel ,

I tried with the same approach and got the output :

 

 

Hi @Zaid Chougle,

could you also show me the lower part of the command “Email trigger”?

Thanks,


Hey @CorraCastel ,

I did the same thing but my Check every was 10 seconds.

Other than that everything is same.

 


Additionally @CorraCastel can you please share our trigger and below action screenshot if that is possible


Hi @Zaid Chougle,

I solved. The problem was related to how I managed the record variable. I was trying to extract it when it should always be used as a record.

 

Thanks for the support


No issues @CorraCastel . Happy to help


Reply