Create a Facebook app and set up authentication on Mindflow
Section titled “Create a Facebook app and set up authentication on Mindflow”-
Click the
Create an appbutton and fill in the required fields. -
Once the app is created, retrieve the
App IDand theApp Secretfrom*App Settings>Basic*.
-
Go to your app’s
Dashboardand add theFacebook Loginproduct. -
Click the
Vaulttab, then the+ Add Credentialsbutton, and search for Facebook Lead Ads API. -
Choose
OAuth 2.0 Authorization Codefor theCredential typeand fill in the fields as follows:Client_id*= YourApp IDClient_secret*= YourApp SecretAuthorization URL*= https://www.facebook.com/v12.0/dialog/oauthAccess token URL*= https://graph.facebook.com/v12.0/oauth/access_tokenScope(s)*(Advanced) = The scopes relevant to the actions you want to perform- e.g., (catalog_management,ads_management,business_management leads_retrieval,pages_show_list,pages_manage_metadata,pages_read_engagement,pages_read_user_content,pages_manage_ads) for the Facebook Marketing API
-
Copy the
Callback URL, return to Facebook, go toFacebook Login>Settings, and add theCallback URLin theValid OAuth Redirect URIs. ClickSave changes. -
Return to Mindflow and click
Authorize and create. A Facebook window will open, click the button to validate the connection. -
Congratulations, you have configured OAuth 2.0 authentication for your Facebook app. You can now use it by selecting this credential in your steps to authenticate Facebook integrations.
Create the webhook
Section titled “Create the webhook”- Go to the Dashboard of your Facebook app https://developers.facebook.com/apps/your_app_id/dashboard/
- Add the
Webhooksproduct by clicking theSet upbutton. - Click the
Webhookpage that appears on your sidebar. - Select the desired topic (e.g.,
Pages) and click theSubscribe to this objectbutton. - Go to your playbook on Mindflow and click the
⚙️icon. - Click the
Triggerssection, check theWebhookbox, and copy theWEBHOOK (SYNCHRONOUS). - Return to your Facebook app and fill in the required fields:
Callback URL= The value previously copied from Mindflow.Verify Token= Any value (e.g., my_verify_token).
- Click the
Verify and savebutton. - Return to Mindflow and create a
webhook responsestep. - Configure it by adding a new
Bodyof typeTextand insert thehub.challengevalue received from the Facebook webhook. - Return to the Facebook app and click
Verify and saveagain. - You can now subscribe to events for the topic by clicking the
Subscribebutton and test your webhook with test data using theTestbutton. - You can now delete the
webhook responsestep from your playbook; your trigger is operational.