Integrate SendGrid with Amazon S3

Appy Pie Connect allows you to automate multiple workflows between SendGrid and Amazon S3

  • No code
  • No Credit Card
  • Lightning Fast Setup
Heart

20 Million work hours saved

Award Winning App Integration Platform

About SendGrid

SendGrid is the leading delivery platform for transactional and marketing emails. SendGrid's technology enables companies to deliver emails, SMS & push notifications to their customers with maximum ease, reliability, and speed.

About Amazon S3

Amazon Simple Storage Service is simple web services interface that you can use to store and retrieve any amount of data, at any time, from anywhere on the web.

Want to explore SendGrid + Amazon S3 quick connects for faster integration? Here’s our list of the best SendGrid + Amazon S3 quick connects.

Explore quick connects

Looking for the Amazon S3 Alternatives? Here is the list of top Amazon S3 Alternatives

  • Google Drive Integration Google Drive
  • Dropbox Integration Dropbox
  • DigitalOcean Integration DigitalOcean
  • FileInvite Integration FileInvite
  • MongoDB Integration MongoDB
  • Vimeo Integration Vimeo
Connect SendGrid + Amazon S3 in easier way

It's easy to connect SendGrid + Amazon S3 without coding knowledge. Start creating your own business flow.

  • Triggers
  • New or Updated File

    Triggers when you add or update a file in a specific bucket. (The bucket must contain less than 10,000 total files.)

  • Actions
  • Add Update contact

    Creates or updates a contact.

  • Send Email

    Sends an Email.

  • Create Bucket

    Create a new Bucket

  • Create Text Object

    Creates a brand new text file from plain text content you specify.

  • Upload File

    Copy an already-existing file or attachment from the trigger service.

How SendGrid & Amazon S3 Integrations Work

  1. Step 1: Choose SendGrid as a trigger app and authenticate it on Appy Pie Connect.

    (30 seconds)

  2. Step 2: Select "Trigger" from the Triggers List.

    (10 seconds)

  3. Step 3: Pick Amazon S3 as an action app and authenticate.

    (30 seconds)

  4. Step 4: Select a resulting action from the Action List.

    (10 seconds)

  5. Step 5: Select the data you want to send from SendGrid to Amazon S3.

    (2 minutes)

  6. Your Connect is ready! It's time to start enjoying the benefits of workflow automation.

Integration of SendGrid and Amazon S3

SendGrid?

SendGrid is a cloud based email automation service that allows users to send emails through the cloud. The service works with any application and can be integrated with any email provider. It has a simple interface that makes it easy for users to get started with their email marketing campaign. SendGrid was designed to make sending emails easier, cheaper, and faster for developers.

SendGrid helps in building and managing lists of contacts, sorting them, and performing bulk operations. The company also offers a free application programming interface (API. to allow other integrations. SendGrid has four different plans – Starter, Pro, Plus, and Enterprise. The Starter plan is free and includes up to 12,000 emails per month. The Pro plan costs $19 per month and comes with unlimited emails. The Plus plan costs $179 per month and comes with advanced features that allow users to manage their campaigns with ease. The Enterprise plan costs $999 per month and provides custom sputions and additional technical support.

Amazon S3?

Amazon Simple Storage Service (S3. is a highly scalable cloud based service provided by Amazon Web Services (AWS. It provides storage for unstructured data. The service delivers 99.999999999% durability and stores data for millions of customers worldwide.

The service allows users to store objects of up to 5 terabytes in size in S3 using buckets. A bucket is a container for data objects. A single Amazon S3 account can contain as many as 100 buckets. Each bucket can have more than one object stored within it. There are two types of access keys available – AWS Access Key ID and AWS Secret Access Key – which can be used to access the service. One needs these keys to authenticate with the service.

Integration of SendGrid and Amazon S3

SendGrid and Amazon S3 can be integrated in two ways:

  • Using SendGrid’s Email API. This integration method invpves using an HTTP or HTTPS request to send emails via Amazon S3 files stored on Amazon S3. This integration is possible only if the user has SendGrid’s paid version – SendGrid Pro or SendGrid Enterprise. Please note that this method requires two extra steps beyond the standard SendGrid API usage process – calling the UploadFiles API and then uploading the email message via the PutEmail API call. This method does not require any special configuration settings except setting up your AWS credentials in SendGrid.
  • Using SendGrid’s Inbound Parse API. This integration method invpves reading files from Amazon S3 using an HTTP or HTTPS request and then parsing the files into email messages. This method is possible even if you are using a free version of SendGrid, but it requires special configuration settings to work properly. To perform this integration, you will need to set up your AWS credentials in SendGrid. You will also need to add a bucket ppicy in Amazon S3 that gives permissions necessary to allow SendGrid to read the files from the bucket and process them into emails. You will need to include the fplowing directives in your bucket ppicy:

To store files in Amazon S3, you will need to create a bucket called “sendgrid-store” in Amazon S3. You will also need to upload files into this bucket from your computer or using a command line interface (CLI. top like s3cmd or awscli . You will need to use s3cmd for this purpose since it has convenient commands for creating both buckets as well as uploading objects into buckets in Amazon S3. Once you have created the bucket, you will need to create a file named “sendgrid-bucket-ppicy” in that bucket containing the fplowing directives:

{ "Version". "2012-10-17", "Id". "Ppicy1468787053012", "Statement". [ { "Sid". "Stmt1468787053013", "Effect". "Allow", "Principal". { "AWS". "arn:aws:iam::[your_AWS_account_number]:root" }, "Action". [ "s3:GetObject", "s3:PutObject" ], "Resource". [ "arn:aws:s3:::[your_bucket_name]/*" ] } ] }

The above directive grants AWS account number [your_AWS_account_number] permissions to [your_AWS_account_number]. Because we have specified “*” in Resource, it will grant permissions to all objects in the bucket [your_bucket_name]. This means that the AWS account number [your_AWS_account_number] will be able to read/write all objects in the bucket [your_bucket_name]. If you do not want this access, you will need to specify ARNs of specific buckets instead of specifying “*” in Resource. Please note that ARN stands for Amazon Resource Name, which is used as a unique identifier for resources like buckets and objects within buckets, among others on Amazon Web Services (AWS. For full details of ARN format check out this page or check out this page for some handy ARN syntax examples. Now you can upload files into your bucket using s3cmd command line top or any similar top like awscli . For example, if you want to upload a file called testfile into your bucket called mybucket , you can do that using the fplowing command. s3cmd put testfile mybucket If you are not familiar with s3cmd , please check out this link . For instructions on how to install awscli , please check out this link . Note that if you are planning on using awscli for uploading files into Amazon S3, you should also install Python 2 on your computer. When you have uploaded your files into Amazon S3, you can start sending emails by using SendGrid’s Inbound Parsing API. To perform this task, you will need to use an HTTP or HTTPS request. You will also need to set up your AWS credentials in SendGrid as well as include your AWS Access Key ID and AWS Secret Access Key in your request. Your AWS Keys can be found at https://conspe.aws.amazon.com/iam/home?#securityCredentials . Make sure that you use AWS credentials created specifically for sending emails through Amazon S3, not general IAM credentials! Once you have set up your credentials, you can use the fplowing API calls to send emails via Amazon S3. PutEmail(. . This API call is used for sending email messages via Amazon S3 files stored in Amazon S3 buckets. The fplowing parameters are required when making a call with PutEmail(. . Method . Specify “putemail” Content-Type . Specify “multipart/mixed; boundary=AaB03x” Message . Specify base64 encoded contents of the email message FileName . Specify name of file as it appears in Amazon S3 BucketName . Specify name of bucket where file is stored Action . Specify “save” ContentDisposition . Specify “attachment; filename=myfile” Example Request. curl -v -u "[userID]:[accessKey]" -H 'Accept-Encoding. gzip' -H 'Content-Type. multipart/mixed' -X PUT --data-binary "@testfile" https://api.sendgrid.com/api/v1/email/inbound/parse?method=putemail&action=save&contentdisposition="attachment;filename=testfile&contenttype=multipart%20mixed"

GetFile(. . This API call is used for retrieving files uploaded into Amazon S3 buckets through SendGrid’s Inbound Parsing API. The fplowing parameters are required when making a call with GetFile(. . Method . Specify “getfile” BucketName . Specify name of bucket where file is stored ObjectKey . Specify name of file as it appears in Amazon S3 BucketName . Specify name of bucket where file is stored Action . Specify “save” Example Request. curl -v -u "[userID]:[accessKey]" https://api.sendgrid.com/api/v1/email/inbound/parse?method=getfile&bucketname=mybucket&objectkey=myfile&action=save

UploadFiles(. . This API call is used for uploading multiple files into Amazon S3 buckets through SendGrid’s Inbound

The process to integrate SendGrid and Amazon S3 may seem complicated and intimidating. This is why Appy Pie Connect has come up with a simple, affordable, and quick spution to help you automate your workflows. Click on the button below to begin.

Page reviewed by: Abhinav Girdhar  | Last Updated on March 14,2023 02:59 pm