Outlook API error Invalid OData type specified: Microsoft.OutlookServices.FileAttachment - azure

We have a function set up to send emails via Outlook from our web app and it's been working great, but suddenly this morning my email inbox is flooded with errors from our system saying it couldn't send the email with outlook because of a bad request. The errors all look like this:
{"error":{"code":"BadRequest","message":"Invalid OData type specified: \"Microsoft.OutlookServices.FileAttachment\"","innerError":{"date":"2021-07-02T05:43:00","request-id":"XXX","client-request-id":"XXX"}}}
As I say it was working yesterday, but now it's not. And a lot of these don't have specific attachments outside of the embedded header image, which has not been changed since it was working.
Any suggestions on reasons for the error?

OK so I figured this out. For some reason our attachments were still set as '#Microsoft.OutlookServices.FileAttachment' for the data type. I changed this to 'microsoft.graph.fileAttachment' and it is now working again. I don't know why it decided to force a change over today, but I'll leave this question and answer up in case someone else has the same problem.

Related

Gmail API Watch Request Not Filtering Label IDs

Issue
Trying to get the Gmail API to send only new messages to Cloud Pub/Sub by using the Gmail APIs Watch function but when setting the labelIds in order to filter to just INBOX, i am still notified of all changes, files sent, drafts etc.
I've looked online and can see that there are people that are experiencing this issue and there is even a bug out for it https://issuetracker.google.com/issues/36759803.
But i find it kind of odd that the entire feature of filtering just doesn't work and its been an issue for 5 years according to the bug report. Makes me think its just me that is doing something wrong. Would be cool to hear from anyone that has got this to work.
Where im at
I'm using the Gmail API, trying to get my Gmail account to publish messages to Cloud Pub/Sub. I've managed to do this however im trying to filter what i get notifications for to just new messages. This is where i have a problem.
According to this Gmail API documentation, it appears all i have to call is the code below and that should be that. I will add however, that im calling the Kotlin equivalent, but i don't think this should matter.
request = {
'labelIds': ['INBOX'],
'topicName': 'projects/myproject/topics/mytopic'
}
gmail.users().watch(userId='me', body=request).execute()
What im calling:
val request = WatchRequest().apply {
labelIds = listOf("INBOX")
topicName = "projects/myproject/topics/mytopic"
}
gmail.users().watch("me", request).execute()
Other things ive tried
I have tried adding labelFilterAction = Include and other variations but they all seem to be ignored.
After trying the ideas listed by ziganotschka, I'm more confident that the issue is not related to specific client libraries.
I managed to speak to someone at Google who in turn contacted the G-mail API team. They said they were aware that this is an issue, that it has been an issue since 2015 and was most likely caused by a change they made back then.
A ticket is still open, but doesn't look like it will be fixed.
Perform the following trouble-shooting actions
Provide a request body including labelIds, labelFilterAction AND topicName as specified here
Try the label "UNREAD" instead of "INBOX"
To discart Kotlin implementation related issues, test your request in a programming language that allows you to pass the request as a JSON body in exactly the same way as specified in the documentation.

"Could not determine customer compid" USER_ERROR in netsuite sandbox

I have a User event which calls a restlet using nlapiRequestURL() method. The URL, headers and authorization seems fine but it returns an error message saying - "Could not determine customer compid". Has anyone had the same issue earlier or know how to work around with this. Any help is appreciated.
We see this occassionally when a Suitelet or Restlet URL isn't specific enough for NetSuite to know which company is trying to call the URL. The script id by itself is not enough to know the company if the user is not currently logged in to NetSuite.
You can add &compid=<YOUR NETSUITE ACCOUNT NUMBER> to the the URL to let NetSuite know which company is trying to call the specific URL.
Just adding this on because I had the same issue, you'll get the same error if you're hitting a sandbox and not capitalizing the SB in nlauth_account.
Eg NLAuth nlauth_account=XXXXXXX_SB1 instead of NLAuth nlauth_account=XXXXXXX_sb1.
We did face this issue, clearing browser cookies solved in most cases.
Sometimes the problem was persistent for about few hours and got fixed on its own.
If you're using NLAuth, be sure you use commas (not spaces) to separate the account, email, and signature fields. Using spaces gave me this error.

Excel Auto Send Emails via Outlook Randomly NOT Sending

I've inherited development of an Excel userform which contains a send button to return the user's data back to a central mailbox. The tool has just been rolled out to a larger community and some users are experiencing emails not being sent. These are random events as the users can sometimes send the forms and it is not form specific.
The tool uses the following code to create the email:
Set ObjOL = CreateObject("Outlook.Application")
Set ObjOutMail = ObjOL.CreateItem(0)
and is sent via:
ObjOutMail.send
We had tested this with a number of users and never had any problems, but we now have a number of users who have successfully sent 1 or more forms but 1 or more have also failed, and they also can't resend the successful forms any more either.
There are no error messages, the Outlook "this could be a virus, etc." confirmation is fired as usual (we have not attempted to circumvent this) but there is nothing in the 'Sent Items'. The users are also able to send conventionally generated emails so there is no mailbox limitations going on.
The Userform is modal and upon sending copies the three user fields to "Sheet1", saves itself and mails itself.
Really at a loss to understand what's going on.
Thanks for any advice.
EDIT: To add we are still using Office 2003 on Win XP.
Thanks for all the replies, using the .display property showed me what was up.
The email is addressed to what I thought was an explicit address, however there is an extra '(MULTIUSER)' post fix which I didn;t realise was actually part of the address, DOH!.
Last week and similar mailbox made up of the same address but with a different postfix was added to the system. This ment Outlook couldn't resolve the address and didn't send the emails.
Thanks again.

apps script not found error

I had the snooze app script working on gmail for some time but it seems that after converting to google drive, the spreadsheet vanished (not in trash) and I get emails every night telling me that my script "Not Found" failed to finish successfully etc etc.
The Error message is that a server error occurred - not particularly informative and any attempt to view triggers results in the same error.
Is there any way to get rid of these messages apart from setting up some kind of filter which is counter intuitive as if I decide to run other scripts I may want to see the output.
Thanks
Darren
Darren, can you please raise this on the Apps Script issue tracker: http://code.google.com/p/google-apps-script-issues/issues/list? If possible, please also let us know in the issue tracker request what the email address is where you're receiving the failure notification email.

Script to check whether all mails replied in Lotus Notes

We use Lotusnotes 6.5 as email client. We wil have around 1600+ mails for 9 hrs. If a mail not checked , we have face serious issues with our client. Can any script can be written to check whether all mails are checked and replied?
Update:
We have already tried moving the mails to another folder.But has this mailbox handled by team of persons, we noticed lot of human error happening like moving a unread mail, sometimes they would have read mail but forget to reply it etc.etc.
So I was looking out for a script solution, will your other options. Also one more thing we do is we cc our mailbox mail id for all outgoing emails to have a track of all replied mails, will this could help in any way to find out which mails was missed?
If you need to track unread marks, I second the aforementioned nsftools solution, which works in Domino 7.x too. However, this is very much Notes ID-dependent. A folder would be better.
Note that 6.5x is well out of support, and that Domino 7.x officially died this week: use something at least vaguely modern!
There's an easier non-programmatic way. Just move the email from the inbox into another folder once the email has been responded to. That is more reliable than any programmatic solution, and keeps your inbox tidy (which will certainly be necessary if you get nearly 200 emails per hour!)
That said, here are some other ideas.
Determining if the document was read
Unread marks are not your friend here, unless you'll be accessing the mail file from the same client. Also they tend to get out of sync and would likely prove unreliable at some point, especially given the number of incoming emails. Instead you'll need to have some information that is saved within the individual mail document, such as the last accessed property or a custom item you manage via scripts/formulas.
You can see if an email has been read by checking the Last Accessed property of the mail document. According to IBM's technote (https://www-304.ibm.com/support/docview.wss?uid=swg21086670), the property will be updated when the document is read.
You could write a script in the QueryOpen event that stamps a value on the document and saves it.
Determining if the email was responded to
First off, I'd suggest you save all sent emails in case you need a record of what was sent to the client. That won't give you a way to see which emails have not been responded to, however.
Instead you could add script to the reply action within the memo form. When someone click's reply it could update the current memo, stamping an item on it to say who replied and at what time, for instance. Then you can create a view to show any emails that don't have that item, and another view to show emails that do grouped by who responded. The second view could even show how many emails each person responded to, something that might be used as a measurement of performance perhaps.
"Unread mark" checking is not exposed in the API.
I did find 2 links, this one is a basic implementation, where as this link does have more robust code and is implemented as an object in LotusScript. It should be compatible with Notes 6.5+.
I found the second link through nsftools website which has lots of great snippets that solve various problems. You should at least be able to detect if a mail has been read or not. Note that it requires making API level calls. You should be able to create a new script library and copy/paste the code into it.

Resources