Connecting Your First Integration

Integrations let your Flows interact with external services – creating records in Airtable, sending emails through SendGrid, querying a PostgreSQL database, or calling any REST API. This tutorial walks you through connecting each type of integration and using it in a Flow.

Time: ~10 minutes

What You’ll Learn

  • How to add an integration action node to the Flow canvas
  • How to authenticate with OAuth services (Airtable), API key services (SendGrid), and databases (PostgreSQL)
  • How to configure dynamic fields and map data using Vex expressions
  • How to test an action before publishing

Prerequisites

  • A Vesbite account with at least one Flow (follow Your First Workflow if you haven’t created one yet)
  • Credentials for the service you want to connect (Airtable account, SendGrid API key, or PostgreSQL connection string)

Part 1: OAuth Integrations (Airtable)

OAuth integrations use a popup-based login flow. Vesbite handles token management, refresh, and storage automatically – you just log in once.

Step 1: Open the Flow Builder

  1. Navigate to Flows in the sidebar
  2. Open an existing Flow or click Create Flow to start a new one

Step 2: Add an Airtable Action Node

  1. Click the + button on the canvas (or below an existing node)
  2. The activity picker slides in from the right
  3. Search for “Airtable” or browse the Apps category
  4. Select the action you need – for this tutorial, choose Create Record

The node appears on the canvas, connected to the previous node.

Step 3: Add a Connection

  1. Double-click the Airtable node to open its settings panel
  2. At the top, you’ll see a Connection dropdown
  3. If you have existing Airtable connections, they appear in the list
  4. Click Add Connection to create a new one

Step 4: Complete the OAuth Flow

  1. A popup window opens, directed to Airtable’s authorization page
  2. Log in to your Airtable account (or confirm your session if already logged in)
  3. Review the permissions Vesbite is requesting – typically read/write access to your bases and records
  4. Click Grant access (or the equivalent approval button)
  5. The popup closes automatically and your new connection appears selected in the dropdown

Your connection is now saved. Vesbite securely stores the OAuth tokens and automatically refreshes them when they expire. You can reuse this connection across all your Flows.

Step 5: Select Your Base and Table

With the connection established, the rest of the form populates dynamically from your Airtable account:

  1. The Base dropdown loads all bases from your connected Airtable account. Select the one you want to work with.
  2. The Table dropdown loads all tables from the selected base. Choose your target table.

These dropdowns fetch live data from Airtable each time you open the settings, so new bases and tables appear automatically.

Step 6: Map Fields Using Expressions

The Fields section shows the columns from your selected table. For each field, you can enter:

  • Static values – plain text or numbers entered directly (e.g., Warehouse A)
  • Vex expressions – dynamic values wrapped in {{ }} that evaluate at runtime

Common expressions for mapping fields:

ExpressionDescription
{{ variables.eventData[0].epc }}EPC from the first tag in a device event
{{ variables.epc }}A variable set earlier in the Flow
{{ date.now }}Current date and time
{{ output("activityId").data.name }}Output from a previous activity node
{{ variables.eventData | object.to_string }}Full event payload as a JSON string

Step 7: Test the Action

Before publishing your Flow, verify the integration works:

  1. Click the Run button on the Airtable node (if available in draft mode)
  2. Provide sample input data when prompted
  3. Check the output panel to confirm the record was created
  4. Verify in Airtable that the record exists

Once confirmed, click Save and publish your Flow.


Part 2: API Key Integrations (SendGrid)

Some services authenticate with an API key instead of OAuth. The setup is simpler – you paste your key and you’re connected.

Step 1: Add a SendGrid Node

  1. In the Flow builder, click the + button on the canvas
  2. Search for “SendGrid” and select Send Email

Step 2: Add a Connection

  1. Double-click the SendGrid node to open its settings
  2. Click the Connection dropdown and select Add Connection
  3. Instead of an OAuth popup, you’ll see an inline form

Step 3: Enter Your API Key

  1. Open your SendGrid dashboard and generate an API key (Settings > API Keys > Create API Key)
  2. Copy the key
  3. Back in Vesbite, paste it into the API Key field
  4. Give the connection a name (e.g., “Production SendGrid”)
  5. Click Save

Step 4: Configure the Email

Fill in the email fields:

FieldExample Value
To{{ variables.recipientEmail }}
Fromalerts@yourcompany.com
SubjectTag Scanned: {{ variables.epc }}
BodyTag {{ variables.epc }} was read at {{ date.now }} on antenna {{ variables.eventData[0].antenna }}.

All fields accept Vex expressions, so you can build dynamic emails driven by device data.


Part 3: Database Connections (PostgreSQL)

Database integrations connect directly to your PostgreSQL instance, letting you run queries, insert rows, and read data from within a Flow.

Step 1: Add a Database Node

  1. In the Flow builder, click the + button
  2. Search for “PostgreSQL” and select the action you need (e.g., Execute Query or Insert Row)

Step 2: Add a Connection

  1. Double-click the node and click Add Connection
  2. Fill in the connection details:
FieldDescription
HostYour database server address (e.g., db.example.com)
PortPostgreSQL port (default 5432)
DatabaseThe database name
UsernameDatabase user
PasswordDatabase password
  1. Click Test Connection to verify connectivity
  2. Click Save

Step 3: Write Your Query

For an Execute Query action, enter your SQL with Vex expressions for dynamic values:

INSERT INTO tag_reads (epc, read_at, antenna)
VALUES ('{{ variables.epc }}', NOW(), {{ variables.eventData[0].antenna }})

For an Insert Row action, select the table and map columns to values just like the Airtable field mapping.


Connection Management

All connections you create are available across your Flows. A few things to know:

  • Reuse connections – Once created, a connection appears in the dropdown for any node of the same integration type across all your Flows
  • Security – Credentials are encrypted at rest (AES-256), transmitted over TLS, and access-controlled per team
  • Token refresh – OAuth tokens are refreshed automatically before they expire
  • Multiple connections – You can have multiple connections to the same service (e.g., separate Airtable connections for different workspaces)

Next Steps

Now that you know how to connect integrations, explore what you can build:

Ideas to try:

  • Chain multiple integrations: read a tag, look up inventory in Airtable, and send a SendGrid alert if stock is low
  • Use a database query to check if a tag has been seen before, then branch based on the result
  • Build a webhook-triggered Flow that writes to both Airtable and PostgreSQL simultaneously