Feathery Docs
HomeCommunityGitHub
  • Platform
    • Quickstart
    • Form Fields
      • Hidden Fields
      • How to Set Field Values
      • Link Fields Across Forms
      • Custom Field Input Format
    • Build Forms
      • Elements
        • Basic
          • Container
          • Button
          • Text
          • Progress Bar
          • Image
          • PDF Viewer
          • Video
          • Table
          • Tooltip
        • Fields
          • Address
            • Street Address Line 1
            • Street Address Line 2
            • City
            • State
            • Country
            • Zip Code
          • Button Group
          • Checkbox
          • Checkbox Group
          • Color Picker
          • Combobox
          • Dropdown
          • Dropdown Multiselect
          • Date Selector
          • Time Selector
          • Email
          • File Upload
          • Matrix
          • Number
          • Password
          • Picture Choice
          • Pin Input
          • Phone Number
          • Radio Group
          • Rating
          • Signature
            • Legally Binding Signatures
          • Slider
          • Social Security Number
          • Text Area
          • Text Field
          • Payment Method
          • URL
        • Custom HTML, JS, CSS, and Iframes
        • Custom Fields
      • Design
        • Reuse styles and elements
          • Styling
          • Assets
        • Alignment and Spacing
        • Sizing Forms and Elements
        • Responsive Layouts
      • Actions
      • Logic
        • Navigate Steps Conditionally
        • Show Elements Conditionally
        • Custom Field Validation
        • Available Conditions
        • Display Dynamic Text
        • Dynamically Repeating Containers
      • Advanced Logic & API Connections
        • Visual Rule Builder
          • Connect to API Action
            • Salesforce API Connector
          • Set Field Value Action
          • Navigate Step Action
          • Set Field Error Action
          • Open URL Action
          • Set Calendly URL Action
        • Javascript Rule Builder
          • API Connections in Code
          • Trigger Integrations from Logic
          • Reusable Logic Configs
        • Examples
          • API Connectors
            • Dynamic dropdown options
            • Dynamic form navigation
            • Pre-fill form from Salesforce
            • Pre-fill form from Hubspot
            • Pre-fill field options from Google Sheets
            • Generate ChatGPT Message
          • Field Validation
            • Complex Field Validation
            • Date and Time Validations
          • Initialize Date Field
          • Dynamically set field placeholder
          • Randomize Field Option Order
          • Update field options based on previous selection
      • Integrations
        • Event Triggers
        • Examples
          • Upload Files to Google Drive
      • Dev & Staging Environments
    • Launch Forms
      • Embed Your Forms
      • Custom URLs & SEO
      • User Tracking
      • Completion Criteria
      • UTM Parameters
      • Accessibility Standards
      • Analytics
      • A/B Testing
      • Offline Mode
    • Document Intelligence
      • Review Extractions
      • Post Processing
      • Supported Document Types
      • Prompting Guide
      • Examples
        • Investment Report
    • Document Autofill & Signatures
      • Autofill Document Templates
        • PDF Autofill
        • Word Doc Autofill
          • Dynamic Tables
        • Excel Autofill
        • InDesign Autofill
      • Signature Workflows
        • Signature Notifications
        • Access Signed Documents
        • 21 CFR Part 11 Compliance
      • Export Form Submission PDF
    • Workflows
      • Collaboration
        • Email Invite
        • Start Directly
        • Anonymous Starts
      • Review, Edit & Approve
      • Unique Submission Links
    • Enterprise Compliance
      • Security and Privacy
      • Reliability and Performance
      • Document Management
      • Data Sovereignty
    • International Forms
      • Translate Forms
      • Right to Left (RTL) Support
      • International Form Fields
    • White Label Feathery
      • Build Custom Form Fields
      • Offer Custom Form Templates
      • Custom Dashboard Domain
    • Account Settings
      • Managing Your Team
      • Permissions and User Groups
      • Account Attributes
    • FAQs
      • Account & Billing
  • Guides
    • Verify Submissions & Prevent Spam
    • Build a Login or Verification Flow
      • Connect an Auth Integration
      • Add Auth Methods
        • Email SMS Code
        • Email Magic Link
        • Phone Number Verification
        • Social Logins
          • Google
          • Amazon
          • Apple
          • Bitbucket
          • Coinbase
          • Discord
          • Facebook
          • GitHub
          • GitLab
          • LinkedIn
          • Microsoft
          • Slack
          • Twitch
          • Twitter
      • (Optional) Require Auth for Onboarding Steps
      • (Optional) Add Login Flow to Your Site
        • Feathery-Hosted (Recommended)
        • Embed Login Flow
          • Login Embed Tutorial
    • Build a Payment Flow
      • Connect to Stripe
      • Select Products or Plans
      • Collect Payment Method
      • Purchase Products
    • Send Custom SMS Messages
    • Salesforce Picklist Options
  • Developers
    • React SDK
      • API Guide
        • init()
        • <Form>
          • contextRef
          • Event Handlers
            • onSubmit()
            • onLoad()
            • onChange()
            • onAction()
            • onError()
            • onFormComplete()
            • onView()
          • Custom JSX Components
          • PopupOptions
          • initialLoader
        • getFieldValues()
        • setFieldValues()
        • updateUserId()
        • Login API
          • <LoginForm>
          • useAuthClient()
      • Inline vs Popup Form
    • Javascript SDK
    • Context API
      • Field Object
      • field.setStyles()
      • Deprecated Context API
    • REST API
Powered by GitBook
On this page
  • Example Use Cases:
  • Video Demo
  • How to access
  • 1. Define the endpoint
  • 2. Define the API response format
  • 3. Map the API result to form fields
  • 4. Use the No-Code API Connector in a Logic Rule
  • Variables
  • Pass File Binary via URL

Was this helpful?

  1. Platform
  2. Build Forms
  3. Advanced Logic & API Connections
  4. Visual Rule Builder

Connect to API Action

Send or receive data to/from any API without having to write code

PreviousVisual Rule BuilderNextSalesforce API Connector

Last updated 2 months ago

Was this helpful?

Feathery's No-Code API Connectors, an extension of our no-code Rule Builder, allows you to send or receive data to/from any API without having to write code, all within any Feathery form or workflow.

Example Use Cases:

  • Dynamically rendering options for a drop-down

  • Looking up a user in a database or CRM (ex: Salesforce, HubSpot) and prefilling their information

  • Sending form data to your custom API endpoints

  • Running custom validation logic from an API (ex: verify if a user's identity is valid)

Video Demo

How to access

Within the Logic tab of your form, create a Rule within Feathery's No Code Rule Builder. Then, within a Rule, you can define an Action for "Connect to API" which kickstarts the No Code API Connector flow.

1. Define the endpoint

First, go to the Logic tab of your form, click "API Connectors" and press the "Create API Connectors" button.

Set the endpoint you want to use and any headers you want to send. Please refer to your intended API's documentation to determine which endpoint and headers to use. You must also set what type of API request you need to make, such as a GET request for receiving information into your form or a POST request for sending form data to an API.

You can also define what data you want to send to the request. You can reference field values for these as well using the {{field_name}} syntax.

Any data you define in the headers or query parameters (such as sensitive API keys) will not be exposed client side to people filling your form.

For POST requests, you can define the request body that you want to POST to your endpoint. The format is a key (as a string) followed by a string value, with any variables included within the string enclosed in double curly braces, such as:

{ "sample_key" : "{{sample_field_id}}" }

Make sure each field is defined and published first before referencing the field in the request body.

2. Define the API response format

You can define the API response format in two ways:

Option 1: Make a test API call

You can run a test API call with the parameters you defined in the previous step to see the result. If you used any field values for headers or query parameters, you can define them prior to the test API call being run.

Option 2: Input a sample JSON response

You can also paste a sample response (ex: from the API docs) in case you may not be able to call the API just yet

3. Map the API result to form fields

You can configure how to extract data from the API's response. You can configure which fields you want to map to and which parts of the API response to pull from (ex: certain fields in the respones or indices of an array).

Feathery supports pulling and mapping data from nested response fields and lists/arrays.

For example, in the screenshot below, we are mapping the "salesforce-full-name" field to the "Name" field of the first element "records" key in the response json, which is represented by the syntax "records.0.Name" (where 0 represents the 0th/first index of the array/list). You can use the dropdown to see all available mappings.

You can also map multiple fields at once. In this case, we are mapping both the Account Name and Full Name fields.

4. Use the No-Code API Connector in a Logic Rule

Go to the Logic tab of your form and create a Rule. Set the action of your rule to "Connect to API" and select the API connector you created in the previous step. Then, the API connector will run when the rule's trigger is activated.

In the example below, we connect to the Salesforce API whenever the "salesforce-email" field is changed.

Variables

When defining and using your connectors, you may also have access to backend environment variables such as authentication tokens. You may define these via double curly braces in either the API connector headers or the url being passed into the feathery.http interface.

The authentication token for any connected integration can now be used in API connectors. The syntax to reference the auth token is {{integration-name_token}}.

Example variables that you have access to include (but are not limited to):

  • {{feathery_user_id}} - the unique ID of the current submission / form end-user

  • {{feathery_form_id}}- the ID of the current form

  • {{<Integration Type>_token}} - auth token of your integration, if active. This can be salesforce_token , hubspot_token, emoney_token, google-sheets_token, etc.

  • {{FeatheryDocument:<Document ID>}} - this allows you to include a link to a generated / e-signed document envelope.

Pass File Binary via URL

To pass the binary of a file directly as the request body, you may define the request body in the specific format {"FeatheryBinaryData": "<URL>"}, where the URL points to a file whose content should be downloaded and passed directly as the request body.

The Content-Typerequest header will automatically be set to the type of the file. If you specify a query parameter with the value {{feathery_file_name}}, that will automatically be set to the name of the file (with its file extension).

You can also use the format {"FeatheryBinaryData": ["<URL>"]} where an array of URLs are specified. In this approach, the API request will be issued multiple times, once with each URL's binary data passed. The responses will be returned in an array to the logic rule that initiated the connector, while the returned field values will be the combined values from all of the responses.

For example, you could pass {"FeatheryBinaryData": "{{MultiFileUpload}}"} where MultiFileUploadcorresponds to the ID of a multi-file upload field in Feathery. This would allow passing the binary of each uploaded file within the field.

{{feathery_auth_email}} - the authenticated email address of your current user, if an auth integration like or is turned on

Stytch
Firebase
Example POST request