How to fetch Emails from child label in Gmail API? - gmail

I want to fetch emails from a specific label created by the user, I'm able to fetch emails for the custom labels but when I try to fetch emails for child label it's not working for me.
Here is my label hierarchy, I'm able to fetch mails from 'Test 1' and 'Test 2' labels, but when I try to fetch mails from 'Child Folder 1' label it always returns a blank array of emails.
Here is the API query that I'm using to fetch emails from 'Test 1' label.
https://www.googleapis.com/gmail/v1/users/me/messages?q=in:Test%201%20&maxResults=20
For 'Child Folder 1' label I have formed the URL like below.
https://www.googleapis.com/gmail/v1/users/me/messages?q=in:Test%201/Child%20Folder%201%20&maxResults=20
Gmail document reference : https://developers.google.com/gmail/api/guides/filtering
Any help will be appreciated.

How to retrieve emails from a nested label using the GMail API
There are a couple of approaches to this.
Say I have these labels:
Each has a few messages in them.
Method 1
You could go to GET user.labels.list which will return a list of all the labels. With the label id you can then go to user.messages.list and make the request
https://gmail.googleapis.com/gmail/v1/users/me/messages?labelIds=[LABEL_ID]&key=[YOUR_API_KEY]'
Method 2
Using the query parameter, as you have done. The query is:
in:test/nested label
Which is URL encoded as
q=in%3Atest%2Fnested%20label
So the final request would be
https://gmail.googleapis.com/gmail/v1/users/me/messages?q=in%3Atest%2Fnested%20label&key=[YOUR_API_KEY]'
So perhaps your issue was that you didn't URL encode the / in the query as %2F
Reference
user.labels.list
user.messages.list

Related

How to get the test result attachments from azure devops (api)

I can get and upload attachments to the test result (green on screen)
But how can I get result attachments that uploaded manually by Web runner (red on screen)
enter image description here
Use this API doc
https://learn.microsoft.com/en-us/rest/api/azure/devops/test/attachments?view=azure-devops-rest-5.1
The point is I see the attachment id by mouse hover, so the ID aasighned to the attachments, but can not get it via API.
enter image description here
Hi I opened the F12 mode to capture the request calls in the current page, and I searched my attachment name in the network traces and found the rest api to list my target attachment.
And the api below looks similar to that in the doc you shared about Attachments - Get Test Sub Result Attachments, and with this api, you could get the attachment ID.
get https://vstmr.dev.azure.com/<org>/<proj>/_apis/tcm/runs/8/results/100000?detailsToInclude=5&api-version=5.1-preview.1
So I modify the Attachments - Get Test Sub Result Attachment Zip, adding the query filter of detailsToInclude=5 like below.
https://vstmr.dev.azure.com/<org>/<proj>/_apis/tcm/runs/<runID>/results/<resultID>/attachments/<attachmentID>?detailsToInclude=5&api-version=5.1-preview.1
And I download the attachment correctly.
Azure has Test Point instance
A test point is a unique combination of test case, test suite, configuration, and tester
Test Point - Get Points
From the Test Point I got "lastTestRunId" and the relevant Test Result: Results - List .
Test Result has the attachments by his own, but also manual testing test result iterations there, that in turn has attachments as well.
So, to get attachment id I should got the Iteration first:
Iterations - Get
-> "attachments": []

How to check which attachment within the message matches the search

I'm trying to search outlook's message attachments where search content exist, and I'm using this Search parameter to search over user's messages : https://learn.microsoft.com/en-us/graph/query-parameters#search-parameter.
But this api returns the details of the message where the search content exist, but does not specify the particular attachment within the message. I don't want to search on each attachment. goal is to search for the content from attachments from all the messages of the user and get the attachment details where search criteria meets.
This is the api call I'm using :
https://graph.microsoft.com/v1.0/users/<user-id>/messages?$search="abc"
I tried expending attachments with the search, but it returns all the attachments within this message, and not the one where the search content exist.
https://graph.microsoft.com/v1.0/users/<user-id>/messages?$search="abc"&$expand=attachments
I know there is another api for search on messages but it's in beta version : https://learn.microsoft.com/en-us/graph/search-concept-messages. I want an stable solution.
Thanks.

How to read an email(outlook) without spying in Blue Prism

Blue Prism: I'm trying to read an email(outlook), Which contains the information about the status of a task, name and a table with multiple headers. I should save the required information like name, status of the task in an Excel under the headers which were already written. It should all happen dynamically without spying the elements. Can anybody please elaborate the process?
You've got 2 options:
Use the MAPIEx object for a back-end connection to your Outlook profile's mailbox. (See also: MAPIEx installation guide)
v6.3 and later Use the bundled Blue Prism-provided MS Outlook VBO, which has the following actions:
Delete Email
Forward Email
Get Received Items Advanced
Get Received Items Basic
Get Received Items Expert
Get Sent Items Advanced
Get Sent Items Basic
Get Sent Items Expert
Mark Email As Read
Mark Email As Unread
Move Email to Inbox Sub Folder
Reply to Email
Reply All to Email
Save Attachment Attachments
Save Email
Save Email As File

How to access nested Part properties in Email Workflow?

I have a Registration ContentType, which contains a ContentPicker field for a Building Item, which contains a Geolocation Part with some properties like Latitude and Longitude.
When a new Registration is Published, it triggers a custom Workflow that sends out an email. In the body of the email I can get to the fields of the Building using tokens like this: {Content.Fields.Registration.Building.Content.Fields.Building.Address}
How can I get to the property values of the Geolocation Part contained within the Building? Can I do something like this? {Content.Fields.Registration.Building.Content.Parts.Geolocation.Latitude}
I'm new to Orchard and I can't figure out how it's structured. Can this be done out of the box or will I have to write a custom token?
If you know which content item to take from the content picker field (for example if it always is only one), then the following might work:
{Content.Fields.Registration.Building.Content.Fields.Building.ContentItems[0].Geolocation.Latitude}
This is assuming your Building field is configured to pick content types with a Geolocation part

DocuSign Customize Email in Brand To Use [[EnvelopeId]] in a link

I am trying to customize the brand resource file so that it uses the EnvelopeId within a query parameter in a custom html link so that the destination site can filter rows based on the Envelope.
For example, when using the following in the DocuSign XML Email resources file for the brand (e.g. in envelope completed email):
View Rows
DocuSign escapes the [[EnvelopeId]] (presumably because its within a link), causing the resulting html for the email to be
View Rows
instead of
View Rows
Is there a way to prevent the EnvelopeId from being escaped or another way to use the EnvelopeId with a custom link in the envelope completion email?
Whenever you see [[ ]] that refers to something called a DocuSign Merge Field. As you are referring to, these are dynamic variables which get replaced with expected values at runtime. I do not believe that EnvelopeID is a valid merge field in this context. The closest thing you have to referencing a link to the envelope is the [[QuickURL]] merge field.
If you were going down an API integrated route, you could specify the entire email message body contents via the API, and you would know the envelopeID at that point and could pass it in w/your logic.

Resources