Closed RtpChris closed 1 year ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
pipedream-docs | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 3, 2023 5:52pm |
pipedream-docs-redirect-do-not-edit | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 3, 2023 5:52pm |
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified.
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
key
s should follow the format app_name_slug-slugified-component-name
secret
props to capture sensitive dataoptional
props whenever possible, and set a default
value where you canHere's the error that we get currently when trying to use this:
Unexpected error (status code: 400): { "headers": { "server": "nginx", "date": "Fri, 10 Mar 2023 00:51:02 GMT", "content-type": "application/json", "content-length": "300", "connection": "close", "access-control-allow-origin": "https://sendgrid.api-docs.io", "access-control-allow-methods": "POST", "access-control-allow-headers": "Authorization, Content-Type, On-behalf-of, x-sg-elas-acl", "access-control-max-age": "600", "x-no-cors-reason": "https://sendgrid.com/docs/Classroom/Basics/API/cors.html", "strict-transport-security": "max-age=600; includeSubDomains" }, "body": { "errors": [ { "message": "Invalid type. Expected: object, given: string.", "field": "personalizations.0.bcc.0", "help": "http://sendgrid.com/docs/API_Reference/Web_API_v3/Mail/errors.html#message.personalizations.bcc" }, { "message": "Invalid type. Expected: object, given: string.", "field": "asm", "help": null } ] } }
Also posted here https://pipedream.com/community/t/fixing-sendgrid-component-asm-fields/5047
Hello everyone, I have tested this PR and there're some test cases failed or needed improvement.
Please check the test report below for more information SendGrid_5673_2151.pdf
I've added a new validator for the asmGroupsToShow, set asmGroupsToShow as optional, and have the fetch return undefined if the user doesn't have any ASMs configured
@michelle0927 - Thanks! I think I've gotten the conflict resolved; sorry for the mess!
Hello @RtpChris, I'm still facing error while fetching for ASM Group ID and ASM Groups to Display
Would you mind checking again and sharing the steps taken to test this?
@vunguyenhung - I tested it locally as well as I could, but I'm probably missing something. I think this time I screwed up by returning undefined instead of an int
Does the sendgrid account you're using have any suppression groups defined? I'm still getting familiar with the pipe dream code and I'm not entirely sure how to return a custom error message for that (I based the options code on the work that was already there)
@vunguyenhung - I tested it locally as well as I could, but I'm probably missing something. I think this time I screwed up by returning undefined instead of an int
Does the sendgrid account you're using have any suppression groups defined? I'm still getting familiar with the pipe dream code and I'm not entirely sure how to return a custom error message for that (I based the options code on the work that was already there)
@RtpChris Sorry I overlooked this during review. The prop options are expecting an array. Try returning []
instead of undefined
.
async options() {
const asmGroups = await this.listAsmGroups();
if (asmGroups) {
return asmGroups.map((group) => ({
label: group.name,
value: group.id,
}));
}
return [];
},
@vunguyenhung - I tested it locally as well as I could, but I'm probably missing something. I think this time I screwed up by returning undefined instead of an int Does the sendgrid account you're using have any suppression groups defined? I'm still getting familiar with the pipe dream code and I'm not entirely sure how to return a custom error message for that (I based the options code on the work that was already there)
@RtpChris Sorry I overlooked this during review. The prop options are expecting an array. Try returning
[]
instead ofundefined
.async options() { const asmGroups = await this.listAsmGroups(); if (asmGroups) { return asmGroups.map((group) => ({ label: group.name, value: group.id, })); } return []; },
Ahh ok thanks! I've made those changes
@michelle0927 @vellames what's left here to get this merged?
It was just a comment left in the code, not a big deal, we can move forward with this if you want
can this be merged?
@binamov looks like it's waiting to be QA'd -- have you gotten a chance to test the changes end to end?
@binamov looks like it's waiting to be QA'd -- have you gotten a chance to test the changes end to end?
nope. I'm blocked with this integration as well, i'm trusting the numerous positive responses before mine.
@vunguyenhung @michelle0927 what's the latest on this one?
@michelle0927 is attempting to deploy a commit to the Pipedreamers Team on Vercel.
A member of the Team first needs to authorize it.
Testing passed. Ready for release!
Test report Sendgrid_5673.pdf
Currently the ASM config doesn't work with the sendgrid actions. This is because the Sendgrid API requires the group_id and other params to be integers, not strings.
This code parses the ASM object as integers if set. It also adds the two ASM subfields as their own parameters so that the Sendgrid API can be queried for the groups (like the templateId param)
Sendgrid API reference: https://docs.sendgrid.com/api-reference/mail-send/mail-send