Build a production-ready data transformation API in under 3 minutes. No infrastructure setup, no complex configuration - just powerful serverless functions that scale automatically.

3 Minutes

From code to live API endpoint

Auto-scaling

Handles 1 to 10,000+ requests instantly

Production Ready

HTTPS, monitoring, and global deployment

Real Business Impact: This isn’t a “hello world” demo. You’ll experience the full power of Ollie Hub’s integration system - enhancing external APIs with custom business logic and data processing. This is the kind of Hub integration that powers production applications.

What You’ll Build

Experience Ollie Hub’s custom integration power. When someone calls JSONPlaceholder through Hub, your function automatically enhances and transforms the response.

Original JSONPlaceholder API:

curl "https://jsonplaceholder.typicode.com/posts/1"

Returns basic data:

{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}

Hub-Enhanced Call:

curl "https://hub.ollie.app/https://jsonplaceholder.typicode.com/posts/1"

Your Hub integration transforms it to:

{
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "content": "quia et suscipit\nsuscipit recusandae...",
  "analytics": {
    "wordCount": 19,
    "readingTimeMinutes": 1,
    "characterCount": 146,
    "estimatedViewTime": "30 seconds"
  },
  "seo": {
    "slug": "sunt-aut-facere-repellat-provident",
    "metaTitle": "sunt aut facere repellat provident - Blog Post",
    "metaDescription": "quia et suscipit suscipit recusandae consequuntur...",
    "canonicalUrl": "https://myblog.com/posts/sunt-aut-facere-repellat-provident"
  },
  "social": {
    "twitterShareUrl": "https://twitter.com/intent/tweet?text=sunt%20aut%20facere...",
    "linkedinShareUrl": "https://linkedin.com/sharing/share-offsite/?url=...",
    "hashtags": ["#blog", "#content", "#reading"]
  },
  "transformedAt": "2024-01-15T10:30:00.000Z"
}

Deploy Your Function

1

Access Ollie Hub

Navigate to admin.ollie.app and sign in with:

GitHub

One-click OAuth for developers

Google

Enterprise SSO ready

Email

Secure magic link authentication

2

Create Your Workspace

Quick Organization:

  • Name: Your Company

Pro Tip: Choose a descriptive name - you’ll invite team members here later.

3

Create Request Function

Paste this production-ready code:

Complete function file:

// TypeScript interfaces
interface Post {
  userId: number;
  id: number;
  title: string;
  body: string;
}

interface EnrichedPost extends Post {
  content: string;
  analytics: {
    wordCount: number;
    readingTimeMinutes: number;
    characterCount: number;
    estimatedViewTime: string;
  };
  seo: {
    slug: string;
    metaTitle: string;
    metaDescription: string;
    canonicalUrl: string;
  };
  social: {
    twitterShareUrl: string;
    linkedinShareUrl: string;
    hashtags: string[];
  };
  transformedAt: string;
}

// Main Hub integration handler
export const handler = async (event: any): Promise<any> => {
  try {
    // First, fetch the original JSONPlaceholder data
    const originalResponse = await fetch(event.url);
    
    if (!originalResponse.ok) {
      return {
        statusCode: originalResponse.status,
        body: 'Post not found'
      };
    }
    
    const originalPost: Post = await originalResponse.json();
    
    // Transform the data with analytics and enrichment
    const enrichedPost = enrichPostData(originalPost);
    
    return {
      statusCode: 200,
      headers: {
        'Content-Type': 'application/json',
        'Access-Control-Allow-Origin': '*',
        'Cache-Control': 'public, max-age=300'
      },
      body: JSON.stringify(enrichedPost)
    };
    
  } catch (error) {
    console.error('Post transformation error:', error);
    return {
      statusCode: 500,
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        error: 'Internal server error',
        timestamp: new Date().toISOString()
      })
    };
  }
};

// Data transformation function
function enrichPostData(post: Post): EnrichedPost {
  const now = new Date().toISOString();
  
  // Generate slug from title
  const slug = post.title.toLowerCase()
    .replace(/[^a-z0-9\s]/g, '')
    .trim()
    .replace(/\s+/g, '-')
    .substring(0, 50);
  
  // Calculate content analytics
  const wordCount = post.body.split(/\s+/).length;
  const readingTimeMinutes = Math.max(1, Math.round(wordCount / 200));
  const characterCount = post.body.length;
  
  // Generate meta description (first 155 chars)
  const metaDescription = post.body.substring(0, 155) + '...';
  
  // Create share URLs
  const encodedTitle = encodeURIComponent(post.title);
  const encodedUrl = encodeURIComponent(`https://myblog.com/posts/${slug}`);
  
  return {
    ...post,
    content: post.body,
    analytics: {
      wordCount,
      readingTimeMinutes,
      characterCount,
      estimatedViewTime: readingTimeMinutes < 2 ? '30 seconds' : `${readingTimeMinutes} minutes`
    },
    seo: {
      slug,
      metaTitle: `${post.title} - Blog Post`,
      metaDescription,
      canonicalUrl: `https://myblog.com/posts/${slug}`
    },
    social: {
      twitterShareUrl: `https://twitter.com/intent/tweet?text=${encodedTitle}&url=${encodedUrl}`,
      linkedinShareUrl: `https://linkedin.com/sharing/share-offsite/?url=${encodedUrl}`,
      hashtags: ['#blog', '#content', '#reading']
    },
    transformedAt: now
  };
}
4

Deploy & Build

Watch real-time build logs in the deployment panel:

 Code validation passed
 Dependencies installed
 Function packaged
 Function deployed successfully
 Ready for activation
5

Activate Function

Make your function live and ready for requests

After successful deployment, your function will show as INACTIVE. Click “Activate Function” to make it live.

Activation Required: Functions are deployed but inactive by default. You must activate them to start receiving traffic.

 Function activated successfully
 Hub integration live: https://hub.ollie.app/https://jsonplaceholder.typicode.com/posts/*
6

Test Hub Integration

After activating your function, your Hub integration is now enhancing JSONPlaceholder calls! When you call the original API through Hub, your transformation runs automatically:

curl "https://hub.ollie.app/https://jsonplaceholder.typicode.com/posts/1"

Hub Integration Magic: Notice you’re calling the exact same JSONPlaceholder URL, but through hub.ollie.app. Your integration automatically enhances and transforms the response without the caller knowing!

Transformed Response:

{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto",
  "content": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto",
  "analytics": {
    "wordCount": 19,
    "readingTimeMinutes": 1,
    "characterCount": 146,
    "estimatedViewTime": "30 seconds"
  },
  "seo": {
    "slug": "sunt-aut-facere-repellat-provident",
    "metaTitle": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit - Blog Post",
    "metaDescription": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem...",
    "canonicalUrl": "https://myblog.com/posts/sunt-aut-facere-repellat-provident"
  },
  "social": {
    "twitterShareUrl": "https://twitter.com/intent/tweet?text=sunt%20aut%20facere...",
    "linkedinShareUrl": "https://linkedin.com/sharing/share-offsite/?url=...",
    "hashtags": ["#blog", "#content", "#reading"]
  },
  "transformedAt": "2024-01-15T10:30:00.000Z"
}

Understanding Hub Integrations

Function Types & Triggers

Request Functions

Perfect for: APIs, webhooks, real-time processing

Trigger: HTTP requests via Hub proxy

Examples: User authentication, payment processing, data validation

Response: Immediate HTTP response to caller

Response Functions

Perfect for: Post-processing, notifications, cleanup tasks

Trigger: Automatically after Request Functions complete

Examples: Send confirmation emails, update analytics, cache invalidation

Response: Runs asynchronously, no direct response to original caller

Task Functions

Perfect for: Scheduled jobs, maintenance, reports

Trigger: Cron expressions (e.g., daily at 9 AM)

Examples: Daily reports, data cleanup, inventory sync

Response: Runs on schedule, logs available in dashboard

Production Features

Your function is immediately production-ready with:

Auto-scaling

Handles 1 to 10,000+ concurrent requests automatically

Global Deployment

Available worldwide through edge locations

Real-time Monitoring

Live request logs, error tracking, and performance metrics

Built-in Security

HTTPS by default, input validation, and DDoS protection

Next Steps


Congratulations! You’ve deployed a production-ready API that can handle thousands of requests. Your function is automatically scaling, monitored, and ready to power real applications. View detailed logs and metrics in your Ollie Hub dashboard.