LogoLogo
Back to studio
  • Formsort documentation
  • โฉQuickstart
    • ๐ŸŸขGet started with Formsort
    • ๐ŸŽCore concepts
    • โ„น๏ธQuestion and content reference
    • ๐Ÿ“•Key terms
    • ๐Ÿž๏ธCreate your first flow
    • ๐Ÿ“–Add content and collect answers
      • ๐ŸคณCapture demographic data
      • โ„น๏ธAdd informational content
      • ๐Ÿ” Review your variable schema
    • ๐ŸŽจCreate a theme
      • Set brand guidelines
    • ๐ŸคนPersonalize your flow
      • ๐ŸŒŸTemplate your variables
      • ๐Ÿง Add conditional logic
      • ๐Ÿ’ซUsing conditional logic with Calculated and API variables
      • ๐Ÿ”šEnd the flow
    • ๐Ÿ”€Set up integrations
    • ๐Ÿš€Go live
      • Auditing your flow for content, functionality, and design
    • ๐Ÿ’ผCommon use cases
      • ๐Ÿ’”Disqualify responders
      • ๐Ÿ—“๏ธAdd a scheduling option
      • ๐Ÿ“„Allow responders to read and accept your company policies
  • ๐Ÿ—๏ธBuilding flows
    • Flows and variants
      • Flow starts
    • Adding content
      • Groups
      • Steps
        • Settings
        • Logic
        • Style
      • Questions
        • General Settings
        • Style
        • Address
        • Comparison
        • Confirmation
        • Date
        • Date & Time
        • Email address
        • File upload
        • Grid choice
        • Iframe
        • Image upload
        • Number
        • Payment
        • Phone number
        • Postal code
        • Question group
        • Region
        • Select
          • Providing choices via API or calculation
        • Signature
        • SSN
        • Text questions
        • Yes/No
      • Content
        • General Settings
        • Statement
        • Image
        • Video
        • Next button
        • Divider
        • Map
      • Endings
      • Using markdown
      • Using variable templating
        • Template formatting functions
      • Copy-pasting form content
      • Content library
    • Conditions and logic
      • Logical operator reference
      • Advanced logic
    • Variables (answers)
      • Variables from questions
      • Externally provided variables
      • Calculated variables
      • API lookups
      • System Library variables
      • Orphaned variables
    • Schemas
      • JSON Schemas
      • Validating flow schemas
    • Redirects
    • Styling and themes
      • CSS Reference
      • Overriding theme styling
      • Custom CSS overrides
      • Content area
      • Animations and transitions
      • Form Layout
      • Typography
        • Adobe Fonts
        • Hosting custom fonts
      • Color variables
      • Dimension variables
      • Question containers
      • Assets
      • Form Buttons
        • Select buttons
      • Inputs and dropdowns
      • Checkmarks
      • Tables
      • Sliders
      • Divider lines
      • Progress bar
      • Comparison cards
    • Variant settings
      • Form behavior for returning responders
      • Group ranking API
    • Publishing and versions
      • Preview window
      • Deploying
      • History
  • ๐Ÿ’พHandling data
    • Philosophy and data retention policy
    • Viewing form answers
    • Responder UUIDs
    • Environments
      • Loading different environments
    • Passing data in
      • URL parameters
      • POST body
      • Embed query parameters
    • Custom validators
    • Form answers and events
      • Analytics events
      • Signed requests
      • Event payload shape
      • Submission frequencies
      • Runtime error reporting
      • Admin API
      • Flow content data format
    • Integration reference
      • Amplitude
        • Amplitude cross domain tracking
      • BigQuery
      • FullStory
      • Google Analytics
        • Updating from Universal Analytics to GA4
      • Google Cloud Storage
      • Google Sheets
      • Google Tag Manager (GTM)
        • JavaScript triggered by flow events
      • Hubspot
      • Jornaya
      • Optimizely
      • PostgreSQL
      • Redshift
      • Rudderstack
      • S3
      • Salesforce
      • Segment
        • Segment Setup
        • Segment cross domain tracking
      • Stripe
      • TrustedForm
      • Webhooks
        • Zapier
  • ๐Ÿ“บGoing live
    • Custom domains
    • Built-in analytics
    • Embedding
      • Web-Embed API
        • React-embed
      • Adding authentication
      • Embedding forms in iOS and Android
      • Setting up a dev environment
    • Split testing
    • Preflight checklist
  • ๐ŸขTeams
    • Accounts
      • Roles and permissions
    • Events subscriptions
    • Workspace domain detection
Powered by GitBook
On this page
  • Setting up new S3 credentials
  • How Object URLs are generated
  • Setting up the S3 Bucket in AWS
  • Setting up the S3 Integration

Was this helpful?

  1. Handling data
  2. Integration reference

S3

Upload files and images directly into your own S3 buckets.

PreviousRudderstackNextSalesforce

Last updated 2 years ago

Was this helpful?

When collecting binary data from your flows, such as images or documents from , , or questions, we upload them directly into your infrastructure from the responder's browser. Answers will not be sent to an S3 integration.

The answer associated with the question will contain the Object URL of the uploaded asset, such as https://s3.amazonaws.com/{{YOUR_BUCKET_NAME}}/formsort/{{FILENAME}}.jpg

This way, you retain control over your responder's data: the S3 bucket can only provide write access to Formsort, so the data uploaded can be secure.

Setting up new S3 credentials

If you don't have an S3 bucket already, or wish to create a new one, see our guide on . Take note of the bucket name as well as the region (ie. us-east-2) of the bucket. Configure the "" setting so all new objects in the bucket will be owned by your organization.

In the integrations editor, under S3, click Add new credential...

Provide your bucket name, region, and a description of the bucket

In the S3 interface, add a bucket policy to allow the Formsort uploader user to write to the bucket:

{
    "Version": "2012-10-17",
    "Id": "FormsortPolicy",
    "Statement": [
        {
            "Sid": "FormsortPutObjectsPolicy",
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:iam::129119527019:user/s3-upload"
            },
            "Action": [
                "s3:PutObject",
                "s3:PutObjectAcl"
            ],
            "Resource": "arn:aws:s3:::{{YOUR_BUCKET_NAME}}/formsort/*"
        }
    ]
}

Since we'll be uploading from the user's browser, you need to set a CORS policy as well.

JSON schema:

[
  {
    "AllowedHeaders": [
        "*"
    ],
    "AllowedMethods": [
        "POST",
        "GET"
    ],
    "AllowedOrigins": [
        "*"
    ]
  }
]

XML schema (deprecated in AWS):

<?xml version="1.0" encoding="UTF-8"?>
<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
  <CORSRule>
    <AllowedOrigin>*</AllowedOrigin>
    <AllowedMethod>POST</AllowedMethod>
    <AllowedHeader>*</AllowedHeader>
  </CORSRule>
</CORSConfiguration>

How Object URLs are generated

All uploaded assets will reside within a formsort/ folder.

At the level of the flow's integration, a base path can be specified. This adds an additional prefix that is used to create Object URLs for all uploaded assets. One helpful trick is to create a base path like /prod for the production environment, to distinguish from assets uploaded to other environments.

At the level of a particular question, additional filename patterns can be specified:

Take care that every URL has some uniqueness to it, whether it be the responder UUID, a timestamp, or random UUID, so that uploads from different responders do not overwrite one another.

In the above configuration, uploaded assets would be located at https://s3.amazonaws.com/your.aws.s3.bucket/formsort/{{randomUuid}}.png, which is what would be provided in the answers stored in the flow itself.

Setting up the S3 Bucket in AWS

To upload your data to Amazon S3, you must first create an Amazon S3 bucket in one of the AWS Regions. Since there are many variations on the configuration of S3 buckets, this guide is meant to cover the basic features needed to get a bucket up and running.

Choose Create Bucket

In the General Configuration menu, choose a DNS-compliant name for your bucket, and select the AWS region you want the bucket to reside.

Next, in the Object Ownership menu, choose to enable or disable Access Control Lists (ACLs). ACLs are used to provide ownership of every object in your bucket, which simplifies access management.

ACLs disabled

  • Bucket owner enforced - Only the bucket owner owns and has full control over every object in the bucket. Access control for the bucket is based on polices (IAM/S3 bucket policies) rather than ACLs.

ACLs enabled

  • Bucket owner preferred - Bucket and objects ACLs are accepted. Objects uploaded with bucket-owner-full-control ACLs will be owned by the bucket owner. Otherwise, the object-writer owns the object.

  • Object Writer - Objects are owned by the AWS account that uploads them.

Once you ACL settings have been set, configure your Public Access Settings. This feature provides settings for access points, buckets, and accounts to help manage public access to your S3 resources. By default, new buckets do not allow public access.

If keeping multiple variants of an object is important to you, can choose to enable or disable bucket versioning. This can help preserve, retrieve, and/or restore versions of objects. By default this feature is disabled.

Setting up the S3 Integration

You will find the S3 menu in the Integrations tab of the flow. Once in the S3 menu, click "add credential".

Click on the "Add New" tab, and enter the S3 bucket information into the "Specify destination S3 bucket" field. Bucket should exactly match the way the bucket is named in AWS, but Region only needs to be written using the dash-separated name, e.g. "us-east-2". A Description is optional.

The next step, Set up a bucket policy, will be pre-filled with the appropriate information by Formsort. No changes need to occur here. Copy this policy...

...and paste into your AWS bucket, under Permissions -> Bucket Policy -> Edit. Be sure to click Save Changes at the bottom of the Edit Bucket Policy page.

Once the Bucket Policy has been updated, head back to the S3 menu in Formsort and copy the CORS configuration code, found in Set up CORS configuration.

Paste this CORS policy into the CORS section of your AWS console, by clicking Edit. Be sure to click Save Changes.

Once that is finished, head back to the Formsort S3 menu and click Save bucket info. Be sure the bucket is selected from the Pick a credential to use for this integration menu, and the bucket will be set to receive data.

AWS' official guide to creating an S3 can be viewed .

To get started, you'll want to sign in to the AWS Management Console and open the Amazon S3 console at .

You can see all of Amazon's rules for bucket name .

See a more detailed explanation of ACLs and ACL configuration

See a more in-depth explanation of Public Access setting .

For more information about bucket versioning, see the docs .

Tags and Default Encryption are disabled by default, and configuration is not required to get the S3 set up. However, if you'd like to learn more about them, you can visit the tag docs , and the docs for Default Encryption .

Once you have an S3 bucket set up in AWS, you can configure it's integration into Formsort to receive images or documents from , , or questions. Answers will not be sent to an S3 integration.

Once the S3 bucket is selected, it will be automatically set at the question level to receive images or documents from , , or questions. Answers from any other question component will not be sent to your S3 integration.

If you have deployed flows previous to integrating with your S3 bucket, it is advisable to re- those flows.

๐Ÿ’พ
here
https://console.aws.amazon.com/s3/
here
here
here
here
here
here
file
image upload
signature
file
image upload
signature
deploy
file
image upload
signature
bucket owner preferred
Setting up the S3 Bucket
Specifying a file destination
The S3 menu is located in the "Integrations" tab of the flow
View of the bucket in the AWS S3 console
The Bucket name and Region match the information in the AWS console
Copy this policy
Edit your Bucket Poilcy
Paste the auto-generated Formsort policy here
Formsort's CORS configuration code
The CORS configuration section in AWS
Paste the code into AWS\
Make sure the bucket is selected in the menu