WrikeWay Back to WrikeWay
Documentation

Wrike API Connector for Power Automate

Definition files and setup guide for building a custom Wrike API connector inside Microsoft Power Automate Online.

Overview

This connector wraps the Wrike REST API so you can drop Wrike's project-management capabilities straight into your automated Power Automate workflows. The folder ships two OpenAPI (formerly Swagger) connector definitions — a curated one and a full one, the latter available in both JSON and YAML. You only need to import one file to create the connector.

You need a Power Automate environment with rights to create custom connectors, plus access to Xtend environment to authenticate — with an API Key (Xtend Token) or your Xtend username and password. OAuth is not available yet for Power Automate.

Don't have access yet? Submit an access request.

Definition files in this folder

Download the file you intend to import into Power Automate.

Curated connector

Recommended YAML

Created by the WPP Global Wrike Team. Contains a curated subset of the full Wrike API, covering the most common operations, plus the webhook operations.

WrikeAPI-Curated-PAO-Connector.yaml

Full connector

JSON YAML

The full set of APIs, referenced from Wrike's published API documentation. The JSON and YAML files are identical in content — choose whichever format you prefer to import.

WrikeAPI-Full-PAO-Connector.json · WrikeAPI-Full-PAO-Connector.yaml

Which file should I use?

  • For most standard team use cases, start with the curated WrikeAPI-Curated-PAO-Connector.yaml. It is smaller and focused on the most common operations, and it is the only one that includes the webhook operations.
  • If you need an endpoint that is not in the curated version, use the full WrikeAPI-Full-PAO-Connector — or reach out to the team to have it added to the curated connector.
  • The full connector comes as both .json and .yaml with identical content — pick whichever format suits your tooling or preference.

How to use

To use these files, create a new custom connector in your Power Automate environment.

  1. 1

    Pick the required connector file

    Pick the required connector file — refer to the list of definition files in the previous section.

  2. 2

    Import the connector in Power Automate

    1. Navigate to Power Automate.
    2. In the left menu, go to Data › Custom connectors.
    3. Top-right, click New custom connector and select Import an OpenAPI file.
    4. Name the connector (e.g. "Wrike API Custom") and upload your chosen .json or .yaml file from this folder.
    5. Click Continue.
  3. 3

    Configure the connector

    General tab

    The API host and base URL pre-fill from the definition: xpi-api.gowrike.space and /api/v1/wrikexpi/amoeba/wrikeapi/. You can upload a connector icon here.

    Security tab

    There are three ways to configure authentication for the connector. Use one of them. Option 1 (API Key) is recommended; Option 2 (OAuth) is not available yet.

    Option 1 · API Key

    Xtend Token Recommended
    • Select API Key as the Authentication type.
    • Under the API Key section, fill in:
      • Parameter label: API Key
      • Parameter name: Authorization
      • Parameter location: Header
    • You can retrieve the API Key (Xtend Token) from https://xpi-api.gowrike.space/.
    • When you use this connector, set the API Key to Bearer <your token>.

    Option 2 · OAuth

    OAuth 2.0 Not Available Yet

    Note: this option is not working yet because Power Automate does not support OAuth 2.0 Dynamic Client Registration. The WPP Global Wrike Integration team is working to address this. Please use Option 1 or Option 3 for now.

    • Select OAuth 2.0 as the Authentication type and use Generic Oauth 2 as the Identity Provider.
    • Enter the Client ID — an ID that identifies your own app — and set the Client Secret to WrikeXtend.
    • Set the Authorization URL to https://xpi-api.gowrike.space/oauth/authorize.
    • Set the Token URL and Refresh URL to https://xpi-api.gowrike.space/oauth/token.

    Option 3 · Basic Authentication

    Xtend credentials For development · Not recommended for production

    Intended for development and testing. Use Option 1 (API Key) for production.

    • Select Basic Authentication as the Authentication type.
    • Under the Basic authentication section, fill in:
      • Parameter label Xtend Username for parameter name username
      • Parameter label Xtend Password for parameter name password
    • You can retrieve the Xtend Username and Password from https://xpi-api.gowrike.space/.

    Definition tab

    Review the imported actions (API endpoints). Adjust summaries, descriptions, and visibility as needed.

    Code tab

    Optional Webhooks only

    Only applicable if you want to use webhooks from Wrike. The webhook operations (WrikeAccountWebhook, WrikeFolderWebhook, WrikeSpaceWebhook) are only present in the WrikeAPI-Curated-PAO-Connector.yaml connector. This step adds the custom code that forwards the callback URL and supplies the Location header Power Automate needs when unsubscribing.

    1. On the custom connector setup page, open the Code tab.
    2. Enable Code Enabled.
    3. In the dropdown multi-selection list for Operations to be included in the scope, select: WrikeAccountWebhook, WrikeFolderWebhook, WrikeSpaceWebhook
    4. Paste the code below into the code editor.
    5. Save the changes — or click Update Connector if you are updating an existing connector.

    C# script

    public class Script : ScriptBase
    {
        public override async Task<HttpResponseMessage> ExecuteAsync()
        {
            // 1. Safely retrieve the "hookUrl" header if present
            if (this.Context.Request.Headers.TryGetValues("hookUrl", out var headerValues))
            {
                var rawHookUrl = headerValues.FirstOrDefault();
    
                if (!string.IsNullOrWhiteSpace(rawHookUrl))
                {
                    // 2. Fully URL-encode the complete hookUrl value so decoding returns the original string
                    //var encodedHookUrl = HttpUtility.UrlEncode(rawHookUrl);
    
                    // 3. Rebuild the request URI cleanly without manual string concatenation
                    var uriBuilder = new UriBuilder(this.Context.Request.RequestUri);
                    var queryParams = HttpUtility.ParseQueryString(uriBuilder.Query);
    
                    // Add or overwrite the hookUrl query parameter
                    queryParams["hookUrl"] = rawHookUrl;
                    uriBuilder.Query = queryParams.ToString();
    
                    // 4. Update the request URI
                    this.Context.Request.RequestUri = uriBuilder.Uri;
                }
            }
    
            HttpResponseMessage response = await this.Context.SendAsync(this.Context.Request, this.CancellationToken).ConfigureAwait(false);
    
            // Check if this is a successful webhook creation missing the Location header
            if (response.IsSuccessStatusCode && !response.Headers.Contains("Location"))
            {
                // Inject a fallback Location header (e.g., using a reference ID from the body or request URI)
                // Power Automate uses this URI when issuing an Unsubscribe call.
                response.Headers.Add("Location", this.Context.Request.RequestUri.ToString());
            }
    
            return response;
    
        }
    }

    The Code tab only appears when custom code is permitted in your environment (required for connectors that ship code-backed operations). If you don't see it, ask your Power Platform admin to enable custom code for the environment.

    Create connector

    Click Create connector at the top.

  4. 4

    Test the connector

    Go to the Test tab and create a new connection. With an API Key, enter Bearer <your token> (e.g. Bearer eyJhbGciOiJIU....KzB3c3KhSm8chmIVR8) ; with Basic Authentication, enter your Xtend username and password. Once connected, test the various actions to confirm they work correctly.

Built by the WPP Enterprise Technology · Wrike Team

Back to WrikeWay