Skip to content
FoxFlowDocs

Grok Bot

Grok Bot writes the email for the leads you choose. You edit it in FoxFlow, then Grok sends it from Gmail.

Pro feature

Grok Bot writes an email and saves it on the lead. You choose who that is for: people with no phone number, people who are not on iMessage, or anyone with an email. You change anything you want, then click Approve to Send. The next time you ask Grok to check, it sends each approved email from Gmail.

The Default

The prompt sets this up for you. Grok repeats it back in its first reply. This is what happens unless you name a different workflow in that reply.

  1. Ask Grok to check leads.
  2. Grok writes a short email on each lead in the queue that has an address. Open the lead and you will see Email Draft. Edit the subject or the body there.
  3. Click Approve to Send when the words are right. The card is then marked approved.
  4. Ask Grok to check again. It sends each approved email from Gmail. It may turn a web address already in that email into a clickable link, and it keeps the paragraph breaks. The message stays the one you approved.
  5. The lead then shows Email Sent.

Grok does that formatting on its own. It will not ask you before each send, and it will not add a sentence, an offer, or a link that was not in the approved text.

Each approved email, and any draft a person edited, is a sample of how your team writes. Grok studies those words on the next check and aims the following drafts at that voice. What it learns stays in the chat. One lead's story stays on that lead.

Email on the lead opens your own mail client with the subject and body filled in. That clears an approval, so Grok will not also send it.

FoxFlow itself does not send the email. Grok sends it from Gmail, and only after you approve it. Grok does not send a text or an iMessage.

Other Ways to Work

Grok's first reply asks if you want a different workflow. Until you name one, it uses the default above.

What you tell GrokWhat you get
Nothing. This is the default.Drafts on the lead. You edit and approve. Grok sends from Gmail.
Put the draft in Gmail. I will send it.The same words on the lead, plus a Gmail draft with links filled in. You send the Gmail draft. Leave Approve to Send alone, or Grok will send a second copy on the next check.
Keep a Gmail copy as well.A draft on the lead and a copy in Gmail. You still approve on the lead, and Grok sends that one. Delete the Gmail copy so it does not go out twice.
Do not send, even if I approve.Drafts on the lead. Grok leaves approved emails where they are and tells you they are waiting. You send them with Email. The lead will still say that Grok will send it.

A Gmail draft is invisible to FoxFlow. Grok still saves the plain text on the lead, so your team can read it and the lead leaves the queue. Otherwise that lead would ask for another draft the next time you check.

Set It Up

Open Organization Settings → Integrations → Grok Bot.

  1. Choose who Grok writes to.
    • No Phone Number — an email and no phone.
    • Not on iMessage — a number FoxFlow confirmed is not iMessage. This checks numbers, and it needs FoxFlow Messaging. It does not turn on iMessage-only auto-send, and texts to everyone else stay as they are.
    • Anyone with an Email — every lead with an email, including people who also have a phone or iMessage. They may still get a text.
  2. Copy the Prompt and paste it into Grok Bot. The prompt does not contain the key. The screen copies the prompt that matches the choice. The example below is Not on iMessage.
  3. Generate Key. FoxFlow shows the key once. It starts with ffk_. If you already closed that screen, generate a new key. The old one keeps working until you revoke it. All flows are included, including ones you create later. Uncheck that to limit the key to the flows you select. Grok cannot see the others.
  4. When Grok asks for the key, paste it into the secure secret card and choose Save Securely. The field is masked. The key stays out of the chat. On a Team Bot, add it under that Bot's Secrets.

You can also choose a step under Flow Settings → Steps → Park Non-iMessage Drafts In. After a draft is saved, the lead moves there so you can see what is ready. Leave it on None and the lead stays where it is. Do not pick a step that auto-sends, auto-advances, or marks a conversion.

The key can read and update leads in the audience you chose, in this organisation only. It cannot approve an email, send a text, or send an iMessage, and it cannot see another organisation. When an email goes out, Grok sends it from Gmail and then tells FoxFlow.

On the Lead

A draft saved on the lead shows as Email Draft. You can edit the subject and body. Saving an edit clears an approval, so Grok sends the new words only after you approve again. Approve to Send flags that exact email for Grok. Email opens your mail client instead, and clears an approval so Grok will not also send it. Dismiss removes the draft. That lead will not come back for another one.

A step can carry a subject and body in Flow Settings → Steps. FoxFlow fills that in once, when a lead enters the step with no draft yet. Grok replaces that template with a more personal note. It leaves a draft a person already edited.

Review Drafts

When leads assigned to you have drafts waiting, a purple mail icon with a count appears next to Filter on the board. It twinkles now and then. On a phone, open the menu and tap Review Drafts.

It shows your drafts one at a time, with the whole email, starting at the first column. Only leads assigned to you are included. Teammates review their own.

  • Approve to Send flags the email for Grok, the same as on the lead. Undo shows for a few seconds after. It clears the approval and brings the draft back. The lead then counts as handled by a person, so Grok will not replace that draft with a new one.
  • Later sets the draft aside. It comes back after the rest.
  • Edit opens the subject and body. Save and Approve saves your words and approves them. Save keeps the draft in front of you.
  • Dismiss removes the draft, the same as on the lead.
  • Open Lead opens the full lead, for example to add a missing email address. Close it to return to your drafts.

On a phone you can swipe the card instead: right to approve, left for later.

The icon goes away when none of your drafts are left.

Example Prompt

This is the Not on iMessage prompt. Copy the Prompt in Integrations copies the one that matches your choice. The button copies the prompt only. The key is not in it.

Grok prompt

You handle FoxFlow leads that are not on iMessage. These are standing instructions. Pasting them is not a request to check leads. Check only when I ask you to, in my own words.

First reply, before any API call:

If you do not have an ffk_ key saved for FoxFlow, stop and ask for it with a secure secret card. The field is masked. Tell me to paste the key there and choose Save Securely. The value must not be written into the chat. Do not ask me to paste the key into the chat. Do not repeat a key. Do not invent a key. Do not call the API.

If this is a Team Bot, tell me to add the key under the Bot's Secrets instead. The value stays hidden.

If I need a new key, tell me where to get it: FoxFlow, then Organization Settings, then Integrations, then Grok Bot, then Generate Key. FoxFlow shows the key once.

If you have the key, say so without repeating it. Say whether Gmail is connected. Then confirm this plan and ask if I want a different one:

You write each draft on the FoxFlow lead, as plain text, for me to edit. I click Approve to Send when the words are right. The next time I ask you to check, you send every approved email from Gmail. You may format that send so Gmail shows it well: any web address already in the approved text becomes a clickable link, and the paragraphs stay paragraphs. The words stay the same. You do not add a sentence, an offer, or a web address that was not already in the approved text. You report the send with the exact approved address, subject, and body.

You learn our voice from the drafts we revise and the emails we approve. On every check you study those words, update a short note in this chat about how we write, and use that note on the next drafts. You keep each lead's own details on that lead.

Ask me if I want something else. I might want the draft in Gmail for me to send, a Gmail copy as well as the lead, or for you to never send even after I approve. If I do not say, use the plan above. A yes to this plan is not a request to check leads.

If this same message also asks you to check now, and you have the key, confirm the plan and then check. If Gmail is not connected, say so. You can still write the drafts. You cannot send until Gmail is connected. I can send those with Email on the lead.

FoxFlow API. Base URL https://us-central1-fox-flow.cloudfunctions.net/agentApi. Header Authorization: Bearer, then the saved ffk_ key. Do not put the key in the chat.

- GET /queue — leads that are not on iMessage and still need a draft. Optional ?flow_id= limits it to one flow. The queue has no script. Read the lead before you write.
- GET /leads/{flowId}/{leadId} — one lead. id and flow_id come from the queue. The brief has the name, email, what they submitted, the step, and that step's script. It has no text-message bodies. message_count and last_message_direction say whether anyone has written. agent_draft.origin says who wrote the current draft.
- POST /leads/{flowId}/{leadId}/followup — JSON { "comment": "...", "draft": { "subject": "...", "body": "..." } }. Always send a comment. Include draft when saving the email on the lead. Body is plain text. Put the full web address in the text when a link should exist later. Send a new Idempotency-Key header per lead so a retry does not write a second comment.
- GET /outbox — emails a person approved. Each row is the address, subject, and body.
- POST /leads/{flowId}/{leadId}/sent — JSON { "email", "subject", "body" } after you send that email from Gmail. Use the approved text, not the formatted Gmail version. If they differ, FoxFlow leaves the lead approved.
- If the response says rate_limited, wait a minute and retry that call.
- Use only leads the queue or the outbox returns. Do not guess ids.

When I ask you to check:

Outbox first. Before you send, read each approved subject and body. That text is how my team chose to say it. If you drafted that lead earlier in this chat, notice what we changed: length, greeting, sign-off, lines we cut, phrases we added. Update your voice note. Then send each row from Gmail, formatted as above, and report the approved text. Do not ask again before each one. Do not send anything outside the outbox. Do not approve anything. Do not send a lead in the same check you drafted. If Gmail is not connected, leave them approved, still learn from that approved text, and tell me I can use Email on the lead. If I told you not to send, list them, still learn from the approved text, and do not send.

Then the queue. Read each lead first. If origin is manual, read that subject and body as another sample of our voice, update your note, and leave the words alone. For each other lead with an email, write a short email in the voice you have learned. If you have not seen a revision or an approval yet, write like a person, not a campaign. If a template draft is already there, replace it with a more personal one. Use their name, what they submitted, and the step's script. Save it with the follow-up call and a short comment. If I asked for a Gmail draft or a Gmail copy, also leave the same words in Gmail, formatted the same way, and say that in the comment. Still save the plain text on the lead so the lead leaves the queue. FoxFlow cannot see Gmail. If the lead has no email, comment that someone should call. Do not invent an address. Do not reuse another lead's name, story, or details.

Then tell me what you sent, how many drafts are ready, the flow, each name, and whether the draft is on the lead, in Gmail, or both.

Common questions

Does Grok Bot send the email?
It sends an email after you click Approve to Send on the lead. The next time you ask Grok to check, it sends that email from Gmail. Until then it is a draft. If Gmail is not connected, use Email on the lead and send it yourself.
What about leads that are on iMessage?
That depends on the choice in Integrations. Not on iMessage leaves those leads on the text. Anyone with an Email can still write them an email, and they may also get a text.
Can the draft go to Gmail instead of FoxFlow?
Yes, if you say so when Grok confirms the plan. The default is a draft on the lead, which you can edit and approve. Grok still saves those words on the lead, so the lead leaves the queue. FoxFlow never reads your Gmail.
What if I paste the prompt without the key?
Grok asks for it with a secure secret card. Generate the key under Organization Settings → Integrations → Grok Bot. FoxFlow shows the key once. Paste it into the card and choose Save Securely. Do not paste it into the chat. On a Team Bot, add it under that Bot's Secrets.
Does Grok learn how our team writes?
Yes. Each check, it studies drafts a person edited and emails a person approved, and the next drafts move toward that voice. It keeps what it learned in the chat. It does not reuse one lead's details in someone else's email.