Can we build automation integrations like email and slack?

I think this is more a question to the FIbery team.

We’re able to make custom integrations to pull data into Fibery, but I’m wondering if we’re also able to make custom integrations to push data, also with OAuth. Like you’ve done with Slack and Gmail.

I’m thinking something like the ability to post on social media with the press of a button, but without needing to show unsecured api keys. Are we able to build something like this as Fibery users?

Followup: if so, is how you did your 2-way sync with jira? It’s the only two way sync on here, and im very curious to understand how it works and how we could potentially also build 2-way sync integrations.

Thanks!!!

1 Like

Custom integrations support the option to create ‘external actions’ which can be triggered from automations (rules or buttons).

Aaah perfect. Missed this. Okay thanks!

Then it’ll add an action here?

Maybe I’m asking for too much, but would really love to learn how to build these custom integrations and am struggling with the docs. Yes, the intention is for programmers and people who know how things work to build them, but with AI its getting easier and easier to set something like this up I think. Is there anyone on the team or on the community who can make tutorial of how to set something like this up from scratch? Both for getting data in, and sending data out? For someone who isn’t a developer?

I would really appreciate it, and would be happy to help with editing the video if sent a screen recording and audio.

Exactly.

I’m not sure what you mean by ‘getting data in and sending data out’.
By definition, external actions are solely used for sending data from Fibery to a custom app. The app should return a success or failure message, but otherwise data only goes one way.

Here’s an example of how a very basic app domain schema might look:

{
  "id": "ext-app",
  "name": "Ext",
  "version": "1.0.0",
  "description": "External actions",
  "authentication": [
    {
      "id": "public",
      "name": "Public Access",
      "description": "There is no any authentication required",
      "fields": []
    }
  ],
  "sources": [],
  "responsibleFor": {
    "dataSynchronization": true,
    "automations": true
  },
  "actions": [    
    {
      "action": "create-record",
      "name": "Create record",
      "args": [
        {
          "id":"publicId", 
          "name":"Public ID", 
          "type":"text",
          "description":"The entity's public ID"
        },
        {
          "id":"user", 
          "name":"Who triggered the automation", 
          "type":"text",
          "description":"The public ID of the user who triggered this"
        }              
      ]
    }
  ]
}

and then it’s up to you to figure out what should happen inside the app when the data is received, e.g.

app.post(`/api/v1/automations/action/execute`, wrap(async (req, res) => {
    
    let {action} = req.body;

    if (action.action == "create-record") {
        //do stuff
        return res.json({"message":"Success"});
    }
    else {
        return res.json({"message":"Invalid action"});
    }
}));

If you want to check out a reasonably complex example, there is a user-created custom app on Github: GitHub - reify-academy/fibery-toggl-integration: Integration between fibery and toggl

1 Like

okay amazing!

I mean both integrations for getting data in, and integrations with external actions.

While this is helpful, and I will try to learn from it. It’s also still very confusing. So the request from a start to end integrations tutorial with OAuth, and external actions still stands. As well as the offer to edit the video.

Just to tie off loose ends from the original post, is this how the two-way jira integration is done?

Not really. Native 2-way integrations do not use the same external actions mechanism.

1 Like

I think it’s unlikely that we can justify asking a developer to take time away from normal Fibery development in order to make an educational tutorial on how to code an integration, sorry.

Maybe there’s someone in the community who feels inclined …

1 Like

I could share a Google Cloud Function that processes Fibery requests initiated by a Rule/Button, but the code has no OAuth (or any auth).

1 Like

Anyone on here who’s done this before / wants to learn and then share and would like to collaborate?

1 Like

I would be willing to put together some of what I have figured out developing a QuickBooks integration. I found that reverse engineering the sample apps, especially the Notion one, was very informative to getting the Oauth right.

In terms of getting information into and out of Fibery, my goal has been to essentially make an alternate way to manipulate certain data from QuickBooks that is not currently possible with the QuickBooks UI.

This has been my strategy: pull QuickBooks data into Fibery → edit the data → send back using external actions → update the Fibery entity if it successfully synced back to QB. Since integrations fields and dbs are read/delete only, you need an additional manually added db that mirrors you integration type for each type that you want to send using external actions. The manual db gets updated from the integration db when any changes are made and links the entities together. Now you can make changes to the manual db, use a formula to see that you have different data than the integration db, and either send it using external actions or revert to the state of the integration entity using automations/buttons. There is some minutia and finesse into exactly how to implement this, but that is the basic idea.

Currently I do the creation of the mirror dbs and the syncing automations between the two manually. At some point I want to look into using a fork of @Matt_Blais ‘s Fibscripts and the Fibery API to build that stuff automatically, but that is low on the priority list.

You could also use a similar strategy and use webhooks from the manual db instead of external actions, but you would have to handle auth for the data source a bit differently and do a lot more processing in your integration app.

My app is still in development but I will push the latest version and post the github link this evening.

Happy to try to answer some questions but I won’t be super responsive until the evening.

@Tommy_Hedley Sent you a private message. Would love to make something together and share it on here.

It sounds to me that you had to hack your way to make a 2-way integration. @Chr1sG You mentioned the Jira one does it differently, but didnt specify how. Do you know how it works? Can we build 2-way integrations as well in less hacky ways (two duplicate databases being the hacky workaround, or is this the same workaround employed in the Jira integration)?