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 ApiToken in AuthenticationType and enter the token in ApiToken.
  • For OAuth authentication, select Oauth, enter the ClientId and ClientSecret, and complete the Connection authorization flow. The Node requests the openid organization_id scopes and renews the access token when required.
  • Run the Customers template under Query to find the available customer_id values. Enter the value you use most often in DefaultCustomerId, or supply Options.CustomerId for each Method.
  • Test the Connection after configuring it. The test verifies the credentials, confirms that at least one customer is accessible, and checks DefaultCustomerId when 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, and Case Queues.
  • Reporting and engagement data: Profile Analytics, Post Analytics, Messages, Topic Messages, Topic Metrics, and Cases.
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 OperationId manually. The template supplies the supported request and return structure.
  • Leave Options.CustomerId empty to use the Connection's DefaultCustomerId. Topic Messages and Topic Metrics also require a TopicId returned by the Topics template.
  • Enter template string-list values as comma-separated text. This includes query filters, fields, metrics, dimensions, and sort, and draft scheduled_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-size limit to paged requests.
  • Profile Analytics requires between 1 and 100 profile IDs and a reporting period of no more than one year. Post Analytics accepts at most 100 profile IDs, requires a created-time range, and supports documented lifetime. metrics.
  • A Messages request can use up to 100 message IDs, but a message_id filter cannot be combined with other filters. Selecting inbox_permalink requires one group_id filter.
  • A Cases request 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.type to be SCHEDULED and every scheduled_times value to be a future ISO 8601 UTC timestamp. Draft media entries require a media_id and a media_type of PHOTO, VIDEO, or DOCUMENT.
  • If Sprout omits a requested profile from a draft response, the Node preserves the returned posts and sets Flowgear.IsSuccess to false with the missing profile IDs in Flowgear.Message.
  • Query and Get Publishing Post return provider-shaped rows without a Flowgear object. Create Draft Post and Upload Media include normalized Flowgear result 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.