Parameterized Authorization

Parameterized authorizations allow you to change which accounts you access on the fly based on the encrypted authorization you send in your webhook. This additional flexibility allows you to centrally manage company workflows for multiple users without creating multiple workflows. 

 Let’s see the steps to create parameterized authorization for service actions with the help of an example. 

Example


Let’s say you have an existing workflow that, when triggered through webhook, creates a card in Trello and sends the card details in an email via Gmail. 

workflow.jpg

Let’s create a dynamic, or parameterized authorization for Trello and Gmail.

Step 1: Retrieve service access token and create object

Using your organization’s oAuth server, create an access token for the service (in this case, Trello) and insert it in the ‘access_token’ field of the following object. This is the standard object to be used for all service actions:

  { 

     "auth" : { "access_token" : "9276fb05d973105df631d29894a8b49af8564b85951d121d0ca584a29761d89c" },     

     "actions" : [ "a0" ] 

  } 

]

Here, ‘a0’ refers to the ‘Id’ of the action you want to create a parameterized authorization for. You can find this ‘Id’ at the bottom left corner of the action configuration window as shown below: 

trello-id.jpg

Next, retrieve an access token for the ‘Gmail’ service and add it to the object for ‘Gmail’ service. Add this object below the ‘Trello’ object. So it becomes,  

 [ 

    { 

       "auth" : { "access_token" : "9276fb05d973105df631d29894a8b49af8564b85951d121d0ca584a29761d89c" },     

       "actions" : [ "a0" ] 

    },

    { 

        "auth" : { "access_token" : "ya94.GltcBIa387LWmFugL3Zi9m23yslgx4xkaIzeUR6ZeHkYD0ZfcBQdLHi2A" }, 

         "actions" : [ "a1" ] 

    } 

]

Step 2: Encode object

Once you have created the object, encode it with base64 encoding. You can use this online service to encode the object.

encode-64-2.jpg

Step 3: Append encoded object to webhook URL

Once you have encoded the object, you can append it to the webhook URL of the workflow you wish to execute. Add ‘?authorizations=’ to your webhook URL, followed by your encoded object. 

 For example, if ‘https://runflow.built.io/run/8ke4yv2pfr’ is the webhook URL of the workflow, add ‘?authorizations=’ followed by the encoded data. Your webhook URL will look something like this:  ‘https://runflow.built.io/run/8ke4yv2pfr?authorizations=IFsgDQogICAgICAgeyANCiAgICAgICAgICJ0b2tlbiIgO…’

Step 4: Execute the webhook URL

Now when you execute the above webhook URL, it will call the workflow, and will replace the existing authorizations with the parameterized authorizations. 

Creating parameterized authorization for multiple actions of the same service


If you are using multiple actions from the same service, you do not need to  create different objects for each of them. You simply need to add their corresponding ‘Id’s in the ‘Actions’ array of the existing object for that service.  

 For example, in the workflow below, the object for ‘Trello’ service will be,

mutiple-objects.jpg

   [ 

       { 

          "auth" : { "access_token" : "9276fb05d973105df631d29894a8b49af8564b85951d121d0ca584a29761d89c"}, 

          "actions" : [ "a0","a2" ] 

       },

    ]

where ‘a2’ is the ‘Id’ of the ‘Trello - Update Card’ action. 

List of services supported in parameterized authorization


Here is the list of services along with their auth structure to be used to create the parameterized authorization. 

  1. Box
  2. Github
  3. Gmail
  4. Google Drive
  5. Google Sheets
  6. Spark
  7. Spark Admin
  8. Facebook
  9. OneDrive
  10. OneNote
  11. Asana
  12. Basecamp
  13. Bitly
  14. YouTube
  15. Moxtra
  16. Smartsheet
  17. Formstack
  18. Wordpress
  19. Todoist
  20. Campaign Monitor
  21. Google Calendar
  22. Google Contacts
  23. Google Tasks
  24. Google URL Shortner
  25. Pinterest
  26. Pushbullet
  27. Quip
  28. Runscope
  29. Toodledo
  30. Wrike
  31. HubSpot
  32. Redbooth
  33. Fitbit
  34. Shopify
  35. Trello
  36. Slack
  37. Evernote
  38. Microsoft 365
  39. Dropbox Business
  40. Hubb
  41. ShowGizmo
  42. Dropbox
  43. Citrix Go To Meeting
  44. Philips Hue
  45. Buffer
  46. Eventbrite
  47. Salesforce
  48. Wunderlist
  49. Mention
  50. Excel Online
  51. Uber
  52. Egnyte
  53. Heroku
  54. LinkedIn
  55. Nimble

Auth Structure

1. Box

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

    }           

]


2. Github

   { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   }

]


3. Gmail

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   }

]


4. Google Drive

  { 

   "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

   "actions" : [ "ACTION ID HERE" ] 

  } 

]

5. Google Sheets

  "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

  "actions" : [ "ACTION ID HERE" ] 

]

6. Spark

   { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } 

]

7. Spark Admin

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

   }

]

8. Facebook

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]

9. OneDrive

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

10. OneNote

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

   } 

]

11. Asana

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

       "actions" : [ "ACTION ID HERE" ] 

   } 

]

12. Basecamp

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } 

]

13. Bitly

  { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

 ]

14. YouTube

   { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } ]

15. Moxtra

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

    } 

 ]

16.  Smartsheet

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]

17. Formstack

   { 

       "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

       "actions" : [ "ACTION ID HERE" ] 

    } 

]

18. Wordpress

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } 

]

19. Todoist

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

    } 

]

20. Campaign Monitor

   { 

        "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

        "actions" : [ "ACTION ID HERE" ] 

   } 

]

21. Google Calendar

 [

    { 

       "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

       "actions" : [ "ACTION ID HERE" ] 

    } 

 ]

22. Google Contacts

 [ 

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

     } 

 ]

23. Google Tasks

 [ 

     { 

         "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

         "actions" : [ "ACTION ID HERE" ] 

     } 

]

24. Google URL Shortner

   { 

  "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

  "actions" : [ "ACTION ID HERE" ] 

]

25. Pinterest

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } 

]

26. Pushbullet

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

   } 

]

27. Quip

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

28. Runscope

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]

29. Toodledo

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

30. Wrike

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

]

31. HubSpot

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

32. Redbooth

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

33. Fitbit

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]

34. Shopify

  { 

     "auth" : { 

    "access_token" : "YOUR ACCESS TOKEN HERE",

    "shop" : "YOUR SHOPIFY SUB DOMAIN",

    },

    "actions" : [ "ACTION ID HERE" ] 

 } 

]


35. Trello


 { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

 } 

]


36. Slack

 { 

   "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

   "actions" : [ "ACTION ID HERE" ] 

 }

37. Evernote

 { 

   "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

   "actions" : [ "ACTION ID HERE" ] 

 } 

]

38. Microsoft 365

 { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

 } 

]


39. Dropbox Business

  { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]


40. Hubb

 { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]


41. ShowGizmo

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]


42. Dropbox

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]


43. Citrix Go to Meeting

 { 

   "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

   "actions" : [ "ACTION ID HERE" ] 

  } 

]


44. Philips Hue

  { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]


45. Buffer

 { 

    "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

    "actions" : [ "ACTION ID HERE" ] 

  } 

]


46. Eventbrite

  {

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

]


47. Salesforce

[

  { 

    "auth" :{ 

                "instance_url" : "SF INSTANCE URL",

                "_resources" : {  

                "r0" : [ 

                            {

                                "url": "/services/data/v30.0"

                            }

                       ] 

                  },

               "access_token" : "SF ACCESS TOKEN"

            }, 

         "actions" : [ "ACTION ID" ]

  }

]

Note : URL might be different for your API endpoint, try between v20.0 - v39.0 if v30.0 is not working for you.


48. Wunderlist

  { 

     "auth" : {  "access_token" : "YOUR ACCESS TOKEN HERE",

     "client_id" : "YOUR CLIENT ID HERE" },

     "actions" : [ "ACTION ID HERE" ] 

  } 

]

For the 'client_id' field, you can either enter '4a6607072d198fc64a4b' (the client ID supported by Built.io Flow Enterprise auth server), or can create your own client ID using your auth server or oAuth app. 


49. Mention


   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

]


50. Excel Online

    { 

       "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

       "actions" : [ "ACTION ID HERE" ] 

    } 

]


51. Uber

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

]


52. Egnyte

  "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

  "actions" : [ "ACTION ID HERE" ] 

]


53. Heroku

   { 

      "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

      "actions" : [ "ACTION ID HERE" ] 

   } 

]


54. Linkedin

   { 

     "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

     "actions" : [ "ACTION ID HERE" ] 

   } 

]


55. Nimble


   { 

       "auth" : { "access_token" : "YOUR ACCESS TOKEN HERE" },

       "actions" : [ "ACTION ID HERE" ] 

   } 

]