Zapier Integration
Connect OilPriceAPI to 6,000+ applications using Zapier. Build automated workflows to track oil prices, send alerts, update spreadsheets, and integrate commodity data into your business processes without writing code.
Overview
Zapier enables you to create automated workflows called "Zaps" that connect OilPriceAPI with popular applications like Google Sheets, Slack, Microsoft Teams, Airtable, and thousands more. No programming required.
Common Use Cases:
- Send daily oil price reports to Slack or Microsoft Teams
- Update Google Sheets with latest crude oil prices
- Trigger email alerts when prices cross thresholds
- Sync commodity data to CRM systems
- Create automated price tracking dashboards
Prerequisites
Before you begin, ensure you have:
- An active OilPriceAPI account with API key (Sign up)
- A Zapier account (Create free account)
- Access to the apps you want to connect (Google Sheets, Slack, etc.)
Step-by-Step Setup
Step 1: Create a New Zap
- Log in to your Zapier dashboard
- Click Create Zap in the top-left corner
- Name your Zap descriptively (e.g., "Daily Brent Crude Price to Slack")
Step 2: Configure the Trigger
Since OilPriceAPI uses a REST API, you'll use Webhooks by Zapier or Schedule by Zapier as your trigger.
Option A: Schedule-Based Trigger (Recommended for Price Updates)
- Search for and select Schedule by Zapier
- Choose Every Day, Every Hour, or Every Week based on your needs
- Configure the time you want the workflow to run
- Click Continue
Option B: Webhook Trigger (For Real-Time Updates)
If you have a webhook-enabled plan, you can set up real-time price alerts:
- Search for and select Webhooks by Zapier
- Choose Catch Hook as the trigger event
- Copy the webhook URL provided by Zapier
- Configure this URL in your OilPriceAPI webhook settings
Step 3: Add OilPriceAPI Action
- Click the + button to add an action
- Search for and select Webhooks by Zapier
- Choose GET as the action event
- Configure the request:
URL:
https://api.oilpriceapi.com/v1/prices/latest
Query String Params (optional):
by_code: BRENT_CRUDE_USD,WTI_USD,NATURAL_GAS_USD
Headers:
Authorization: Token YOUR_API_KEY
Content-Type: application/json
- Click Test action to verify the connection
- You should see a response with current oil price data
Step 4: Connect Your Destination App
Now add the app where you want to send the oil price data.
Example: Send to Slack
- Click + to add another action
- Search for Slack
- Choose Send Channel Message
- Connect your Slack account
- Select the channel
- Format your message using data from the API response:
Oil Price Update:
Brent Crude: ${{data.price}} per barrel
Updated: {{data.updated_at}}
Step 5: Test and Activate
- Click Test Zap to run a complete test
- Verify the output in your destination app
- Toggle your Zap ON to activate it
Popular Automation Recipes
Recipe 1: Daily Price Report to Google Sheets
Track historical prices by automatically logging daily data to a spreadsheet.
Trigger: Schedule by Zapier (Every day at 8:00 AM)
Action 1: Webhooks by Zapier (GET)
- URL:
https://api.oilpriceapi.com/v1/prices/latest?by_code=BRENT_CRUDE_USD,WTI_USD
Action 2: Google Sheets (Create Spreadsheet Row)
- Spreadsheet: Your Oil Price Tracker
- Columns: Date, Brent Price, WTI Price, Change %
Recipe 2: Price Alert to Email
Get notified when oil prices change significantly.
Trigger: Schedule by Zapier (Every hour)
Action 1: Webhooks by Zapier (GET)
- URL:
https://api.oilpriceapi.com/v1/prices/latest?by_code=BRENT_CRUDE_USD
Action 2: Filter by Zapier
- Only continue if: Price change > 2%
Action 3: Gmail (Send Email)
- Subject: "Oil Price Alert: Brent Crude moved %"
Recipe 3: Team Notification in Microsoft Teams
Keep your team updated with market movements.
Trigger: Schedule by Zapier (Every weekday at 9:00 AM)
Action 1: Webhooks by Zapier (GET)
- URL:
https://api.oilpriceapi.com/v1/prices/latest
Action 2: Microsoft Teams (Send Channel Message)
- Format as adaptive card with price data
Recipe 4: CRM Update with Commodity Costs
Update your CRM records with current fuel costs for logistics planning.
Trigger: Schedule by Zapier (Every Monday at 6:00 AM)
Action 1: Webhooks by Zapier (GET)
- URL:
https://api.oilpriceapi.com/v1/prices/latest?by_code=DIESEL_USD,JET_FUEL_USD
Action 2: Salesforce (Update Record)
- Object: Custom Commodity Prices object
Tips for No-Code Users
Use Formatter by Zapier
Transform API responses for cleaner output:
- Add Formatter by Zapier between your API call and destination
- Use Numbers > Format Number to add currency symbols
- Use Date/Time > Format to make timestamps readable
Add Filters for Smart Automation
Only trigger actions when conditions are met:
- Add Filter by Zapier after your API call
- Set conditions like:
- Only continue if price > $80
- Only continue if change_percent is not empty
- Only continue if commodity_code equals "BRENT_CRUDE_USD"
Handle Errors Gracefully
- Add Paths by Zapier for conditional logic
- Create an error notification path if API call fails
- Use Zapier's built-in error notifications in Settings
Available Endpoints for Zapier
| Endpoint | Description | Best For |
|---|---|---|
/v1/prices/latest | Current prices for all commodities | Daily updates, dashboards |
/v1/prices/latest?by_code=CODE | Specific commodity price | Targeted alerts |
/v1/commodities | List all available commodities | Reference data |
/v1/prices/past_day | Last 24 hours of prices | Trend analysis |
Troubleshooting
Zap Not Triggering
- Verify your API key is correct and active
- Check that your schedule trigger is enabled
- Review Zap history for error messages
No Data Returned
- Ensure the endpoint URL is correct
- Verify Authorization header format:
Token YOUR_API_KEY - Check your API quota hasn't been exceeded
Invalid Response Format
- Use Formatter by Zapier to parse JSON responses
- Add a Code by Zapier step if you need custom parsing
FAQ
Can I use OilPriceAPI with Zapier's free plan?
Yes, you can use the basic integration with Zapier's free plan, which includes 100 tasks per month. For more frequent updates or multi-step Zaps, you'll need a paid Zapier plan.
How often can I fetch oil price data?
This depends on your OilPriceAPI plan. Free accounts allow 100 lifetime requests. Paid plans support up to 100+ requests per second. Match your Zapier schedule to your API limits.
Can I get real-time price alerts?
Yes, with an OilPriceAPI plan that includes webhooks, you can receive real-time price updates. Configure your webhook URL in your OilPriceAPI dashboard.
Which commodities can I track?
OilPriceAPI provides data for Brent Crude, WTI, Natural Gas, Diesel, Jet Fuel, Heating Oil, and many more commodities. Use the /v1/commodities endpoint to see the full list.
How do I format prices in my messages?
Use Formatter by Zapier to convert numbers to currency format. For example, transform 85.42 to $85.42 USD.