# Copilot prompts: Gravity Forms to SharePoint

Use these prompts with Copilot in Power Automate
(https://make.powerautomate.com). They build a flow that creates a SharePoint
list item for each Gravity Forms entry.

## Before you use the prompts

1. Install the Gravity Forms Power Automate Add-On on your WordPress site and
   enter your license key (Forms > Settings > Power Automate).
2. On that screen, select your form under "Forms available in Power Automate",
   select Save Settings, then select Sync Form Metadata.
3. Create a SharePoint list with one column for each form field you want to
   keep. Add a Number column named Entry ID.
4. Keep your license key ready. Power Automate asks for it one time.

## How to use them

- Send one prompt at a time. Check the result before you send the next one.
- Replace the text in [square brackets] with your own names.
- Copilot cannot see your forms or your SharePoint lists. You select the form,
  the site and the list yourself in the designer.

## Prompt 1: create the flow

On the Power Automate Home page, paste this into the Copilot box:

```
When a form is submitted in Gravity Forms by reenhanced, create an item in a SharePoint list.
```

Select **Keep it and continue**. When Power Automate asks for the Gravity Forms
connection, paste your license key into **License Key**. Sign in to SharePoint
if it asks. Then select **Create flow**.

Check: the trigger is **When a form is submitted** from **Gravity Forms by
reenhanced**, and the action is **Create item** from **SharePoint**.

## Prompt 2: only if the trigger is wrong

If Copilot used a different trigger, for example Microsoft Forms, paste this
into the Copilot pane in the designer:

```
Change the trigger to "When a form is submitted" from the "Gravity Forms by reenhanced" connector.
```

If the trigger is still wrong, delete it and add it by hand: search for
"Gravity Forms" in the trigger list.

## Select your form, site and list

Do this yourself in the designer:

1. Select the trigger. In **Form**, select your form.
2. Select the **Create item** action. Select your **Site Address** and
   **List Name**.

## Prompt 3: map the fields

Send one prompt for each column. Use your own field and column names.

```
In the Create item action, set the [Title] column to the [Name] field from the trigger.
```

```
In the Create item action, set the [Email] column to the [Email] field from the trigger.
```

```
In the Create item action, set the [Entry ID] column to the entry ID from the trigger.
```

Open the action after each prompt and confirm that the correct form field is
in the correct column.

## Prompt 4: tell me when it fails

```
Add a parallel branch that runs only if Create item fails and sends me an email with the error details.
```

## Prompt 5: check the flow

```
Explain what this flow does step by step.
```

Compare the answer with what you want. Then select **Save**.

## Test

1. Submit a test entry on your website.
2. In WordPress, open the entry (Forms > Entries). The notes show "Entry sent
   to Power Automate."
3. In Power Automate, the flow run history shows **Succeeded**.
4. The new item is in your SharePoint list.

Need help? https://wordpress.dev.office.reenhanced.com/support/
