Hey guys. I want to send an invitation email from my app on a button click. I wanted to use SendGrid but I am guessing it’s impossible to do so directly from AppGyver due to this:
Is there already a best practice integration or solution for sending email from AppGyver?
Alternatively, does anyone know if SendGrid can be made to work? I tried via HTTP request module but I just receive ‘TypeError: Failed to fetch. Does the server allow CORS?’
Otherwise I guess I have to go refresh my Lambda knowledge and make a request to a Lambda function from AppGyver and make the request to SendGrid from there, right?
Actually, nevermind, I just created an API in Xano which calls Sendgrid instead!
I use Sendgrid directly from Appgyver with no problem with HTTP Request flow function.
Oh really? Is it secure? Maybe you could share a screenshot of your set-up.
Here is my simple UI to make an email (with optional attachments):
So what I did was create an Email Object variable with all the fields that SendGrid wants. This one includes attachments field. If there are no attachments then i have another Email Object variable without this field:
Here is where I set the values of this Email Object:
So here is the overall flow. It checks if there are attachments or not, because if not then SendGrid doesnt want the attachments field in the email object and I have to send a different Email Object without an attachment field:
Here is how I set Attachments, using the Pick files flow function, convert it to Base64:
And save the output to an attachments List variable:
The HTTP POST request looks like this:
This is the Header part:
And that’s it! It just works like that.
Omg, thank you so much for all the effort of sharing this!
Thank your for sharing this. I had follow these steps and
Can I use free domain email address like Gmail or Yahoo? because SendGrid didn’t allow me to use those mails.
Im not sure, ive never tried those domains before.
I use sendgrid with my models.
No, I don’t have any domains.
So it only works with its own domain
John, thanks for posting this, really helpful. Can confirm this still works as of 4/29/2022