This article provides steps on how to register a webhook with Microsoft Power Automate. These steps cover creating a Flow to send an email when Semantik has processed an invoice.
Step 1: Add New Webhook in Semantik
First, we need to add a new webhook in Semantik Invoice.
1. Go to Settings > Export.
2. Click Add Integration > Webhook.
3. Enter an Integration Name. This will be the name of your webhook.
Step 2: Create Flow in Power Automate
Next, let's create the flow in Microsoft Power Automate. A flow is a combination of a trigger and one or more actions.
1. Log in to Microsoft Power Automate.
2. In the left panel, click Create.
3. Under Start from blank, select Instant flow.
4. Enter a Flow name.
5. From the list of triggers, select When an HTTP request is received.
Edit the Trigger
1. In the new flow screen, select the header to expand the card.
2. Click Use sample payload to generate schema.
3. In Semantik, copy the text from the Custom Payload field.
4. Return to Microsoft Power Automate. Paste the text into the sample JSON payload field.
Add an Action
Now that the trigger is set up, let's add an action to send an email.
1. Click +New step.
2. Under All, select Mail > Send an email notification.
3. Fill out the required fields (To, Subject, and Body).
Note: These fields can include Dynamic content, and the email body can include custom HTML and CSS, so get creative!
4. Click Save.
Step 3: Finish Configuring the Webhook
Finally, we need to add the Destination URL to our webhook in Semantik.
1. In Microsoft Power Automate, expand the trigger card and copy the HTTP POST URL.
2. In Semantik, paste the URL into the Destination URL field.
3. Click Test.
4. When you're satisfied, click Save.
You have successfully created a Semantik webhook with Microsoft Power Automate!