使用Postman的GMAILAPP函数调用Google Apps脚本API [不使用Autho2]
我正在尝试使用 postman 访问 Google Apps脚本Gmail Service 。 这是我的Google Apps脚本代码,具有直接的SendMail函数:
function sendMail() {
GmailApp.sendEmail('[email protected]','from inTracck','Test for new API source')
}
如您所见,这是发送简单电子邮件的代码。 在Google Apps脚本中部署项目后,我在邮递员上使用了一个网络应用地址:
Web App Address:
https://script.google.com/macros/s/.../exec
现在,问题是当我发送时 api ,它行不通。 我知道我可能必须填写身体部分,但是由于我不是很技术,所以我不知道如何填充它以使API工作并从邮递员那里发送电子邮件。
I am trying to access the Google Apps Script Gmail service with Postman.
Here is my Google Apps Script Code, with a straightforward sendMail function:
function sendMail() {
GmailApp.sendEmail('[email protected]','from inTracck','Test for new API source')
}
As you may see, it's a code to send a simple email.
After deploying my project in Google Apps Script, I've got a Web App address to use on my postman:
Web App Address:
https://script.google.com/macros/s/.../exec
I put it all on my Postman, here is how I use it:
Now, the issue is that when I send the API, it doesn't work.
I know that I might have to fill out the body section, but since I'm not very technical, I didn't know how to fill that to make the API works and send an email from my Postman.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要一个
doget> doget()
数据:您应该使用以下配置发布:
注:重新发布更改URL。确保在Postman中使用新发布的URL。
You need a
doGet()
function to return data:You should publish it with these configurations:
Note: Republishing changes the URL. Make sure to use the newly published URL in Postman.