To integrate SocialBee with Lovable, store your SocialBee API key in Cloud → Secrets and create an Edge Function that proxies calls to the SocialBee API. SocialBee's unique capability is content category management — posts are organized into categories that can be set to recycle automatically, publishing evergreen content repeatedly on a schedule. Unlike Sendible which focuses on agency multi-account management, SocialBee is built around the concept of categorized, recyclable content queues.
Add category-based social media scheduling and evergreen content recycling to Lovable via SocialBee
SocialBee's defining feature is its category-based scheduling architecture. Rather than scheduling individual posts to a linear queue, SocialBee organizes content into categories — 'Educational', 'Promotional', 'Engagement', 'Behind the Scenes' — and schedules categories to post at specific time slots. When a category has posts, it publishes one at the scheduled slot. When a category is marked as recyclable, it starts over from the first post after the last one is published. This means evergreen content — tips, FAQs, product highlights — gets continuously recycled without any manual effort.
Lovable has no native SocialBee connector, so the integration flows through a server-side Edge Function. Your Lovable app submits post content with a target category, the Edge Function calls the SocialBee API to add the post to that category queue, and SocialBee handles all scheduling and recycling logic from there. This is particularly useful for content-heavy Lovable apps where users generate or submit content regularly — blog posts that need to be promoted on social media, testimonials that should be shared periodically, product updates that need to reach multiple social channels.
SocialBee's API provides endpoints for managing workspaces, profiles (connected social accounts), categories, and posts. The workspace ID and category ID are the key identifiers you need alongside the API key. This guide covers retrieving these IDs, storing credentials, and building an Edge Function that adds posts to the correct SocialBee category for automated scheduling and recycling.
Integration method
SocialBee has no native Lovable connector. Post creation, category management, and social account operations are handled via a Lovable Edge Function that calls the SocialBee API. The API key is stored in Cloud → Secrets and accessed via Deno.env.get(), keeping credentials server-side and avoiding CORS errors from direct browser calls.
Prerequisites
- A Lovable project with Lovable Cloud enabled (Edge Functions require Lovable Cloud)
- A SocialBee account — plans start at $29/month with full API access (socialbee.com)
- Your SocialBee API key (SocialBee → Settings → Integrations → API Access)
- Your SocialBee Workspace ID and at least one Category ID (visible in the URL when viewing your workspace or category)
- At least one connected social profile in SocialBee and a posting schedule configured for your categories
Step-by-step guide
Get your SocialBee API key, Workspace ID, and Category IDs
Get your SocialBee API key, Workspace ID, and Category IDs
Gather the three key values from SocialBee: your API key, Workspace ID, and at least one Category ID. To get your API key: log in to SocialBee and go to Settings (click the gear icon or your profile). Navigate to Integrations or API Access. Generate or copy your API key. Keep this value secure — it authenticates all API requests. To find your Workspace ID: in SocialBee, your workspace is your main content area. The workspace ID appears in the URL when you are logged in — look for a numeric or alphanumeric ID in the path (e.g., app.socialbee.com/workspace/12345). Note this value. To find Category IDs: in SocialBee, go to Content → Categories. Click on a category. The category ID appears in the URL when viewing or editing that category. Note the IDs for each category you want to use in your Lovable integration — typically you will have separate categories for different content types (Educational, Promotional, Engagement, Testimonials, etc.). Alternatively, once you have your API key, you can call GET /api/v1/categories?workspace_id={id} to retrieve all categories with their IDs programmatically. This is useful if you want to show category options dynamically in your Lovable app rather than hardcoding them. Have your API key, Workspace ID, and the IDs for your target categories ready before the next step.
Pro tip: SocialBee categories must have a posting schedule configured before posts added to them will actually be published. Go to Content → Categories → your category → Schedule and set at least one posting time slot. Posts added to a category without a schedule will accumulate in the queue but never publish.
Expected result: You have your SocialBee API key, Workspace ID, and the IDs for your target categories ready to store as secrets.
Add SocialBee credentials to Lovable Cloud Secrets
Add SocialBee credentials to Lovable Cloud Secrets
Store your SocialBee credentials in Lovable's Cloud Secrets panel. In your Lovable project, click the '+' icon at the top of the editor to open the Cloud panel. Click the 'Secrets' tab and add the following secrets. First secret — Name: SOCIALBEE_API_KEY, Value: your SocialBee API key. This authenticates all API requests via the Authorization header as 'Bearer {api_key}'. Second secret — Name: SOCIALBEE_WORKSPACE_ID, Value: your numeric or alphanumeric workspace ID. This is required for most API calls to identify which workspace the operation targets. Optional category secrets — if you have specific default categories, store them as: SOCIALBEE_CATEGORY_EDUCATIONAL_ID, SOCIALBEE_CATEGORY_PROMOTIONAL_ID, etc. Storing category IDs as secrets lets you reroute post submissions to different categories by changing a secret value without code changes. SocialBee uses standard Bearer token authentication: Authorization: Bearer {api_key}. This is the same pattern as many other modern REST APIs and is straightforward to implement in the Edge Function.
Pro tip: For Lovable apps where different team members submit different types of content, consider storing a mapping of content type to category ID in your Supabase database rather than as secrets. This lets non-technical team members manage category routing through a simple admin interface without touching secrets.
Expected result: SOCIALBEE_API_KEY and SOCIALBEE_WORKSPACE_ID appear in Cloud → Secrets with values masked, plus any category ID secrets you added.
Create the SocialBee post management Edge Function
Create the SocialBee post management Edge Function
Create the Edge Function that adds posts to SocialBee categories and retrieves available categories. SocialBee's API base URL is https://app.socialbee.com/api/v1 and uses Bearer token authentication. For adding a post, the endpoint is POST /api/v1/posts. The request body (JSON) requires workspace_id, category_id, and the post content. Content is provided as an array of profile_posts — one for each social network type — or as a single unified content object. Each post can have text, media_url, and link fields. SocialBee automatically adapts the content for each connected social account in the category's assigned profiles. For retrieving categories, the endpoint is GET /api/v1/categories with workspace_id as a query parameter. This returns all categories with their IDs, names, types, and whether recycling is enabled. SocialBee's post status follows a lifecycle: draft → pending → published → (if recyclable) returned to pending. When you add a post via the API, it enters the category queue as pending and will be published at the next scheduled slot for that category. The Edge Function handles both the post creation (action='add-post') and category retrieval (action='get-categories') operations.
Create an Edge Function called socialbee-content at supabase/functions/socialbee-content/index.ts. Handle action='add-post' (add a post to a category with message, categoryId, imageUrl, link) and action='get-categories' (return all categories for the workspace). Use SOCIALBEE_API_KEY as Bearer auth and SOCIALBEE_WORKSPACE_ID from Deno env. API base is https://app.socialbee.com/api/v1. Include CORS headers and return success or error details.
Paste this in Lovable chat
1import { serve } from 'https://deno.land/std@0.168.0/http/server.ts'23const corsHeaders = {4 'Access-Control-Allow-Origin': '*',5 'Access-Control-Allow-Headers': 'authorization, x-client-info, apikey, content-type',6}78const BASE = 'https://app.socialbee.com/api/v1'910serve(async (req) => {11 if (req.method === 'OPTIONS') {12 return new Response('ok', { headers: corsHeaders })13 }1415 try {16 const body = await req.json()17 const { action } = body1819 const apiKey = Deno.env.get('SOCIALBEE_API_KEY')20 const workspaceId = Deno.env.get('SOCIALBEE_WORKSPACE_ID')2122 if (!apiKey || !workspaceId) {23 throw new Error('Missing required secrets: SOCIALBEE_API_KEY and SOCIALBEE_WORKSPACE_ID')24 }2526 const headers = {27 Authorization: `Bearer ${apiKey}`,28 'Content-Type': 'application/json',29 }3031 if (action === 'get-categories') {32 const res = await fetch(`${BASE}/categories?workspace_id=${workspaceId}`, { headers })33 if (!res.ok) {34 const err = await res.json().catch(() => ({}))35 throw new Error(`SocialBee categories error ${res.status}: ${JSON.stringify(err)}`)36 }37 const data = await res.json()38 const categories = (data.data || data || []).map((c: Record<string, unknown>) => ({39 id: c.id,40 name: c.name,41 recyclable: c.recycle || false,42 }))43 return new Response(44 JSON.stringify({ success: true, categories }),45 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }46 )47 }4849 if (action === 'add-post') {50 const { message, categoryId, imageUrl = '', link = '' } = body51 if (!message) throw new Error('message is required')52 if (!categoryId) throw new Error('categoryId is required')5354 const postPayload: Record<string, unknown> = {55 workspace_id: workspaceId,56 category_id: categoryId,57 content: [58 {59 text: message,60 ...(imageUrl ? { media_urls: [imageUrl] } : {}),61 ...(link ? { link } : {}),62 },63 ],64 }6566 const res = await fetch(`${BASE}/posts`, {67 method: 'POST',68 headers,69 body: JSON.stringify(postPayload),70 })7172 const data = await res.json().catch(() => ({}))73 if (!res.ok) {74 throw new Error(`SocialBee add-post error ${res.status}: ${JSON.stringify(data)}`)75 }7677 return new Response(78 JSON.stringify({ success: true, postId: data.data?.id || data.id || null, message: 'Post added to category queue' }),79 { headers: { ...corsHeaders, 'Content-Type': 'application/json' } }80 )81 }8283 throw new Error(`Unknown action: ${action}. Use 'add-post' or 'get-categories'.`)84 } catch (error) {85 return new Response(86 JSON.stringify({ error: error.message }),87 { status: 500, headers: { ...corsHeaders, 'Content-Type': 'application/json' } }88 )89 }90})Pro tip: SocialBee's content array in the add-post payload allows different text variations per social network — you can provide network-specific content by adding multiple objects to the content array with platform parameters. For most Lovable integrations, a single unified content object works well and SocialBee adapts it for each connected profile.
Expected result: The socialbee-content Edge Function is deployed. Test get-categories to verify your API key and workspace ID work. Test add-post with a test message and category ID — verify the post appears in SocialBee's category queue.
Build the content submission form in your Lovable app
Build the content submission form in your Lovable app
With the Edge Function deployed, build the content submission interface. The form fetches available SocialBee categories on mount and displays them as a dropdown or radio button group. When a user submits content, the form calls the Edge Function to add the post to the selected category. For team-based content workflows, consider showing the number of posts currently queued in each category — categories with full queues don't need new posts added, while low-queue categories are a priority. You can retrieve this queue count data from the SocialBee API's category endpoint which includes queue statistics. Recyclable categories (those set to repeat after the last post is published) are the most valuable categories to fill with high-quality evergreen content. In your UI, mark recyclable categories distinctly — for example, show a recycle icon — so content creators know which posts will be reused vs published once. When the form submits successfully, show which category the post was added to and remind the user about the category's posting schedule. This helps content creators understand when their post will actually be published and sets realistic expectations.
Create a social media content submission form for my Lovable app. On mount, fetch categories from socialbee-content with action='get-categories' and show them in a dropdown labeled 'Content Category' with a recycle icon next to recyclable categories. Add a textarea for the post message and optional image URL field. On submit, call socialbee-content with action='add-post'. Show success: 'Added to {category name} queue!' and clear the form.
Paste this in Lovable chat
1import { useState, useEffect } from 'react'2import { supabase } from '@/lib/supabase'3import { Button } from '@/components/ui/button'4import { Textarea } from '@/components/ui/textarea'5import { Input } from '@/components/ui/input'6import { Label } from '@/components/ui/label'7import { Select, SelectTrigger, SelectValue, SelectContent, SelectItem } from '@/components/ui/select'8import { toast } from '@/components/ui/use-toast'910interface Category { id: string; name: string; recyclable: boolean }1112export const SocialBeeSubmit = () => {13 const [message, setMessage] = useState('')14 const [imageUrl, setImageUrl] = useState('')15 const [categories, setCategories] = useState<Category[]>([])16 const [categoryId, setCategoryId] = useState('')17 const [loading, setLoading] = useState(false)1819 useEffect(() => {20 supabase.functions.invoke('socialbee-content', { body: { action: 'get-categories' } })21 .then(({ data }) => {22 setCategories(data?.categories || [])23 if (data?.categories?.length > 0) setCategoryId(data.categories[0].id)24 })25 .catch(() => toast({ title: 'Could not load categories', variant: 'destructive' }))26 }, [])2728 const selectedCategory = categories.find((c) => c.id === categoryId)2930 const handleSubmit = async (e: React.FormEvent) => {31 e.preventDefault()32 setLoading(true)33 try {34 const { error } = await supabase.functions.invoke('socialbee-content', {35 body: { action: 'add-post', message, categoryId, imageUrl },36 })37 if (error) throw error38 toast({ title: `Added to ${selectedCategory?.name || 'category'} queue!` })39 setMessage('')40 setImageUrl('')41 } catch (err) {42 toast({ title: 'Could not add post', variant: 'destructive' })43 } finally {44 setLoading(false)45 }46 }4748 return (49 <form onSubmit={handleSubmit} className="space-y-4 max-w-lg">50 <div>51 <Label>Content Category</Label>52 <Select value={categoryId} onValueChange={setCategoryId}>53 <SelectTrigger><SelectValue placeholder="Select a category" /></SelectTrigger>54 <SelectContent>55 {categories.map((c) => (56 <SelectItem key={c.id} value={c.id}>57 {c.recyclable ? '♻ ' : ''}{c.name}58 </SelectItem>59 ))}60 </SelectContent>61 </Select>62 </div>63 <div>64 <Label>Post Message *</Label>65 <Textarea value={message} onChange={(e) => setMessage(e.target.value)} placeholder="Write your social media post..." rows={4} required />66 </div>67 <div>68 <Label>Image URL (optional)</Label>69 <Input value={imageUrl} onChange={(e) => setImageUrl(e.target.value)} placeholder="https://..." />70 </div>71 <Button type="submit" disabled={loading || !categoryId}>72 {loading ? 'Adding...' : 'Add to Queue'}73 </Button>74 </form>75 )76}Pro tip: For Lovable apps with content approval workflows, store submitted posts in Supabase with a 'pending_review' status first, then only call SocialBee's API after an admin approves the content. This gives you a review gate between user submissions and social publishing.
Expected result: The content submission form loads with a dropdown of your SocialBee categories. When a user submits a post, it appears in the selected category's queue in SocialBee and will publish at the next scheduled slot for that category.
Common use cases
Add blog post social snippets to a SocialBee promotion category automatically
When a user publishes a new blog post in your Lovable app, automatically add promotional social media snippets to a SocialBee 'Blog Promotion' category. SocialBee distributes these posts across your connected social accounts according to the category's schedule. The blog post gets promoted on social media without any manual social scheduling step.
Create an Edge Function called socialbee-add-post that accepts { message, categoryId, imageUrl, link } and adds the post to a SocialBee category. Use SOCIALBEE_API_KEY and SOCIALBEE_WORKSPACE_ID from secrets. Call the SocialBee API POST /api/v1/posts endpoint. Include the image and link if provided. Return the created post ID or error details.
Copy this prompt to try it in Lovable
Build a content submission form that routes posts to SocialBee categories
Create a content submission interface in Lovable where team members write social media posts and select a target category (Educational, Promotional, Engagement). The Edge Function adds the post to the appropriate SocialBee category. Each category has its own posting schedule, so routing to the right category ensures the post gets published at the right frequency and time of day.
Create a social media content submission form with a message field, category dropdown (populated from SocialBee categories via the API), and optional image URL. When submitted, call socialbee-add-post with the selected category ID. Show a success message with the category name and estimated next publish time. Let team members see a count of posts queued in each category.
Copy this prompt to try it in Lovable
Recycle evergreen product testimonials across social channels via SocialBee
When a user submits a positive testimonial or review in your Lovable app, add it as a social post to a SocialBee 'Customer Success' category set to recycle. SocialBee continuously reposts the testimonial across your social channels on its schedule, keeping social proof visible to new followers without any ongoing manual effort.
After a user submits a testimonial with a 5-star rating in my app, format it as a social media post and add it to SocialBee category SOCIALBEE_TESTIMONIALS_CATEGORY_ID from secrets. The post should include the testimonial text, the customer's first name, and a star rating emoji. Call socialbee-add-post in the background after saving the testimonial to Supabase.
Copy this prompt to try it in Lovable
Troubleshooting
SocialBee API returns 401 Unauthorized for all requests
Cause: The SOCIALBEE_API_KEY is incorrect or the Authorization header format is wrong. SocialBee uses Bearer token authentication: Authorization: Bearer {api_key}.
Solution: Go to SocialBee → Settings → Integrations → API Access and copy the current API key. Update SOCIALBEE_API_KEY in Cloud → Secrets and trigger a redeployment. Verify the Edge Function constructs the header as: Authorization: `Bearer ${apiKey}` with a capital B and a space between Bearer and the key.
Posts are added to the category but never get published to social media
Cause: The SocialBee category does not have a posting schedule configured, or none of the connected social profiles are assigned to that category.
Solution: In SocialBee, go to Content → Categories → click on the category → Schedule. Verify at least one time slot is configured for each day you want posts to go out. Also check that social profiles (connected social accounts) are assigned to the category — go to the category settings and confirm which profiles are included in the posting queue.
Edge Function returns 'workspace not found' or 404 errors
Cause: The SOCIALBEE_WORKSPACE_ID is incorrect. Workspace IDs are not always visible in the SocialBee interface — they may need to be retrieved via the API.
Solution: Call GET https://app.socialbee.com/api/v1/workspaces with your API key as a Bearer token to retrieve your workspace ID. Update SOCIALBEE_WORKSPACE_ID in Cloud → Secrets with the correct value from the API response.
Categories are listed by get-categories but the wrong number of posts are shown
Cause: SocialBee's API response structure may wrap the categories array in a 'data' property. The Edge Function normalizes this, but if you are processing the raw response elsewhere, the structure may differ.
Solution: Always access categories as data.categories from the Edge Function response (which normalizes the data), rather than accessing the raw SocialBee API response format directly. The Edge Function extracts the array from data.data or data depending on the API response structure.
Best practices
- Always configure posting schedules in SocialBee before adding posts via the API — posts added to a category with no schedule will sit in the queue indefinitely without being published.
- Use SocialBee's recyclable category setting for evergreen content — tips, testimonials, product highlights — so this content continues to reach new followers without manual re-adding.
- Fetch categories dynamically via the get-categories action rather than hardcoding category IDs, so your Lovable app automatically reflects any category changes made in the SocialBee interface.
- Store the workspace ID and default category IDs as secrets rather than hardcoding them so you can switch between SocialBee workspaces or update category routing without code changes.
- For content that should only post once (time-sensitive announcements, one-time promotions), add it to a non-recyclable category specifically designated for time-sensitive content.
- Validate post content length before calling the Edge Function — different social networks have different character limits, and SocialBee may truncate or reject posts that exceed platform-specific limits.
- Consider storing post IDs returned by SocialBee in your Supabase database for tracking — this lets you later retrieve post performance analytics via the SocialBee API by referencing the stored IDs.
Alternatives
Choose Sendible if you manage social accounts for multiple agency clients and need white-label capabilities, rather than SocialBee's single-brand content category recycling focus.
Choose Sprout Social if you need enterprise-grade analytics, social listening, and deep team collaboration workflows alongside social scheduling.
Choose Planoly if your primary social media focus is visual planning for Instagram and Pinterest, where Planoly's drag-and-drop visual grid planning is more specialized than SocialBee's category system.
Frequently asked questions
What is content category recycling in SocialBee and why does it matter for a Lovable app?
Content recycling in SocialBee means that when a category runs out of posts, it starts over from the beginning — continuously republishing the same evergreen content on a rotating schedule. For a Lovable app, this means you can add a collection of evergreen posts (tips, FAQs, testimonials, product highlights) to a recyclable category once, and SocialBee will keep promoting them indefinitely without any ongoing manual effort. It is one of the most time-efficient features in social media marketing.
How does SocialBee compare to Sendible for a Lovable integration?
SocialBee and Sendible both schedule social media posts, but with different primary focuses. SocialBee is built around content categories and evergreen recycling — the right tool when you have a library of reusable content. Sendible is built for agencies managing multiple client accounts with white-label capabilities — the right tool when your Lovable app manages social media for multiple businesses. For a single brand with lots of evergreen content, SocialBee is better. For a multi-client agency tool, Sendible is more appropriate.
Does SocialBee support image and video uploads via the API?
SocialBee's API supports passing image URLs (media_urls field in the content payload) for posts. For video content, you typically upload the video to cloud storage first (Lovable Cloud Storage or AWS S3) and pass the public URL to SocialBee. Direct video file upload via the API may require multipart form upload — check the current SocialBee API documentation for the latest supported media upload methods.
What social networks does SocialBee support?
SocialBee supports Facebook (profiles, pages, groups), Twitter/X, Instagram (business accounts), LinkedIn (profiles and company pages), Google My Business, Pinterest, and TikTok on higher plans. The available networks depend on your SocialBee plan tier. Each connected social account is assigned to categories, and SocialBee publishes category posts to all assigned accounts at the scheduled time.
Can I retrieve analytics data about my SocialBee posts from Lovable?
SocialBee's API includes endpoints for retrieving post performance data including engagement metrics. You can call GET /api/v1/posts/{postId}/analytics to get metrics for a specific post if you stored the post ID from the creation response. For aggregate analytics, SocialBee's dashboard is more practical than building an analytics page in Lovable. Use the API for displaying post-level performance data in context with your app's content.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation