Integration with outlook - cant get user's email

Hi guys,
we have a button integration with an outlook add-in.
as a part of our integration, we’re querying to monday to get the user’s email:

  query { 
    me{
      email
    }
  }

For some reason, the email that comes back from the query is the email of the integration’s installer instead of the user’s.
We would like to get the email of the same user that clicked our button, is it possible?

Thank you!

Hey @yuvalNakav,

That’s a great question!

The integration recipe will always run on behalf of the user who created the recipe and went through the authentication flow. If you’d like to get the email of the user who clicked the button, you might need to query the email of User ID from the payload of the Button Clicked trigger.

Otherwise, you will always query based on the token of the user who was the integration creator.

Does that make sense? Let me know.

-Alex

Hey @AlexSavchuk ,
I’ve managed to solve the problem by using userId from the payload of the Button Clicked trigger. Thank you very much for the solution and the quick response!

1 Like

@yuvalNakav

That’s awesome, I’m glad to hear it was helpful :slight_smile: Thanks so much for trying it out!

-Alex

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.