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": []
Related
I used to get an email with one attachment and save it to a sharepoint/onedrive folder through Power Automate. The condition was that it had an attachment, then part of the subject and the sender email address. However, now I get two attachments in the same email, with different attachment names (the vendor will not send these separately). Now I have been trying multiple ways of moving these two attachments into separate sharepoint/onedrive folders.. without success.
What I have now (trying to check what the name of the attachment is, and based on that, move it to a specific folder). The difference between this and what I had when there was only one attachment, is the "Get Attachment (V2)" step and the Condition. However, when I try to run it, the first and second condition returns "false".. although the name does contain exactly what I have written as the condition..
Had to have the condition in a "apply to each attachment in email" (apply to each) step, and then just wait for the actual email I am setting this up for to arrive. My testing failed due to my own email being digitally signed / encrypted, which Power Automate cannot handle..
I have a logic app that is being used to send emails using a SendGrid subscription. There is a unique link sent to each user. I can embed this link variable in the message text using expressions, but when the email is sent it transforms the link to plain text.
There is a "link" button that can be used to manually add a link but it only accepts plain text as the link title and target, it does not appear it can be mapped to any expressions or dynamic content.
I thought I could maybe add a placeholder link through the SendGrid Link insertion, and then find it in the corresponding json template for the app and map it to an expression but something happens when it is saved and it is transformed.
According to some test, it doesn't show same problem in my side. I received the email in outlook and in my opinion, it may be influenced by your email tool. In my side, the link was transformed to plain text only if the email is filtered into Junk Folder.
To solve this problem, you can test it in another email tool. Or you can do it like below screenshot, store the link with <a> tag in a variable and then use the variable in email body.
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.
I m sending a GET request to a published google sheets. All the tutorials show that a JSON object is returned but I receive HTML. Is it due to an update? How can I parse it into JSON?
Published sheet: https://docs.google.com/spreadsheets/d/e/2PACX-1vTLSQ-WGM8O0iCCTal0eFoAvFFIVK04UxUiCuBJLGVy89EY301-0cF5PZupIXh-sF_L9pHIw6tVtN1G/pubhtml
Expected output when you go to the link: JSON object
Obtained output: HTML
References:
https://sandbox.idre.ucla.edu/sandbox/general/databasing-google-spreadsheets-to-json
https://medium.com/storyline-blog/how-to-create-a-dynamic-alexa-skill-using-google-sheets-and-storyline-9fd37f2080d8
In these, JSON is returned when a request is made whereas I receive an HTML
An example of google sheet returning JSON:
https://spreadsheets.google.com/feeds/list/SPREADSHEET_ID/od6/public/basic?alt=json
When you publish a google sheet, you are prompted by a pop displaying a link such as
https://docs.google.com/spreadsheets/d/e/2PACX-1vTVZ3fWRSMu5nFGUc05ACV1h0-UGW49wi9lHAyJVUMp8FX3TANqy_9WNhkcd4z1mJSSN-LZyyBdS_vK/pubhtml
2PACX-1vTVZ3fWRSMu5nFGUc05ACV1h0-UGW49wi9lHAyJVUMp8FX3TANqy_9WNhkcd4z1mJSSN-LZyyBdS_vK is not the skill id
The skill ID is present in the search bar. For example the search bar has the link, https://docs.google.com/spreadsheets/d/1bm6Fjiacmuh0qRjuHoBU35AHPdF7S4R7BEIK46H0wUo/edit#gid=0
where 1bm6Fjiacmuh0qRjuHoBU35AHPdF7S4R7BEIK46H0wUo is the link.
Edit: addressing the first comment below and for clarity, this isn't a code question. The question is simply:
What do I put into the URI querystring of the new Gmail UI to view a draft message created by the Gmail API?
Despite this not really being a code question, I'm asking on Stack Overflow as it's Google's preferred platform for Gmail API questions.
--
If I view a draft message in the new Gmail UI, the URI is something like this:
https://mail.google.com/mail/u/1/?zx=iij9apqgzdf4#drafts?compose=jrjtXSqXwlFGnSGCQgDCdnHGVFdlpFMgzsCNgpQstQLxdLCMkjKstBmWZkCmjhWTQnpsZCJF
I can't see any way to create such a link from the Id or ThreadId of a message created via the Gmail API.
Previously, one could do this:
https://mail.google.com/mail/u/1/?zx=ov61dxfbrcga#drafts?compose=1631caae9dbb074d
where the value of "compose" is the Id.
How can the same thing be accomplished in the new UI?
I've been encountering the same problem and have had some success in this problem, as well as some issues I still can't get past.
Good news: The new compose parameter format is some kind of "base40" encoding. I searched the Gmail source for a restricted alphabet string, and found and deobfuscated the bit of code doing this encoding/decoding: https://gist.github.com/danrouse/52212f0de2fbfe33cfc56583f20ccb74
This code includes an encode and decode function which should work for Gmail-format query parameters.
Bad news: The values that it is encoding to open draft emails do not appear to be available using the Gmail API. Specifically, they look like this:
thread-f:NEW_THREAD_ID+msg-a:DRAFT_ID -- while the draft ID is the same as it was before, the Thread ID does not appear to match any of the IDs that the Gmail API returns.
Interestingly, if you inspect the subject row in the Gmail UI, it has dataset attributes including all of both the old format and new format IDs - but it's still unclear how to get the new ones programatically.
Thanks to #frank-szilinski - he pointed out that the old format is now translated. I.e. this now works again:
https://mail.google.com/mail/ca/u/1/#drafts/1661237c4db71ace
It doesn't seem to work when the Gmail tab isn't already open, however.
Building on #kremonte gist, and #chris-wood comments, I made a rails gem that correctly creates the open-the-draft-inside-gmail URL.
It's here - https://github.com/GoodMeasuresLLC/gmail_compose_encoder
It's for the use case of "my code created a draft (prepopulated with some text, of course) and now I want to open the draft in compose mode so that my user can review it before hitting "send".
How to get the URL for a draft
If, for example you use a list request from which you get your draft objects:
{
"id": string,
"message": {
object (Message)
}
}
You can take this id and put it into a URL in this format:
mail.google.com/mail/#inbox?compose=[id]
Eg.
mail.google.com/mail/#inbox?compose=3doinm3d08932d
This will open up GMail with the relevant draft open.
I was struggling because I wanted it to work with multiple accounts. However the authuser parameter did not help.
Inserting the email address instead of the integer after the u/ component solved the problem.
https://mail.google.com/mail/u/{email_address}/#drafts?compose={message_id}
The message id is the one provided by the API.