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
- Navigate to Flows in the sidebar
- Open an existing Flow or click Create Flow to start a new one
Step 2: Add an Airtable Action Node
- Click the + button on the canvas (or below an existing node)
- The activity picker slides in from the right
- Search for “Airtable” or browse the Apps category
- 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
- Double-click the Airtable node to open its settings panel
- At the top, you’ll see a Connection dropdown
- If you have existing Airtable connections, they appear in the list
- Click Add Connection to create a new one
Step 4: Complete the OAuth Flow
- A popup window opens, directed to Airtable’s authorization page
- Log in to your Airtable account (or confirm your session if already logged in)
- Review the permissions Vesbite is requesting – typically read/write access to your bases and records
- Click Grant access (or the equivalent approval button)
- 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:
- The Base dropdown loads all bases from your connected Airtable account. Select the one you want to work with.
- 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:
| Expression | Description |
|---|---|
{{ 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:
- Click the Run button on the Airtable node (if available in draft mode)
- Provide sample input data when prompted
- Check the output panel to confirm the record was created
- 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
- In the Flow builder, click the + button on the canvas
- Search for “SendGrid” and select Send Email
Step 2: Add a Connection
- Double-click the SendGrid node to open its settings
- Click the Connection dropdown and select Add Connection
- Instead of an OAuth popup, you’ll see an inline form
Step 3: Enter Your API Key
- Open your SendGrid dashboard and generate an API key (Settings > API Keys > Create API Key)
- Copy the key
- Back in Vesbite, paste it into the API Key field
- Give the connection a name (e.g., “Production SendGrid”)
- Click Save
Step 4: Configure the Email
Fill in the email fields:
| Field | Example Value |
|---|---|
| To | {{ variables.recipientEmail }} |
| From | alerts@yourcompany.com |
| Subject | Tag Scanned: {{ variables.epc }} |
| Body | Tag {{ 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
- In the Flow builder, click the + button
- Search for “PostgreSQL” and select the action you need (e.g., Execute Query or Insert Row)
Step 2: Add a Connection
- Double-click the node and click Add Connection
- Fill in the connection details:
| Field | Description |
|---|---|
| Host | Your database server address (e.g., db.example.com) |
| Port | PostgreSQL port (default 5432) |
| Database | The database name |
| Username | Database user |
| Password | Database password |
- Click Test Connection to verify connectivity
- 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:
- Your First Workflow – Build a complete device-to-Airtable automation
- How to Build a Flow – Learn all the canvas operations and node types
- Browse Integrations – See every service Vesbite supports
- Understanding Flows – Learn how data flows between nodes and how the execution engine works
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