← Go back to library

GMail DwD Get Mail

This sub story performs a number of actions to help retrieve a bearer token for accessing a particular user's inbox. 1) Receive's a user id (the user whose emails we want to access), service account id and GMail RFC822 Message ID 2) Generates a JWT Claimset with up-to-date exp and iat claims. 3) Signs the JWT request using the `jwt_sign` liquid filter 4) Makes the request to Google for the access token 5) Queries the user's mailbox for the provided Message ID 6) Gets and parses the message from the mailbox. 5) Returns the identified mail To use: 1) Create a text credential called 'GSuite-dwd' containing the private key from a service account JSON file 2) Enter the user id and service account with Domain-wide delegation privileges into the StS action 3) Ensure the same user id is entered in the url for the 'Get User Messages in GMail' action 4) Run StS action

How it works

Import this story to your tenant, from where you can adapt it to meet your unique needs.

Import
Was this story helpful?