Sprout Social v2
Provides integration with Sprout Social to query customer metadata, analytics, messages, Listening data, and cases, and to create draft posts and upload publishing media through the Sprout Public API.
Revision History
0.0.2.6 - Initial release.
Connection
Use this Connection to store the Sprout credentials and default customer used by the Node Methods.
| Property | Type | Description |
|---|---|---|
AuthenticationType |
Enum | Authentication method. Select ApiToken or Oauth. Defaults to Oauth. |
ApiToken |
Masked | Bearer token generated through Sprout API Token Management. Used when AuthenticationType is ApiToken. |
ClientId |
String | OAuth client identifier issued by Sprout. |
ClientSecret |
Masked | OAuth client secret issued by Sprout. |
AccessToken |
Masked | Current OAuth bearer token. The Connection acquires and renews this token. |
RefreshToken |
Masked | Refresh token issued during user authorization. Used when AuthenticationType is Oauth. |
AccessTokenExpiresAtUtc |
String | Hidden UTC timestamp used by the Connection to renew an expiring OAuth access token. |
DefaultCustomerId |
String | Customer ID used when Options.CustomerId is empty. |
PendingAuthorization |
Masked | Hidden, short-lived OAuth transaction used while completing authorization-code authentication. |
Setup Notes
- For API-token authentication, select
ApiTokeninAuthenticationTypeand enter the token inApiToken. - For OAuth authentication, select
Oauth, enter theClientIdandClientSecret, and complete the Connection authorization flow. The Node requests theopenid organization_idscopes and renews the access token when required. - Run the
Customerstemplate underQueryto find the availablecustomer_idvalues. Enter the value you use most often inDefaultCustomerId, or supplyOptions.CustomerIdfor each Method. - Test the Connection after configuring it. The test verifies the credentials, confirms that at least one customer is accessible, and checks
DefaultCustomerIdwhen it is set.
Methods
The Node provides template-driven read, draft-publishing, publishing-post retrieval, and media-upload Methods.
Query
Queries a supported Sprout Social resource. Select a template to populate the required operation identifier, route values, filters, fields, metrics, and return shape.
The available templates are:
- Customer metadata:
Customers,Profiles,Groups,Tags,Users,Topics,Teams, andCase Queues. - Reporting and engagement data:
Profile Analytics,Post Analytics,Messages,Topic Messages,Topic Metrics, andCases.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Sprout Social Connection used for the request. |
OperationId |
String | Stable operation identifier populated by the selected template. |
Options |
Object | Customer and topic route values and, where required, the structured Request containing filters, fields, metrics, dimensions, sorting, and timezone values. |
| Return | Type | Description |
|---|---|---|
Response |
Array | Provider-shaped business rows. The Node removes the Sprout response envelope and returns no rows for an empty result. |
Create Draft Post
Creates one or more draft calendar posts for each input item. The Method supports text, uploaded media, tags, and scheduled delivery, but it does not publish posts directly.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Sprout Social Connection used for the request. |
Options |
Object | Customer route values. Leave CustomerId empty to use DefaultCustomerId. |
Items |
Array | Draft request objects. Each item requires a positive group_id, at least one customer_profile_ids value, is_draft set to true, and text, media, or both. |
| Return | Type | Description |
|---|---|---|
Response |
Array | One result per input item containing Sprout's data records and a Flowgear object with IsSuccess, Message, and the submitted Request. |
Get Publishing Post
Retrieves one publishing post and returns each Sprout fan-out record, such as the record for each target profile.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Sprout Social Connection used for the request. |
Options |
Object | Customer route values and the required PublishingPostId. Use the publishing_post_id returned by Create Draft Post. |
| Return | Type | Description |
|---|---|---|
Response |
Array | Provider-shaped publishing records returned for the post. |
Upload Media
Uploads one readable media stream and waits for Sprout to return a usable media ID. Use that ID in the media array of a Create Draft Post item.
| Parameter | Type | Description |
|---|---|---|
Connection |
Connection | Sprout Social Connection used for the request. |
Media |
Stream | Readable binary media stream to upload. |
Options |
Object | Customer route values and optional FileName and ContentType metadata. |
| Return | Type | Description |
|---|---|---|
Response |
Object | Uploaded media_id, expiration information, and a Flowgear object with IsSuccess, Message, and the request metadata. The media bytes are not included in Flowgear.Request. |
Usage Notes
- Select a Method template instead of entering
OperationIdmanually. The template supplies the supported request and return structure. - Leave
Options.CustomerIdempty to use the Connection'sDefaultCustomerId.Topic MessagesandTopic Metricsalso require aTopicIdreturned by theTopicstemplate. - Enter template string-list values as comma-separated text. This includes query
filters,fields,metrics,dimensions, andsort, and draftscheduled_times. The Node preserves commas inside filter parentheses when converting these values to JSON arrays. - The Node manages provider paging. Do not add
page,page_cursor, or a provider page-sizelimitto paged requests. Profile Analyticsrequires between 1 and 100 profile IDs and a reporting period of no more than one year.Post Analyticsaccepts at most 100 profile IDs, requires a created-time range, and supports documentedlifetime.metrics.- A
Messagesrequest can use up to 100 message IDs, but amessage_idfilter cannot be combined with other filters. Selectinginbox_permalinkrequires onegroup_idfilter. - A
Casesrequest can use up to 100 case IDs as an exclusive filter. Otherwise, it requires at least one date filter, and each date range can span no more than seven days. - Scheduled drafts require
delivery.typeto beSCHEDULEDand everyscheduled_timesvalue to be a future ISO 8601 UTC timestamp. Draft media entries require amedia_idand amedia_typeofPHOTO,VIDEO, orDOCUMENT. - If Sprout omits a requested profile from a draft response, the Node preserves the returned posts and sets
Flowgear.IsSuccesstofalsewith the missing profile IDs inFlowgear.Message. QueryandGet Publishing Postreturn provider-shaped rows without aFlowgearobject.Create Draft PostandUpload Mediainclude normalizedFlowgearresult metadata.- A seekable media stream with less than 50 MiB remaining uses Sprout's simple upload. Larger streams, streams of unknown length, and non-seekable streams use multipart upload. The Node waits up to 15 minutes for multipart processing to produce a usable media ID and leaves the input stream open.
Known Issues
- Sprout Social does not document a sandbox API host. Use controlled data in an account entitled to the required Public API features.
- Listening and case templates are available only when the connected Sprout customer has the required plan and data configuration.
- The Node supports draft publishing only. It does not publish posts directly.