Skip to main content
Cadet | Tier 2
February 27, 2024
Solved

Email Trigger emailSubject

  • February 27, 2024
  • 16 replies
  • 414 views

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

Best answer by Zaid Chougle

Hey @CorraCastel ,

I tried with the same approach and got the output :

 

 

16 replies

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
February 28, 2024

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

 
Lets Automate !
Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
March 5, 2024

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

Lets Automate !
Cadet | Tier 2
March 5, 2024

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' 

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
March 5, 2024

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. 

Lets Automate !
Cadet | Tier 2
March 5, 2024

Hi @Zaid Chougle ,

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

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
March 5, 2024

@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.

Lets Automate !
Cadet | Tier 2
March 5, 2024

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.

 

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
March 6, 2024

In my Control room :

Assigning to record variable and then passing the key: emailSubject

 
Lets Automate !
Cadet | Tier 2
March 6, 2024

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.”

Zaid Chougle
Navigator | Tier 3
Navigator | Tier 3
March 7, 2024

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

Lets Automate !