Connect Retool to Agorapulse by creating a REST API Resource with Agorapulse's base URL and OAuth 2.0 access token authentication. Use Agorapulse's API to build a social media inbox and reporting panel — manage incoming messages across platforms, schedule and review posts, and view engagement analytics for all connected social profiles from a single Retool command center.
| Fact | Value |
|---|---|
| Tool | Agorapulse |
| Category | Marketing |
| Method | REST API Resource |
| Difficulty | Intermediate |
| Time required | 30 minutes |
| Last updated | April 2026 |
Build a Unified Social Media Inbox and Reporting Panel in Retool
Agorapulse consolidates social media management across multiple platforms, but teams handling high message volumes often need more than Agorapulse's standard inbox view. By connecting Agorapulse to Retool, you can build a custom command center that combines inbox management, post scheduling status, and cross-platform engagement analytics in a single configurable dashboard tailored to your team's workflow.
With a Retool-Agorapulse integration, your social media and community management teams can view and filter all incoming inbox items by profile, status, and tag; reply to messages or assign them to team members; check publishing queue status for scheduled posts; and pull engagement metrics — likes, comments, reach, impressions — across all connected social profiles. Combining Agorapulse data with your CRM or customer database in the same Retool app lets you route social inquiries directly to support tickets or enrich customer records with social engagement history.
Agorapulse's REST API uses Bearer token authentication with tokens obtained via an OAuth 2.0 client credentials or authorization code flow. Retool's server-side proxy keeps your access token secure, eliminating CORS concerns and ensuring credentials never reach the browser. The inbox, publishing, and analytics endpoint groups cover the core social media operations your team needs to manage from a centralized panel.
Integration method
Agorapulse connects to Retool through a REST API Resource using OAuth 2.0 Bearer token authentication. You obtain an access token by exchanging your client credentials, then configure the token in Retool's resource settings so all social inbox, publishing, and analytics queries are proxied server-side. Authentication is configured once at the resource level, and individual queries target specific inbox, publishing, or analytics endpoints.
Prerequisites
- An Agorapulse account with social profiles connected and API access enabled (available on Professional plans and above)
- Agorapulse OAuth 2.0 client credentials (client_id and client_secret) from your Agorapulse developer app settings
- An access token obtained via Agorapulse's OAuth flow, or set up a Retool Workflow to refresh tokens automatically
- A Retool account with permission to create Resources
- Familiarity with Retool's query editor, Table component, and event handlers
Step-by-step guide
Obtain an Agorapulse OAuth 2.0 access token
Agorapulse uses OAuth 2.0 for API authentication. Before configuring Retool, you need a valid access token. Log into your Agorapulse account and navigate to your account settings to find the API/Developer section. Create an OAuth application to get a client_id and client_secret. To obtain an initial access token, use Agorapulse's token endpoint. Send a POST request to https://app.agorapulse.com/api/oauth/token with a JSON body containing your grant_type, client_id, client_secret, and (for the authorization code flow) the authorization code you obtain from the OAuth consent screen. For server-to-server internal tools, use the client credentials grant if your plan supports it. The response contains an access_token (valid for a configurable duration) and a refresh_token. Copy the access_token — you will use it in the Retool resource configuration. Store the refresh_token securely in Retool's configuration variables, as you will need it to obtain new access tokens when the current one expires. For production Retool integrations, consider building a Retool Workflow on a schedule that automatically refreshes the Agorapulse token before it expires and updates the configuration variable. This prevents 401 errors from appearing in your team's dashboards when tokens go stale.
Pro tip: Agorapulse access tokens expire. Store both the access_token and refresh_token in Retool configuration variables (Settings → Configuration Variables), mark them as Secret, and set up a Retool Workflow to refresh them on a schedule before expiry.
Expected result: You have a valid Agorapulse OAuth 2.0 access token ready to configure in Retool. The token is stored securely and you have a plan for refreshing it before it expires.
Create an Agorapulse REST API Resource in Retool
Navigate to the Resources tab in your Retool instance and click Add Resource. Select REST API from the resource type list. Name the resource 'Agorapulse API'. In the Base URL field, enter https://app.agorapulse.com/api. This is Agorapulse's REST API base URL — all endpoint paths in your queries will append to this URL. Do not include a trailing slash. For authentication, select Bearer Token from the Authentication dropdown. In the Token field, reference your configuration variable using the expression {{ retoolContext.configVars.AGORAPULSE_ACCESS_TOKEN }}. This keeps the token out of the resource settings UI and allows you to rotate it without editing the resource configuration. Alternatively, for initial testing you can paste the access token value directly into the Token field. However, for any team-shared or production Retool instance, always use configuration variables for credentials. Add a default header for the API version if required by the Agorapulse API version you are targeting. Check Agorapulse's current API documentation for any required headers such as Accept: application/json. Click Save Changes to create the resource.
Pro tip: If Agorapulse returns a 401 after you configure the resource, verify the token hasn't expired. Agorapulse tokens have a limited lifetime. Also confirm the token was generated for the correct Agorapulse account — test and production environments use separate credentials.
Expected result: The Agorapulse API REST resource appears in your Resources list with Bearer token authentication configured. A test query to /users/me (GET) should return your Agorapulse account details, confirming the connection is working.
Query the Agorapulse inbox for incoming social messages
Create your first query to pull inbox items. In your Retool app, open the Code panel and click the + button to add a new query. Name it getInboxItems and select the Agorapulse API resource. Set Method to GET. In the Path field, enter /inbox. Agorapulse's inbox endpoint returns items from your social profiles' inboxes — comments, messages, mentions, and reviews. Add URL parameters to filter the results: - Add a parameter: key = status, value = {{ select_status.value || 'pending' }} — this lets a Dropdown component in your app control which status is shown (pending, assigned, reviewed) - Add a parameter: key = per_page, value = 50 - Add a parameter: key = page, value = {{ pagination.current || 1 }} Create a second query named getProfileList (GET, path /profiles) to retrieve all connected Agorapulse social profiles. Use this to populate a profile filter dropdown in your app. Bind the Dropdown component options to {{ getProfileList.data.map(p => ({ label: p.name + ' (' + p.provider + ')', value: p.id })) }}. Create a third query named getInboxByProfile with an additional URL parameter: key = profile_ids[], value = {{ dropdown_profile.value }} to filter inbox items to a specific profile. Add a JavaScript transformer to flatten the inbox response into table-friendly rows with the fields your team needs.
1// JavaScript transformer — flatten Agorapulse inbox items for the Table component2const items = data || [];3return items.map(item => {4 return {5 id: item.id,6 platform: item.profile?.provider || 'unknown',7 profile_name: item.profile?.name || 'N/A',8 author: item.author?.name || item.author?.username || 'Anonymous',9 message_preview: (item.text || item.content || '').substring(0, 120) + '...',10 status: item.status || 'pending',11 assigned_to: item.assigned_agent?.name || 'Unassigned',12 tags: Array.isArray(item.tags) ? item.tags.join(', ') : '',13 published_at: item.published_at14 ? new Date(item.published_at).toLocaleString()15 : 'N/A',16 inbox_url: item.url || ''17 };18});Pro tip: Agorapulse inbox items include a direct URL to the original social post. Include this in your transformer output and add an open URL action in Retool's Table row action buttons so agents can jump directly to the original post context when needed.
Expected result: The getInboxItems query returns a list of inbox items. The transformer converts the response into flat rows that populate a Table component showing platform, author, message preview, status, and assigned agent columns.
Build engagement analytics queries and charts
Create analytics queries to pull engagement metrics across your Agorapulse profiles. Create a query named getProfileAnalytics. Set Method to GET and Path to /analytics/profiles/{{ dropdown_profile.value }}/summary. Add URL parameters: - key = start_date, value = {{ dateRange.start }} (formatted as YYYY-MM-DD) - key = end_date, value = {{ dateRange.end }} This returns summary engagement metrics — total posts, likes, comments, shares, reach, and impressions for the selected profile and date range. For post-level performance data, create a second query named getTopPosts with Path /analytics/profiles/{{ dropdown_profile.value }}/posts, sorted by engagement. This returns individual post metrics that can populate a leaderboard Table. Add a Date Range Picker component named dateRange to your app to control the analytics window. Connect it to both analytics queries so changing the date range triggers new queries automatically using the onChange event handler. Add a Chart component (Retool supports Plotly.js-based charts) for visualizing engagement trends. Set the Chart data to {{ getProfileAnalytics.data?.daily_metrics || [] }} and configure the x-axis as date and y-axis as total_engagement. For cross-profile comparison, create a query named getAllProfilesAnalytics that iterates through profiles and aggregates metrics. Use a JavaScript query to merge the results: loop through getProfileList.data, trigger individual analytics queries with Promise.all(), and return a combined dataset for a comparison bar chart.
1// JavaScript transformer — format analytics summary for stat components2const summary = data || {};3return {4 total_posts: summary.posts_count || 0,5 total_likes: summary.likes_count || 0,6 total_comments: summary.comments_count || 0,7 total_shares: summary.shares_count || 0,8 total_reach: summary.reach ? summary.reach.toLocaleString() : '0',9 total_impressions: summary.impressions ? summary.impressions.toLocaleString() : '0',10 avg_engagement_rate: summary.engagement_rate11 ? `${(summary.engagement_rate * 100).toFixed(2)}%`12 : '0.00%',13 top_platform: summary.best_performing_network || 'N/A',14 date_range: `${summary.start_date || ''} → ${summary.end_date || ''}`15};Pro tip: Agorapulse's analytics API can have higher latency for longer date ranges since it aggregates data server-side. For dashboards that show 90-day or longer windows, use Retool Workflows on a nightly schedule to pre-cache analytics data in Retool Database, then query the cached table instead of calling Agorapulse's API in real time.
Expected result: The analytics panel shows engagement summary stats for the selected profile and date range. The Chart component displays a daily engagement trend line. The top posts table shows individual post performance ranked by total engagement.
Add inbox action queries for reply and assignment workflows
Extend your inbox panel with write operations — replying to messages and assigning inbox items to team members. These mutations use POST requests to Agorapulse's inbox action endpoints. Create a query named replyToInboxItem. Set Method to POST and Path to /inbox/{{ table_inbox.selectedRow.id }}/reply. In the Body section, select JSON type and enter: { "text": "{{ textInput_reply.value }}" }. This posts a reply directly to the social platform through Agorapulse. Create a query named assignInboxItem. Set Method to POST and Path to /inbox/{{ table_inbox.selectedRow.id }}/assign. Body: { "agent_id": "{{ dropdown_agent.value }}" }. You will need a query named getTeamMembers (GET, /teams/{{ teamId }}/members) to populate the agent dropdown options. Create a query named markAsReviewed. Set Method to POST, Path /inbox/{{ table_inbox.selectedRow.id }}/review, no body required. In your Retool app, add a TextArea component named textInput_reply for composing replies, a Dropdown named dropdown_agent populated from getTeamMembers, and action buttons for Reply, Assign, and Mark Reviewed. Configure event handlers on each button to trigger the appropriate query. Add an On success handler to each write query that calls getInboxItems.trigger() to refresh the inbox table after the action completes. For RapidDev-style social management tools that combine multi-platform inbox data, assignment workflows, and analytics in a single panel, Retool's multi-resource architecture makes it straightforward to layer in CRM data alongside Agorapulse for enriched customer context.
1// JSON body for the replyToInboxItem query2{3 "text": "{{ textInput_reply.value }}",4 "platform": "{{ table_inbox.selectedRow.platform }}"5}Pro tip: Always add a confirmation modal before executing reply or assignment actions in Retool. Social media replies post publicly and cannot always be retracted quickly. Use a Modal component with a Preview pane showing the composed reply text before the agent confirms the submission.
Expected result: The inbox panel supports full triage workflows: selecting a row enables the reply form and agent dropdown, clicking Reply posts the message via Agorapulse, and the inbox table refreshes automatically to reflect the updated item status.
Common use cases
Build a social inbox triage panel with assignment workflows
Create a Retool app where your social media team can view all pending inbox items across profiles, filter by platform and status, and assign conversations to team members. Add action buttons to mark items as reviewed, apply tags, or trigger a reply that posts directly to the social platform via Agorapulse's API.
Build a social inbox triage panel with a Table showing all pending inbox items from /inbox filtered by status=pending, columns for platform, author, message preview, and assigned agent, plus action buttons for Assign, Tag, and Mark Reviewed that trigger POST queries to the Agorapulse API.
Copy this prompt to try it in Retool
Cross-platform engagement analytics dashboard
Build a Retool dashboard that pulls engagement metrics for all connected Agorapulse social profiles — showing likes, comments, shares, reach, and impressions over a configurable date range. Add Chart components to visualize engagement trends per platform and a Table listing top-performing posts by engagement rate.
Create an engagement analytics dashboard that queries Agorapulse analytics endpoints for all profiles, displays a line chart of daily engagement over the selected date range using Retool's Chart component, and shows a sortable table of individual posts ranked by total engagement with platform icons.
Copy this prompt to try it in Retool
Publishing queue review and approval panel
Build an editorial workflow panel that shows all scheduled and pending posts across Agorapulse profiles. Include filters for post status (scheduled, draft, pending approval), the profile it will publish to, and the scheduled publish time. Add approval action buttons for team leads to approve or reject draft posts before they go live.
Build a publishing queue panel that fetches all scheduled posts from the Agorapulse publishing API, displays them in a table with status, scheduled_at, platform, and content preview, and includes Approve and Reject buttons that call the appropriate Agorapulse status update endpoint with confirmation modals.
Copy this prompt to try it in Retool
Troubleshooting
All Agorapulse API queries return 401 Unauthorized
Cause: The OAuth 2.0 access token has expired. Agorapulse tokens have a limited lifetime and must be refreshed using the refresh token flow before expiry.
Solution: Go to Settings → Configuration Variables in Retool and update the AGORAPULSE_ACCESS_TOKEN value with a freshly obtained token. Use the Agorapulse token endpoint with your stored refresh token to get a new access token. For a long-term fix, build a Retool Workflow on a schedule that automatically refreshes the token and updates the configuration variable before it expires.
Inbox query returns empty array even though Agorapulse shows pending items
Cause: The profile_ids filter or status parameter may be sending an incorrect value. An empty string passed as profile_ids[] can result in a filtered query that matches no items, and the default status filter may not match what is visible in the Agorapulse UI.
Solution: Test the query without any profile or status filter first — remove the profile_ids[] parameter and set status to 'pending' as a hardcoded value. If that returns results, add the profile dropdown filter back incrementally. Verify that dropdown_profile.value is not returning undefined or an empty string when no profile is selected — use a fallback: {{ dropdown_profile.value || '' }} and omit the parameter entirely when blank.
Reply action returns 422 Unprocessable Entity
Cause: The reply endpoint may require the text field to be non-empty, or the inbox item's platform may not support direct replies via the API. Some platforms (such as certain LinkedIn post types) restrict API-based replies.
Solution: Verify the textInput_reply.value is not empty before triggering the query — add a JavaScript validator in the button's onClick handler: if (!textInput_reply.value.trim()) { showNotification('Please enter a reply text'); return; }. Check Agorapulse's documentation for which platforms support API-based replies for the specific item type (comment vs. message vs. review).
Analytics queries return null or empty data for recent dates
Cause: Agorapulse analytics data for the most recent 24-48 hours may not be fully processed and available via the API. Social platform data pipelines have a processing lag before metrics are finalized.
Solution: Set the default end_date for analytics queries to yesterday ({{ moment().subtract(1, 'days').format('YYYY-MM-DD') }}) rather than today to avoid incomplete data windows. Add a notice to your dashboard UI indicating that data is typically available with a 24-48 hour delay. For real-time engagement metrics on specific posts, use the post-level endpoint rather than the summary analytics endpoint.
Best practices
- Store the Agorapulse access token and refresh token as Secret configuration variables in Retool — never paste token values directly into query headers or body fields.
- Build a Retool Workflow on a schedule to automatically refresh the Agorapulse OAuth token before expiry, updating the configuration variable so dashboards never encounter unexpected 401 errors.
- Use Retool's profile selector dropdown connected to the getProfileList query to allow team members to scope inbox and analytics views to specific social accounts without hard-coding profile IDs.
- Add confirmation modals before all write operations (replies, assignments, status changes) — social media actions publish publicly and mistakes are visible to followers.
- Combine Agorapulse inbox data with your CRM database in the same Retool app to enrich social inquiries with customer purchase history and support ticket context for faster, more informed responses.
- Set analytics queries to avoid real-time date ranges — Agorapulse analytics data has a 24-48 hour processing lag, so default the end date to yesterday to avoid showing incomplete metrics.
- Use JavaScript transformers on all Agorapulse query responses to flatten nested API objects into table-friendly rows before binding to Table or Chart components.
Alternatives
Hootsuite is better for teams focused on social media scheduling and stream monitoring across many channels, while Agorapulse is stronger for inbox management and structured customer conversation workflows.
Sprout Social offers deeper social listening and brand analytics capabilities, while Agorapulse is preferred for teams who need fast inbox triage and built-in CRM labeling for social conversations.
Buffer focuses on content scheduling queues and publishing workflows, while Agorapulse covers the full social management lifecycle including inbox management, engagement, and reporting in one platform.
Frequently asked questions
Does Agorapulse have a native connector in Retool?
No, Agorapulse does not have a native connector in Retool. You connect it using Retool's generic REST API Resource type with Bearer token authentication. This means you configure the base URL, authentication, and any default headers once at the resource level, then write queries targeting specific Agorapulse API endpoints for inbox, analytics, and publishing operations.
What Agorapulse plan is required to access the API?
Agorapulse API access is available on Professional plans and above. The Free and Pro plans have limited or no API access. Check your Agorapulse account settings under API/Integrations to verify API access is enabled for your account. Enterprise plans typically have higher rate limits and access to more advanced analytics endpoints.
Can I post new social content through Agorapulse from Retool?
Yes, Agorapulse's publishing API allows you to schedule new posts to connected social profiles. Use a POST query to the /publishing endpoint with the profile IDs, post text, scheduled publish time, and optional media attachments. You can build a simple publishing form in Retool where content creators submit posts to the Agorapulse publishing queue without needing to open the Agorapulse UI.
How do I handle Agorapulse token expiry automatically in Retool?
Create a Retool Workflow that runs on a schedule (e.g., every 30 minutes) which POSTs to Agorapulse's token refresh endpoint using your stored refresh token. The workflow then updates the AGORAPULSE_ACCESS_TOKEN configuration variable with the new access token value. This approach keeps your Retool dashboards operational without requiring manual token updates.
Can I use Retool to reply to social media comments through Agorapulse?
Yes, for platforms and item types that Agorapulse supports API-based replies (including Facebook comments, Twitter/X mentions, and Instagram comments where permitted by the platform), you can POST replies through the Agorapulse inbox reply endpoint. Note that some platforms have restrictions on API-based replies — always verify the reply was posted successfully by checking the item's status after the query completes.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation